v0.15.0
Loading...
Searching...
No Matches
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 15 of file ThermalRadiation.hpp.

Constructor & Destructor Documentation

◆ GetRadiationParameters()

ThermoElasticOps::GetRadiationParameters< BLOCKSET >::GetRadiationParameters ( )
delete

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 19 of file ThermalRadiation.hpp.

21 {
22
24
25 auto cubit_meshset_ptr =
26 m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(ms_id,
27 BLOCKSET);
28 std::vector<double> block_data;
29 CHKERR cubit_meshset_ptr->getAttributes(block_data);
30 if (block_data.size() < 3) {
31 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
32 "Expected that radiation block has three attributes "
33 "(Stefan–Boltzmann "
34 "constant, emissivity parameter, and ambient temperature)");
35 }
36 stefan_boltzmann_constant = block_data[0];
37 emissivity_parameter = block_data[1];
38 ambient_temperature = block_data[2];
39
40 MOFEM_LOG_CHANNEL("WORLD");
41 MOFEM_TAG_AND_LOG("WORLD", Sev::inform, "RadiationBc")
42 << "Stefan–Boltzmann constant " << stefan_boltzmann_constant;
43 MOFEM_TAG_AND_LOG("WORLD", Sev::inform, "RadiationBc")
44 << "Emissivity parameter " << emissivity_parameter;
45 MOFEM_TAG_AND_LOG("WORLD", Sev::inform, "RadiationBc")
46 << "Ambient temperature " << ambient_temperature;
47
48 ents = boost::make_shared<Range>();
49 CHKERR m_field.get_moab().get_entities_by_handle(cubit_meshset_ptr->meshset,
50 *(ents), true);
51
52 MOFEM_LOG_CHANNEL("SYNC");
53 MOFEM_TAG_AND_LOG("SYNC", Sev::noisy, "RadiationBc") << *ents;
54 MOFEM_LOG_SEVERITY_SYNC(m_field.get_comm(), Sev::noisy);
55
57 }
#define MOFEM_LOG_SEVERITY_SYNC(comm, severity)
Synchronise "SYNC" on curtain severity level.
#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 ...
@ BLOCKSET
@ 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.
virtual moab::Interface & get_moab()=0
virtual MPI_Comm & get_comm() const =0
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.

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