v0.14.0
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/tutorials/adv-2/src/ThermoElasticOps.hpp>

Public Member Functions

 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)
 

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 248 of file ThermoElasticOps.hpp.

Constructor & Destructor Documentation

◆ AddFluxToLhsPipelineImpl()

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()

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 257 of file ThermoElasticOps.hpp.

263  {
265 
266  using OP_MASS = typename FormsIntegrators<OpBase>::template Assembly<
268 
269  auto add_op = [&](auto &&meshset_vec_ptr) {
271  for (auto m : meshset_vec_ptr) {
272  std::vector<double> block_data;
273  m->getAttributes(block_data);
274  if (block_data.size() != 2) {
275  SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
276  "Expected two parameters");
277  }
278  double beta =
279  block_data[1]; // Set temperature parameter [ W/K * (1/m^3)]
280  auto ents_ptr = boost::make_shared<Range>();
281  CHKERR m_field.get_moab().get_entities_by_handle(m->meshset,
282  *(ents_ptr), true);
283 
284  MOFEM_TAG_AND_LOG("WORLD", sev, "SetTargetTemperature")
285  << "Add " << *m << " penalty " << beta;
286 
287  pipeline.push_back(new OP_MASS(
289  [beta](double, double, double) { return -beta; }, ents_ptr));
290  }
292  };
293 
294  CHKERR add_op(
295 
296  m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(std::regex(
297 
298  (boost::format("%s(.*)") % block_name).str()
299 
300  ))
301 
302  );
303 
304  MOFEM_LOG_CHANNEL("WORLD");
305 
307  }

The documentation for this struct was generated from the following file:
MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.
Definition: UnknownInterface.hpp:93
MOFEM_LOG_CHANNEL
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
Definition: LogManager.hpp:284
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
OpMass
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM > OpMass
[Only used with Hooke equation (linear material model)]
Definition: seepage.cpp:57
BiLinearForm
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
MOFEM_TAG_AND_LOG
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
Definition: LogManager.hpp:362
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
m
FTensor::Index< 'm', 3 > m
Definition: shallow_wave.cpp:80
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346