v0.13.2
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
MetaSimpleRodElement Struct Reference

Set of functions declaring elements and setting operators for simple rod element. More...

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

Static Public Member Functions

static MoFEMErrorCode addSimpleRodElements (MoFEM::Interface &m_field, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
 Declare SimpleRod element. More...
 
static MoFEMErrorCode setSimpleRodOperators (MoFEM::Interface &m_field, boost::shared_ptr< EdgeElementForcesAndSourcesCore > fe_simple_rod_lhs_ptr, boost::shared_ptr< EdgeElementForcesAndSourcesCore > fe_simple_rod_rhs_ptr, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
 Implementation of SimpleRod element. Set operators to calculate LHS and RHS. More...
 

Detailed Description

Set of functions declaring elements and setting operators for simple rod element.

Definition at line 13 of file SimpleRodElement.hpp.

Member Function Documentation

◆ addSimpleRodElements()

MoFEMErrorCode MetaSimpleRodElement::addSimpleRodElements ( MoFEM::Interface m_field,
const std::string  field_name,
const std::string  mesh_nodals_positions = "MESH_NODE_POSITIONS" 
)
static

Declare SimpleRod element.

Search cubit sidesets and blockset ROD and declare volume element

Blockset has to have name "ROD". The first attribute of the blockset is Young's modulus.

Parameters
m_fieldInterface insurance
field_nameField name (e.g. SPATIAL_POSITION)
mesh_nodals_positionsName of field on which ho-geometry is defined
Returns
Error code
Examples
elasticity.cpp.

Definition at line 270 of file SimpleRodElement.cpp.

272 {
274
275 // Define boundary element that operates on rows, columns and data of a
276 // given field
277 CHKERR m_field.add_finite_element("SIMPLE_ROD", MF_ZERO);
281 if (m_field.check_field(mesh_nodals_positions)) {
282 CHKERR m_field.modify_finite_element_add_field_data("SIMPLE_ROD",
283 mesh_nodals_positions);
284 }
285 // Add entities to that element, here we add all eDges with ROD
286 // from cubit
288 if (bit->getName().compare(0, 3, "ROD") == 0) {
289 CHKERR m_field.add_ents_to_finite_element_by_type(bit->getMeshset(),
290 MBEDGE, "SIMPLE_ROD");
291 }
292 }
293 CHKERR m_field.build_finite_elements("SIMPLE_ROD");
294
296}
@ MF_ZERO
Definition: definitions.h:98
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
@ BLOCKSET
Definition: definitions.h:148
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
virtual MoFEMErrorCode build_finite_elements(int verb=DEFAULT_VERBOSITY)=0
Build finite elements.
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
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
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string name_filed)=0
set finite element field data
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
virtual bool check_field(const std::string &name) const =0
check if field is in database
#define _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet having a particular BC meshset in a moFEM field.
auto bit
set bit
constexpr auto field_name

◆ setSimpleRodOperators()

MoFEMErrorCode MetaSimpleRodElement::setSimpleRodOperators ( MoFEM::Interface m_field,
boost::shared_ptr< EdgeElementForcesAndSourcesCore fe_simple_rod_lhs_ptr,
boost::shared_ptr< EdgeElementForcesAndSourcesCore fe_simple_rod_rhs_ptr,
const std::string  field_name,
const std::string  mesh_nodals_positions = "MESH_NODE_POSITIONS" 
)
static

Implementation of SimpleRod element. Set operators to calculate LHS and RHS.

Parameters
m_fieldInterface insurance
fe_simple_rod_lhs_ptrPointer to the FE instance for LHS
fe_simple_rod_rhs_ptrPointer to the FE instance for RHS
field_nameField name (e.g. SPATIAL_POSITION)
mesh_nodals_positionsName of field on which ho-geometry is defined
Returns
Error code
Examples
elasticity.cpp.

Definition at line 298 of file SimpleRodElement.cpp.

304 {
306
307 // Push operators to instances for SimpleRod elements
308 // loop over blocks
309 boost::shared_ptr<DataAtIntegrationPtsSimpleRods> commonDataPtr =
310 boost::make_shared<DataAtIntegrationPtsSimpleRods>(m_field);
311 CHKERR commonDataPtr->getParameters();
312
313 for (auto &sitSimpleRod : commonDataPtr->mapSimpleRod) {
314 fe_simple_rod_lhs_ptr->getOpPtrVector().push_back(
315 new OpSimpleRodK(commonDataPtr, sitSimpleRod.second, field_name));
316
317 fe_simple_rod_rhs_ptr->getOpPtrVector().push_back(new OpSimpleRodPreStress(
318 commonDataPtr, sitSimpleRod.second, field_name));
319 }
320
322}
Assemble contribution of SimpleRod element to LHS *.
Add ROD pre-stress to the RHS *.

The documentation for this struct was generated from the following files: