v0.15.0
Loading...
Searching...
No Matches
AddFluxToLhsPipelineImpl< OpFluxLhsImpl< ThermoElasticOps::SetTargetTemperature, 1, 1, A, I, OpBase >, A, I, OpBase > Struct Template Reference

#include "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 265 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 274 of file ThermoElasticOps.hpp.

280 {
282
283 using OP_MASS = typename FormsIntegrators<OpBase>::template Assembly<
285
286 auto add_op = [&](auto &&meshset_vec_ptr) {
288 for (auto m : meshset_vec_ptr) {
289 std::vector<double> block_data;
290 m->getAttributes(block_data);
291 if (block_data.size() != 2) {
292 SETERRQ(PETSC_COMM_WORLD, MOFEM_DATA_INCONSISTENCY,
293 "Expected two parameters");
294 }
295 double beta =
296 block_data[1]; // Set temperature parameter [ W/K * (1/m^3)]
297 auto ents_ptr = boost::make_shared<Range>();
298 CHKERR m_field.get_moab().get_entities_by_handle(m->meshset,
299 *(ents_ptr), true);
300
301 MOFEM_TAG_AND_LOG("WORLD", sev, "SetTargetTemperature")
302 << "Add " << *m << " penalty " << beta;
303
304 pipeline.push_back(new OP_MASS(
306 [beta](double, double, double) { return -beta; }, ents_ptr));
307 }
309 };
310
311 CHKERR add_op(
312
313 m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(std::regex(
314
315 (boost::format("%s(.*)") % block_name).str()
316
317 ))
318
319 );
320
321 MOFEM_LOG_CHANNEL("WORLD");
322
324 }
#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 auto field_name
FTensor::Index< 'm', 3 > m
virtual moab::Interface & get_moab()=0
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.

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