v0.10.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)
 Set integration point operators. More...
 

Detailed Description

Definition at line 71 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 
)
static

Add element taking information from NODESET.

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

Definition at line 74 of file EdgeForce.hpp.

76  {
78  CHKERR m_field.add_finite_element("FORCE_FE", MF_ZERO);
79  CHKERR m_field.modify_finite_element_add_field_row("FORCE_FE", field_name);
80  CHKERR m_field.modify_finite_element_add_field_col("FORCE_FE", field_name);
81  CHKERR m_field.modify_finite_element_add_field_data("FORCE_FE", field_name);
82  if (m_field.check_field("MESH_NODE_POSITIONS")) {
84  "FORCE_FE", "MESH_NODE_POSITIONS");
85  }
87  it)) {
88  Range tris;
89  CHKERR m_field.get_moab().get_entities_by_type(it->meshset, MBTRI, tris,
90  true);
91  Range edges;
92  CHKERR m_field.get_moab().get_entities_by_type(it->meshset, MBEDGE, edges,
93  true);
94  Range tris_edges;
95  CHKERR m_field.get_moab().get_adjacencies(tris, 1, false, tris_edges,
96  moab::Interface::UNION);
97  edges = subtract(edges, tris_edges);
98  if (intersect_ptr) {
99  edges = intersect(edges, *intersect_ptr);
100  }
101  CHKERR m_field.add_ents_to_finite_element_by_type(edges, MBEDGE,
102  "FORCE_FE");
103  }
105  }

◆ setOperators()

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

Set integration point operators.

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

Definition at line 109 of file EdgeForce.hpp.

111  {
113  string fe_name = "FORCE_FE";
114  edge_forces.insert(fe_name, new EdgeForce(m_field));
116  it)) {
117  CHKERR edge_forces.at(fe_name).addForce(field_name, F,
118  it->getMeshsetId());
119  }
121  }

The documentation for this struct was generated from the following file:
EdgeForce
Force on edges and lines.
Definition: EdgeForce.hpp:25
_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:69
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
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
NODESET
@ NODESET
Definition: definitions.h:215
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:604
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
FORCESET
@ FORCESET
Definition: definitions.h:220
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::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
MoFEM::CoreInterface::check_field
virtual bool check_field(const std::string &name) const =0
check if field is in database
MF_ZERO
@ MF_ZERO
Definition: definitions.h:189
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:485
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:415