22 {
23
25
26 auto cubit_meshset_ptr =
27 m_field.
getInterface<MeshsetsManager>()->getCubitMeshsetPtr(ms_id,
29 auto *json_config = m_field.
getInterface<JsonConfigManager>();
30 const auto params_from_json =
31 json_config->getParamsFromBlockset("CONVECTION", ms_id);
32 if (!params_from_json.empty()) {
33 heat_transfer_coefficient = params_from_json.at("heat_transfer_coefficient");
34 ambient_temperature = params_from_json.at("ambient_temperature");
35 } else {
36 std::vector<double> block_data;
37 CHKERR cubit_meshset_ptr->getAttributes(block_data);
38 if (block_data.size() < 2) {
40 "Expected that convection block has two attributes (heat "
41 "transfer coefficient and ambient temperature)");
42 }
43 heat_transfer_coefficient = block_data[0];
44 ambient_temperature = block_data[1];
45 }
46
49 << "Heat transfer coefficient " << heat_transfer_coefficient;
51 << "Ambient temperature " << ambient_temperature;
52
53 ents = boost::make_shared<Range>();
55 m_field.
get_moab().get_entities_by_handle(cubit_meshset_ptr->meshset,
56 *(ents), true);
57
61
63 }
#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 ...
@ MOFEM_DATA_INCONSISTENCY
#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.