v0.14.0
Public Member Functions | Static Public Member Functions | List of all members
ThermoElasticOps::GetRadiationParameters< BLOCKSET > Struct Reference

#include <tutorials/adv-2/src/ThermalRadiation.hpp>

Public Member Functions

 GetRadiationParameters ()=delete
 

Static Public Member Functions

static MoFEMErrorCode getParameters (double &stefan_boltzmann_constant, double &emissivity_parameter, double &ambient_temperature, boost::shared_ptr< Range > &ents, MoFEM::Interface &m_field, int ms_id, Sev sev)
 

Detailed Description

Definition at line 18 of file ThermalRadiation.hpp.

Constructor & Destructor Documentation

◆ GetRadiationParameters()

Member Function Documentation

◆ getParameters()

static MoFEMErrorCode ThermoElasticOps::GetRadiationParameters< BLOCKSET >::getParameters ( double stefan_boltzmann_constant,
double emissivity_parameter,
double ambient_temperature,
boost::shared_ptr< Range > &  ents,
MoFEM::Interface m_field,
int  ms_id,
Sev  sev 
)
inlinestatic

Definition at line 22 of file ThermalRadiation.hpp.

24  {
25 
27 
28  auto cubit_meshset_ptr =
29  m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(ms_id,
30  BLOCKSET);
31  std::vector<double> block_data;
32  CHKERR cubit_meshset_ptr->getAttributes(block_data);
33  if (block_data.size() < 3) {
34  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
35  "Expected that radiation block has three attributes "
36  "(Stefan–Boltzmann "
37  "constant, emissivity parameter, and ambient temperature)");
38  }
39  stefan_boltzmann_constant = block_data[0];
40  emissivity_parameter = block_data[1];
41  ambient_temperature = block_data[2];
42 
43  MOFEM_LOG_CHANNEL("WORLD");
44  MOFEM_TAG_AND_LOG("WORLD", Sev::inform, "RadiationBc")
45  << "Stefan–Boltzmann constant " << stefan_boltzmann_constant;
46  MOFEM_TAG_AND_LOG("WORLD", Sev::inform, "RadiationBc")
47  << "Emissivity parameter " << emissivity_parameter;
48  MOFEM_TAG_AND_LOG("WORLD", Sev::inform, "RadiationBc")
49  << "Ambient temperature " << ambient_temperature;
50 
51  ents = boost::make_shared<Range>();
52  CHKERR m_field.get_moab().get_entities_by_handle(cubit_meshset_ptr->meshset,
53  *(ents), true);
54 
55  MOFEM_LOG_CHANNEL("SYNC");
56  MOFEM_TAG_AND_LOG("SYNC", Sev::noisy, "RadiationBc") << *ents;
57  MOFEM_LOG_SEVERITY_SYNC(m_field.get_comm(), Sev::noisy);
58 
60  }

The documentation for this struct was generated from the following file:
MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Definition: UnknownInterface.hpp:93
MOFEM_LOG_SEVERITY_SYNC
#define MOFEM_LOG_SEVERITY_SYNC(comm, severity)
Synchronise "SYNC" on curtain severity level.
Definition: LogManager.hpp:352
MOFEM_LOG_CHANNEL
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
Definition: LogManager.hpp:284
MoFEM::CoreInterface::get_comm
virtual MPI_Comm & get_comm() const =0
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
MOFEM_TAG_AND_LOG
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
Definition: LogManager.hpp:362
BLOCKSET
@ BLOCKSET
Definition: definitions.h:161
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359