v0.13.2
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
ElasticExample::GetSpringStiffness< CubitBC > Struct Template Reference

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

Public Member Functions

 GetSpringStiffness ()=delete
 

Static Public Member Functions

static MoFEMErrorCode getStiffness (double &normal_stiffness, double &tangent_stiffness, boost::shared_ptr< Range > &ents, MoFEM::Interface &m_field, int ms_id)
 

Detailed Description

template<CubitBC>
struct ElasticExample::GetSpringStiffness< CubitBC >

Definition at line 16 of file ElasticSpring.hpp.

Constructor & Destructor Documentation

◆ GetSpringStiffness()

template<CubitBC >
ElasticExample::GetSpringStiffness< CubitBC >::GetSpringStiffness ( )
delete

Member Function Documentation

◆ getStiffness()

template<CubitBC >
static MoFEMErrorCode ElasticExample::GetSpringStiffness< CubitBC >::getStiffness ( double normal_stiffness,
double tangent_stiffness,
boost::shared_ptr< Range > &  ents,
MoFEM::Interface m_field,
int  ms_id 
)
inlinestatic

Definition at line 19 of file ElasticSpring.hpp.

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() != 2) {
31 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
32 "Expected that block has two attribute");
33 }
34 normal_stiffness = block_data[0];
35 tangent_stiffness = block_data[1];
36
37 MOFEM_LOG_CHANNEL("WORLD");
38 MOFEM_TAG_AND_LOG("WORLD", Sev::inform, "SpringBc")
39 << "Normal stiffness " << normal_stiffness;
40 MOFEM_TAG_AND_LOG("WORLD", Sev::inform, "SpringBc")
41 << "Tangent stiffness " << tangent_stiffness;
42
43 ents = boost::make_shared<Range>();
44 CHKERR
45 m_field.get_moab().get_entities_by_handle(cubit_meshset_ptr->meshset,
46 *(ents), true);
47
48 MOFEM_LOG_CHANNEL("SYNC");
49 MOFEM_TAG_AND_LOG("SYNC", Sev::noisy, "SpringBc") << *ents;
50 MOFEM_LOG_SEVERITY_SYNC(m_field.get_comm(), Sev::noisy);
51
53 }
#define MOFEM_LOG_SEVERITY_SYNC(comm, severity)
Synchronise "SYNC" on curtain severity level.
Definition: LogManager.hpp:352
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
Definition: LogManager.hpp:362
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
@ BLOCKSET
Definition: definitions.h:148
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
Definition: LogManager.hpp:284
virtual moab::Interface & get_moab()=0
virtual MPI_Comm & get_comm() const =0
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.

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