v0.15.0
Loading...
Searching...
No Matches
ElasticExample::GetSpringStiffness< BLOCKSET > Struct Reference

#include "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

Definition at line 18 of file ElasticSpring.hpp.

Constructor & Destructor Documentation

◆ GetSpringStiffness()

ElasticExample::GetSpringStiffness< BLOCKSET >::GetSpringStiffness ( )
delete

Member Function Documentation

◆ getStiffness()

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

Definition at line 21 of file ElasticSpring.hpp.

24 {
26
27 auto cubit_meshset_ptr =
28 m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(ms_id,
29 BLOCKSET);
30 std::vector<double> block_data;
31 CHKERR cubit_meshset_ptr->getAttributes(block_data);
32 if (block_data.size() != 2) {
33 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
34 "Expected that block has two attribute");
35 }
36 normal_stiffness = block_data[0];
37 tangent_stiffness = block_data[1];
38
39 MOFEM_LOG_CHANNEL("WORLD");
40 MOFEM_TAG_AND_LOG("WORLD", Sev::inform, "SpringBc")
41 << "Normal stiffness " << normal_stiffness;
42 MOFEM_TAG_AND_LOG("WORLD", Sev::inform, "SpringBc")
43 << "Tangent stiffness " << tangent_stiffness;
44
45 ents = boost::make_shared<Range>();
46 CHKERR
47 m_field.get_moab().get_entities_by_handle(cubit_meshset_ptr->meshset,
48 *(ents), true);
49
50 MOFEM_LOG_CHANNEL("SYNC");
51 MOFEM_TAG_AND_LOG("SYNC", Sev::noisy, "SpringBc") << *ents;
52 MOFEM_LOG_SEVERITY_SYNC(m_field.get_comm(), Sev::noisy);
53
55 }
#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: