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

#include <users_modules/tutorials/vec-0/src/FluidLevel.hpp>

Public Member Functions

 GetFluidLevel ()=delete
 

Static Public Member Functions

static MoFEMErrorCode getParams (double &density, std::array< double, 3 > &gravity, std::array< double, 3 > &zero_pressure, boost::shared_ptr< Range > &ents, MoFEM::Interface &m_field, int ms_id)
 

Detailed Description

Definition at line 20 of file FluidLevel.hpp.

Constructor & Destructor Documentation

◆ GetFluidLevel()

Member Function Documentation

◆ getParams()

static MoFEMErrorCode ElasticExample::GetFluidLevel< BLOCKSET >::getParams ( double density,
std::array< double, 3 > &  gravity,
std::array< double, 3 > &  zero_pressure,
boost::shared_ptr< Range > &  ents,
MoFEM::Interface m_field,
int  ms_id 
)
inlinestatic

Definition at line 23 of file FluidLevel.hpp.

27  {
29 
30  auto cubit_meshset_ptr =
31  m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(ms_id,
32  BLOCKSET);
33  std::vector<double> block_data;
34  CHKERR cubit_meshset_ptr->getAttributes(block_data);
35  if (block_data.size() != 1 + 3 + 3) {
36  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
37  "Expected that block has two attribute");
38  }
39  density = block_data[0];
40  gravity = {block_data[1], block_data[2], block_data[3]};
41  zero_pressure = {block_data[4], block_data[5], block_data[6]};
42 
43  MOFEM_LOG_CHANNEL("WORLD");
44  MOFEM_TAG_AND_LOG("WORLD", Sev::inform, "FluidPressure")
45  << "Density " << density;
46  MOFEM_TAG_AND_LOG("WORLD", Sev::inform, "FluidPressure")
47  << "Gravity " << gravity[0] << " " << gravity[1] << " " << gravity[2];
48  MOFEM_TAG_AND_LOG("WORLD", Sev::inform, "FluidPressure")
49  << "Zero pressure " << zero_pressure[0] << " " << zero_pressure[1]
50  << " " << zero_pressure[2];
51 
52  ents = boost::make_shared<Range>();
53  CHKERR
54  m_field.get_moab().get_entities_by_handle(cubit_meshset_ptr->meshset,
55  *(ents), true);
56 
57  MOFEM_LOG_CHANNEL("SYNC");
58  MOFEM_TAG_AND_LOG("SYNC", Sev::noisy, "FluidPressure") << *ents;
59  MOFEM_LOG_SEVERITY_SYNC(m_field.get_comm(), Sev::noisy);
60 
62  }

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_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:535
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:148
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:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346