v0.14.0
Classes | Static Public Member Functions | List of all members
MetaNodalForces Struct Reference

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

Classes

struct  DofForceScale
 Scale force based on some DOF value. More...
 
struct  TagForceScale
 Scale force based on tag value "_LoadFactor_Scale_". More...
 

Static Public Member Functions

static MoFEMErrorCode addElement (MoFEM::Interface &m_field, const std::string field_name, Range *intersect_ptr=NULL)
 Add element taking information from NODESET. More...
 
static MoFEMErrorCode setOperators (MoFEM::Interface &m_field, boost::ptr_map< std::string, NodalForce > &nodal_forces, Vec F, const std::string field_name)
 Set integration point operators. More...
 

Detailed Description

Definition at line 59 of file NodalForce.hpp.

Member Function Documentation

◆ addElement()

static MoFEMErrorCode MetaNodalForces::addElement ( MoFEM::Interface m_field,
const std::string  field_name,
Range intersect_ptr = NULL 
)
inlinestatic

Add element taking information from NODESET.

Examples
elasticity.cpp, elasticity_mixed_formulation.cpp, nonlinear_dynamics.cpp, and Remodeling.cpp.

Definition at line 92 of file NodalForce.hpp.

94  {
96  CHKERR m_field.add_finite_element("FORCE_FE", MF_ZERO);
101  it)) {
102  Range tris;
103  CHKERR m_field.get_moab().get_entities_by_type(it->meshset, MBTRI, tris,
104  true);
105  Range edges;
106  CHKERR m_field.get_moab().get_entities_by_type(it->meshset, MBEDGE, edges,
107  true);
108  Range tris_nodes;
109  CHKERR m_field.get_moab().get_connectivity(tris, tris_nodes);
110  Range edges_nodes;
111  CHKERR m_field.get_moab().get_connectivity(edges, edges_nodes);
112  Range nodes;
113  CHKERR m_field.get_moab().get_entities_by_type(it->meshset, MBVERTEX,
114  nodes, true);
115  nodes = subtract(nodes, tris_nodes);
116  nodes = subtract(nodes, edges_nodes);
117  if (intersect_ptr) {
118  nodes = intersect(nodes, *intersect_ptr);
119  }
120  CHKERR m_field.add_ents_to_finite_element_by_type(nodes, MBVERTEX,
121  "FORCE_FE");
122  }
124  }

◆ setOperators()

static MoFEMErrorCode MetaNodalForces::setOperators ( MoFEM::Interface m_field,
boost::ptr_map< std::string, NodalForce > &  nodal_forces,
Vec  F,
const std::string  field_name 
)
inlinestatic

Set integration point operators.

Examples
elasticity.cpp, elasticity_mixed_formulation.cpp, and Remodeling.cpp.

Definition at line 128 of file NodalForce.hpp.

130  {
132  string fe_name = "FORCE_FE";
133  nodal_forces.insert(fe_name, new NodalForce(m_field));
135  it)) {
136  CHKERR nodal_forces.at(fe_name).addForce(field_name, F,
137  it->getMeshsetId());
138  }
140  }

The documentation for this struct was generated from the following file:
MoFEM::CoreInterface::modify_finite_element_add_field_row
virtual MoFEMErrorCode modify_finite_element_add_field_row(const std::string &fe_name, const std::string name_row)=0
set field row which finite element use
_IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_
#define _IT_CUBITMESHSETS_BY_BCDATA_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet in a moFEM field.
Definition: MeshsetsManager.hpp:49
NodalForce
Force applied to nodes.
Definition: NodalForce.hpp:13
NODESET
@ NODESET
Definition: definitions.h:146
MoFEM::CoreInterface::add_ents_to_finite_element_by_type
virtual MoFEMErrorCode add_ents_to_finite_element_by_type(const EntityHandle entities, const EntityType type, const std::string &name, const bool recursive=true)=0
add entities to finite element
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
MoFEM::CoreInterface::add_finite_element
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
MoFEM::CoreInterface::modify_finite_element_add_field_col
virtual MoFEMErrorCode modify_finite_element_add_field_col(const std::string &fe_name, const std::string name_row)=0
set field col which finite element use
FORCESET
@ FORCESET
Definition: definitions.h:151
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
Range
MF_ZERO
@ MF_ZERO
Definition: definitions.h:98
MoFEM::CoreInterface::modify_finite_element_add_field_data
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string name_filed)=0
set finite element field data
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