v0.15.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
AddFluxToLhsPipelineImpl< OpFluxLhsImpl< ThermoElasticOps::SetTargetTemperature, 1, 1, A, I, OpBase >, A, I, OpBase > Struct Template Reference

#include "users_modules/multifield-thermoplasticity-private/tutorials/adv-2/src/ThermoElasticOps.hpp"

Public Member Functions

 AddFluxToLhsPipelineImpl ()=delete
 
 AddFluxToLhsPipelineImpl ()=delete
 

Static Public Member Functions

static MoFEMErrorCode add (boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, MoFEM::Interface &m_field, const std::string field_name, boost::shared_ptr< VectorDouble > temp_ptr, std::string block_name, Sev sev)
 
static MoFEMErrorCode add (boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, MoFEM::Interface &m_field, const std::string field_name, boost::shared_ptr< VectorDouble > temp_ptr, std::string block_name, Sev sev)
 

Detailed Description

template<AssemblyType A, IntegrationType I, typename OpBase>
struct AddFluxToLhsPipelineImpl< OpFluxLhsImpl< ThermoElasticOps::SetTargetTemperature, 1, 1, A, I, OpBase >, A, I, OpBase >

Definition at line 265 of file ThermoElasticOps.hpp.

Constructor & Destructor Documentation

◆ AddFluxToLhsPipelineImpl() [1/2]

template<AssemblyType A, IntegrationType I, typename OpBase >
AddFluxToLhsPipelineImpl< OpFluxLhsImpl< ThermoElasticOps::SetTargetTemperature, 1, 1, A, I, OpBase >, A, I, OpBase >::AddFluxToLhsPipelineImpl ( )
delete

◆ AddFluxToLhsPipelineImpl() [2/2]

template<AssemblyType A, IntegrationType I, typename OpBase >
AddFluxToLhsPipelineImpl< OpFluxLhsImpl< ThermoElasticOps::SetTargetTemperature, 1, 1, A, I, OpBase >, A, I, OpBase >::AddFluxToLhsPipelineImpl ( )
delete

Member Function Documentation

◆ add() [1/2]

template<AssemblyType A, IntegrationType I, typename OpBase >
static MoFEMErrorCode AddFluxToLhsPipelineImpl< OpFluxLhsImpl< ThermoElasticOps::SetTargetTemperature, 1, 1, A, I, OpBase >, A, I, OpBase >::add ( boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pipeline,
MoFEM::Interface m_field,
const std::string  field_name,
boost::shared_ptr< VectorDouble >  temp_ptr,
std::string  block_name,
Sev  sev 
)
inlinestatic

Definition at line 274 of file ThermoElasticOps.hpp.

276 {
277 Range ents;
278 CHKERR
279 m_field.get_moab().get_entities_by_handle(m->meshset, ents, true);
280 return ents;
281 };
282
283 auto get_expansion = [&]() {
284 VectorDouble expansion(SPACE_DIM, block_data[1]);
285 if (block_data.size() > 2) {
286 expansion[1] = block_data[2];
287 }
288 if (SPACE_DIM == 3 && block_data.size() > 3) {
289 expansion[2] = block_data[3];
290 }
291 return expansion;
292 };
293
294 auto coeff_exp_vec = get_expansion();
295
296 MOFEM_TAG_AND_LOG("WORLD", sev, "Mat Thermoelastic Block")
297 << " ref_temp = " << block_data[0]
298 << " expansion = " << coeff_exp_vec;
299
300 blockData.push_back({block_data[0], coeff_exp_vec, get_block_ents()});
301 }
302 MOFEM_LOG_CHANNEL("WORLD");
304 }
305
306 boost::shared_ptr<VectorDouble> expansionPtr;
307 boost::shared_ptr<double> refTempPtr;
308 };
309
310 pipeline.push_back(new OpMatThermoElasticBlocks(
311 blockedParamsPtr->getCoeffExpansionPtr(),
312 blockedParamsPtr->getRefTempPtr(), local_coeff_expansion, local_ref_temp,
313 m_field, sev,
314
315 // Get blockset using regular expression
316 m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(std::regex(
317
318 (boost::format("%s(.*)") % block_name).str()
319
320 ))
321
322 ));
323
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
constexpr int SPACE_DIM
[Define dimension]
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
UBlasVector< double > VectorDouble
Definition Types.hpp:68
FTensor::Index< 'm', 3 > m
virtual moab::Interface & get_moab()=0
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.

◆ add() [2/2]

template<AssemblyType A, IntegrationType I, typename OpBase >
static MoFEMErrorCode AddFluxToLhsPipelineImpl< OpFluxLhsImpl< ThermoElasticOps::SetTargetTemperature, 1, 1, A, I, OpBase >, A, I, OpBase >::add ( boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &  pipeline,
MoFEM::Interface m_field,
const std::string  field_name,
boost::shared_ptr< VectorDouble >  temp_ptr,
std::string  block_name,
Sev  sev 
)
inlinestatic

Definition at line 592 of file ThermoElasticOps.hpp.

598 {
600
601 using OP_MASS = typename FormsIntegrators<OpBase>::template Assembly<
603
604 auto add_op = [&](auto &&meshset_vec_ptr) {
606 for (auto m : meshset_vec_ptr) {
607 std::vector<double> block_data;
608 m->getAttributes(block_data);
609 if (block_data.size() != 2) {
610 SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
611 "Expected two parameters");
612 }
613 double beta =
614 block_data[1]; // Set temperature parameter [ W/K * (1/m^3)]
615 auto ents_ptr = boost::make_shared<Range>();
616 CHKERR m_field.get_moab().get_entities_by_handle(m->meshset,
617 *(ents_ptr), true);
618
619 MOFEM_TAG_AND_LOG("WORLD", sev, "SetTargetTemperature")
620 << "Add " << *m << " penalty " << beta;
621
622 pipeline.push_back(new OP_MASS(
624 [beta](double, double, double) { return -beta; }, ents_ptr));
625 }
627 };
628
629 CHKERR add_op(
630
631 m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(std::regex(
632
633 (boost::format("%s(.*)") % block_name).str()
634
635 ))
636
637 );
638
639 MOFEM_LOG_CHANNEL("WORLD");
640
642 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31
constexpr AssemblyType A
[Define dimension]
constexpr auto field_name
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM > OpMass
[Only used with Hooke equation (linear material model)]
Definition seepage.cpp:56

The documentation for this struct was generated from the following file: