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

Force applied to nodes. More...

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

Collaboration diagram for NodalForce:
[legend]

Classes

struct  bCForce
 
struct  MyFE
 
struct  OpNodalForce
 Operator to assemble nodal force into right hand side vector. More...
 

Public Member Functions

 NodalForce (MoFEM::Interface &m_field)
 
MyFEgetLoopFe ()
 
MoFEMErrorCode addForce (const std::string field_name, Vec F, int ms_id, bool use_snes_f=false)
 

Public Attributes

MoFEM::InterfacemField
 
MyFE fe
 
std::map< int, bCForcemapForce
 
boost::ptr_vector< MethodForForceScalingmethodsOp
 

Detailed Description

Force applied to nodes.

Examples
nonlinear_dynamics.cpp.

Definition at line 13 of file NodalForce.hpp.

Constructor & Destructor Documentation

◆ NodalForce()

NodalForce::NodalForce ( MoFEM::Interface m_field)
inline

Definition at line 16 of file NodalForce.hpp.

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

Member Function Documentation

◆ addForce()

MoFEMErrorCode NodalForce::addForce ( const std::string  field_name,
Vec  F,
int  ms_id,
bool  use_snes_f = false 
)

Definition at line 68 of file NodeForce.cpp.

69  {
70 
71  const CubitMeshSets *cubit_meshset_ptr;
72  MeshsetsManager *mmanager_ptr;
74  CHKERR mField.getInterface(mmanager_ptr);
75  CHKERR mmanager_ptr->getCubitMeshsetPtr(ms_id, NODESET, &cubit_meshset_ptr);
76  CHKERR cubit_meshset_ptr->getBcDataStructure(mapForce[ms_id].data);
77  CHKERR mField.get_moab().get_entities_by_type(
78  cubit_meshset_ptr->meshset, MBVERTEX, mapForce[ms_id].nOdes, true);
79  fe.getOpPtrVector().push_back(
80  new OpNodalForce(field_name, F, mapForce[ms_id], methodsOp, use_snes_f));
82 }

◆ getLoopFe()

MyFE& NodalForce::getLoopFe ( )
inline

Definition at line 23 of file NodalForce.hpp.

23 { return fe; }

Member Data Documentation

◆ fe

MyFE NodalForce::fe

Definition at line 22 of file NodalForce.hpp.

◆ mapForce

std::map<int, bCForce> NodalForce::mapForce

Definition at line 29 of file NodalForce.hpp.

◆ methodsOp

boost::ptr_vector<MethodForForceScaling> NodalForce::methodsOp

Definition at line 31 of file NodalForce.hpp.

◆ mField

MoFEM::Interface& NodalForce::mField

Definition at line 15 of file NodalForce.hpp.


The documentation for this struct was generated from the following files:
MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.
Definition: UnknownInterface.hpp:93
NodalForce::mField
MoFEM::Interface & mField
Definition: NodalForce.hpp:15
MoFEM::CubitMeshSets
this struct keeps basic methods for moab meshset about material and boundary conditions
Definition: BCMultiIndices.hpp:19
NodalForce::methodsOp
boost::ptr_vector< MethodForForceScaling > methodsOp
Definition: NodalForce.hpp:31
MoFEM::CubitMeshSets::getBcDataStructure
MoFEMErrorCode getBcDataStructure(CUBIT_BC_DATA_TYPE &data) const
Definition: BCMultiIndices.hpp:296
NODESET
@ NODESET
Definition: definitions.h:146
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
NodalForce::fe
MyFE fe
Definition: NodalForce.hpp:22
MoFEM::CubitMeshSets::meshset
EntityHandle meshset
Definition: BCMultiIndices.hpp:21
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
NodalForce::mapForce
std::map< int, bCForce > mapForce
Definition: NodalForce.hpp:29
MoFEM::ForcesAndSourcesCore::getOpPtrVector
boost::ptr_deque< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.
Definition: ForcesAndSourcesCore.hpp:83
MoFEM::MeshsetsManager
Interface for managing meshsets containing materials and boundary conditions.
Definition: MeshsetsManager.hpp:104
MoFEM::MeshsetsManager::getCubitMeshsetPtr
MoFEMErrorCode getCubitMeshsetPtr(const int ms_id, const CubitBCType cubit_bc_type, const CubitMeshSets **cubit_meshset_ptr) const
get cubit meshset
Definition: MeshsetsManager.cpp:575
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
F
@ F
Definition: free_surface.cpp:394