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

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

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, EdgeForce > &edge_forces, Vec F, const std::string field_name, std::string mesh_node_positions="MESH_NODE_POSITIONS")
 Set integration point operators. More...
 

Detailed Description

Definition at line 59 of file EdgeForce.hpp.

Member Function Documentation

◆ addElement()

static MoFEMErrorCode MetaEdgeForces::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 62 of file EdgeForce.hpp.

64  {
66  CHKERR m_field.add_finite_element("FORCE_FE", MF_ZERO);
70  if (m_field.check_field("MESH_NODE_POSITIONS")) {
72  "FORCE_FE", "MESH_NODE_POSITIONS");
73  }
75  it)) {
76  Range tris;
77  CHKERR m_field.get_moab().get_entities_by_type(it->meshset, MBTRI, tris,
78  true);
79  Range edges;
80  CHKERR m_field.get_moab().get_entities_by_type(it->meshset, MBEDGE, edges,
81  true);
82  Range tris_edges;
83  CHKERR m_field.get_moab().get_adjacencies(tris, 1, false, tris_edges,
84  moab::Interface::UNION);
85  edges = subtract(edges, tris_edges);
86  if (intersect_ptr) {
87  edges = intersect(edges, *intersect_ptr);
88  }
89  CHKERR m_field.add_ents_to_finite_element_by_type(edges, MBEDGE,
90  "FORCE_FE");
91  }
93  }

◆ setOperators()

static MoFEMErrorCode MetaEdgeForces::setOperators ( MoFEM::Interface m_field,
boost::ptr_map< std::string, EdgeForce > &  edge_forces,
Vec  F,
const std::string  field_name,
std::string  mesh_node_positions = "MESH_NODE_POSITIONS" 
)
inlinestatic

Set integration point operators.

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

Definition at line 97 of file EdgeForce.hpp.

100  {
102  string fe_name = "FORCE_FE";
103  edge_forces.insert(fe_name, new EdgeForce(m_field));
104  if (m_field.check_field(mesh_node_positions)) {
105  auto &fe = edge_forces.at(fe_name).getLoopFe();
106  auto field_ptr = m_field.get_field_structure(field_name);
107  const int nb_coefficients = field_ptr->getNbOfCoeffs();
108  if (nb_coefficients == 3) {
109  fe.getOpPtrVector().push_back(
110  new OpGetHOTangentsOnEdge<3>(mesh_node_positions));
111  }
112  else if (nb_coefficients == 2) {
113  fe.getOpPtrVector().push_back(
114  new OpGetHOTangentsOnEdge<2>(mesh_node_positions));
115  }
116  }
118  it)) {
119  CHKERR edge_forces.at(fe_name).addForce(field_name, F,
120  it->getMeshsetId());
121  }
123  }

The documentation for this struct was generated from the following file:
MoFEM::Field::getNbOfCoeffs
FieldCoefficientsNumber getNbOfCoeffs() const
Get number of field coefficients.
Definition: FieldMultiIndices.hpp:202
EdgeForce
Force on edges and lines.
Definition: EdgeForce.hpp:13
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
MoFEM::CoreInterface::get_field_structure
virtual const Field * get_field_structure(const std::string &name, enum MoFEMTypes bh=MF_EXIST) const =0
get field structure
_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
NODESET
@ NODESET
Definition: definitions.h:159
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:548
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:164
MoFEM::CoreInterface::check_field
virtual bool check_field(const std::string &name) const =0
check if field is in database
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_field)=0
set finite element field data
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
Range
MF_ZERO
@ MF_ZERO
Definition: definitions.h:111
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
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