v0.16.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 "tutorials/adv-2_thermo_elasticity/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, std::string block_name, FEFun fe_fun, 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 272 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 595 of file ThermoElasticOps.hpp.

601 {
603
604 using OP_MASS = typename FormsIntegrators<OpBase>::template Assembly<
606
607 auto add_op = [&](auto &&meshset_vec_ptr) {
609 for (auto m : meshset_vec_ptr) {
610 std::vector<double> block_data;
611 m->getAttributes(block_data);
612 if (block_data.size() != 2) {
613 SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
614 "Expected two parameters");
615 }
616 double beta =
617 block_data[1]; // Set temperature parameter [ W/K * (1/m^3)]
618 auto ents_ptr = boost::make_shared<Range>();
619 CHKERR m_field.get_moab().get_entities_by_handle(m->meshset,
620 *(ents_ptr), true);
621
622 MOFEM_TAG_AND_LOG("WORLD", sev, "SetTargetTemperature")
623 << "Add " << *m << " penalty " << beta;
624
625 pipeline.push_back(new OP_MASS(
627 [beta](double, double, double) { return -beta; }, ents_ptr));
628 }
630 };
631
632 CHKERR add_op(
633
634 m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(std::regex(
635
636 (boost::format("%s(.*)") % block_name).str()
637
638 ))
639
640 );
641
642 MOFEM_LOG_CHANNEL("WORLD");
643
645 }
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#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
#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.
constexpr AssemblyType A
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
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,
std::string  block_name,
FEFun  fe_fun,
Sev  sev 
)
inlinestatic

Definition at line 281 of file ThermoElasticOps.hpp.

287 {
289
290 using OP_MASS = typename FormsIntegrators<OpBase>::template Assembly<
292
293 auto add_op = [&](auto &&meshset_vec_ptr) {
295 for (auto m : meshset_vec_ptr) {
296 std::vector<double> block_data;
297 m->getAttributes(block_data);
298 if (block_data.size() != 2) {
299 SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
300 "Expected two parameters");
301 }
302 double beta = block_data[1];
303 auto ents_ptr = boost::make_shared<Range>();
304 CHKERR m_field.get_moab().get_entities_by_handle(m->meshset,
305 *(ents_ptr), true);
306
307 MOFEM_TAG_AND_LOG("WORLD", sev, "SetTargetTemperature")
308 << "Add " << *m << " penalty " << beta;
309
310 auto op_mass = new OP_MASS(
312 [beta](double, double, double) { return beta; }, ents_ptr);
313 op_mass->feScalingFun = fe_fun;
314 pipeline.push_back(op_mass);
315 }
317 };
318
319 CHKERR add_op(
320
321 m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(std::regex(
322
323 (boost::format("%s(.*)") % block_name).str()
324
325 ))
326
327 );
328
329 MOFEM_LOG_CHANNEL("WORLD");
330
332 }

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