v0.14.0
Classes | Public Member Functions | Public Attributes | Private Attributes | List of all members
BodyForceConstantField Struct Reference

Body forces elements. More...

#include <users_modules/basic_finite_elements/src/BodyForce.hpp>

Collaboration diagram for BodyForceConstantField:
[legend]

Classes

struct  MyVolumeFE
 
struct  OpBodyForce
 

Public Member Functions

MyVolumeFEgetLoopFe ()
 
 BodyForceConstantField (MoFEM::Interface &m_field)
 
MoFEMErrorCode addBlock (const std::string field_name, Vec F, int ms_id)
 

Public Attributes

MoFEM::InterfacemField
 
MyVolumeFE fe
 

Private Attributes

std::map< int, Block_BodyForces > mapData
 

Detailed Description

Body forces elements.

Examples
elasticity.cpp.

Definition at line 12 of file BodyForce.hpp.

Constructor & Destructor Documentation

◆ BodyForceConstantField()

BodyForceConstantField::BodyForceConstantField ( MoFEM::Interface m_field)
inline

Definition at line 25 of file BodyForce.hpp.

26  : mField(m_field), fe(m_field) {}

Member Function Documentation

◆ addBlock()

MoFEMErrorCode BodyForceConstantField::addBlock ( const std::string  field_name,
Vec  F,
int  ms_id 
)
inline

Definition at line 94 of file BodyForce.hpp.

94  {
95  const CubitMeshSets *cubit_meshset_ptr;
96  MeshsetsManager *mmanager_ptr;
98  CHKERR mField.getInterface(mmanager_ptr);
99  CHKERR mmanager_ptr->getCubitMeshsetPtr(ms_id, BLOCKSET,
100  &cubit_meshset_ptr);
101  CHKERR cubit_meshset_ptr->getAttributeDataStructure(mapData[ms_id]);
102  EntityHandle meshset = cubit_meshset_ptr->getMeshset();
103  Range tets;
104  CHKERR mField.get_moab().get_entities_by_type(meshset, MBTET, tets, true);
105  fe.getOpPtrVector().push_back(
106  new OpBodyForce(field_name, F, mapData[ms_id], tets));
108  }

◆ getLoopFe()

MyVolumeFE& BodyForceConstantField::getLoopFe ( )
inline

Definition at line 23 of file BodyForce.hpp.

23 { return fe; }

Member Data Documentation

◆ fe

MyVolumeFE BodyForceConstantField::fe

Definition at line 22 of file BodyForce.hpp.

◆ mapData

std::map<int, Block_BodyForces> BodyForceConstantField::mapData
private

Definition at line 111 of file BodyForce.hpp.

◆ mField

MoFEM::Interface& BodyForceConstantField::mField

Definition at line 14 of file BodyForce.hpp.


The documentation for this struct was generated from the following file:
MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Definition: UnknownInterface.hpp:93
BodyForceConstantField::mField
MoFEM::Interface & mField
Definition: BodyForce.hpp:14
EntityHandle
OpBodyForce
DomainNaturalBCRhs::OpFlux< NaturalMeshsetType< BLOCKSET >, 1, SPACE_DIM > OpBodyForce
Definition: thermo_elastic.cpp:98
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
BodyForceConstantField::fe
MyVolumeFE fe
Definition: BodyForce.hpp:22
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
Range
BLOCKSET
@ BLOCKSET
Definition: definitions.h:161
MoFEM::ForcesAndSourcesCore::getOpPtrVector
boost::ptr_deque< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.
Definition: ForcesAndSourcesCore.hpp:83
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
BodyForceConstantField::mapData
std::map< int, Block_BodyForces > mapData
Definition: BodyForce.hpp:111
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
F
@ F
Definition: free_surface.cpp:394