v0.15.0
Loading...
Searching...
No Matches
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.
 
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.
 

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 269 of file SimpleRodElement.cpp.

271 {
273
274 // Define boundary element that operates on rows, columns and data of a
275 // given field
276 CHKERR m_field.add_finite_element("SIMPLE_ROD", MF_ZERO);
280 if (m_field.check_field(mesh_nodals_positions)) {
281 CHKERR m_field.modify_finite_element_add_field_data("SIMPLE_ROD",
282 mesh_nodals_positions);
283 }
284 // Add entities to that element, here we add all eDges with ROD
285 // from cubit
287 if (bit->getName().compare(0, 3, "ROD") == 0) {
288 CHKERR m_field.add_ents_to_finite_element_by_type(bit->getMeshset(),
289 MBEDGE, "SIMPLE_ROD");
290 }
291 }
292 CHKERR m_field.build_finite_elements("SIMPLE_ROD");
293
295}
@ MF_ZERO
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ BLOCKSET
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
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_row(const std::string &fe_name, const std::string name_row)=0
set field row which finite element use
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string name_field)=0
set finite element field data
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 297 of file SimpleRodElement.cpp.

303 {
305
306 // Push operators to instances for SimpleRod elements
307 // loop over blocks
308 boost::shared_ptr<DataAtIntegrationPtsSimpleRods> commonDataPtr =
309 boost::make_shared<DataAtIntegrationPtsSimpleRods>(m_field);
310 CHKERR commonDataPtr->getParameters();
311
312 for (auto &sitSimpleRod : commonDataPtr->mapSimpleRod) {
313 fe_simple_rod_lhs_ptr->getOpPtrVector().push_back(
314 new OpSimpleRodK(commonDataPtr, sitSimpleRod.second, field_name));
315
316 fe_simple_rod_rhs_ptr->getOpPtrVector().push_back(new OpSimpleRodPreStress(
317 commonDataPtr, sitSimpleRod.second, field_name));
318 }
319
321}
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: