v0.14.0
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
KelvinVoigtDamper Struct Reference

Implementation of Kelvin Voigt Damper. More...

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

Collaboration diagram for KelvinVoigtDamper:
[legend]

Classes

struct  AssembleMatrix
 
struct  AssembleVector
 
struct  BlockMaterialData
 Dumper material parameters. More...
 
struct  CommonData
 Common data for nonlinear_elastic_elem model. More...
 
struct  ConstitutiveEquation
 Constitutive model functions. More...
 
struct  DamperFE
 definition of volume element More...
 
struct  OpGetDataAtGaussPts
 
struct  OpJacobian
 
struct  OpLhsdxdot
 Assemble matrix. More...
 
struct  OpLhsdxdx
 Assemble matrix. More...
 
struct  OpRhsStress
 Assemble internal force vector. More...
 

Public Types

enum  TagEvaluate { DAMPERSTRESS }
 
typedef boost::ptr_map< int, KelvinVoigtDamper::ConstitutiveEquation< adouble > > ConstitutiveEquationMap
 

Public Member Functions

 KelvinVoigtDamper (MoFEM::Interface &m_field)
 
MoFEMErrorCode setBlockDataMap ()
 
MoFEMErrorCode setOperators (const int tag)
 

Public Attributes

MoFEM::InterfacemField
 
std::map< int, BlockMaterialDatablockMaterialDataMap
 
ConstitutiveEquationMap constitutiveEquationMap
 
CommonData commonData
 
DamperFE feRhs
 
DamperFE feLhs
 

Detailed Description

Implementation of Kelvin Voigt Damper.

Examples
nonlinear_dynamics.cpp.

Definition at line 20 of file KelvinVoigtDamper.hpp.

Member Typedef Documentation

◆ ConstitutiveEquationMap

Definition at line 163 of file KelvinVoigtDamper.hpp.

Member Enumeration Documentation

◆ TagEvaluate

Enumerator
DAMPERSTRESS 

Definition at line 22 of file KelvinVoigtDamper.hpp.

22 { DAMPERSTRESS };

Constructor & Destructor Documentation

◆ KelvinVoigtDamper()

KelvinVoigtDamper::KelvinVoigtDamper ( MoFEM::Interface m_field)
inline

Definition at line 249 of file KelvinVoigtDamper.hpp.

250  : mField(m_field), feRhs(m_field, commonData),
251  feLhs(m_field, commonData) {}

Member Function Documentation

◆ setBlockDataMap()

MoFEMErrorCode KelvinVoigtDamper::setBlockDataMap ( )
inline

Definition at line 792 of file KelvinVoigtDamper.hpp.

792  {
794 
796  if (it->getName().compare(0, 6, "DAMPER") == 0) {
797  std::vector<double> data;
798  CHKERR it->getAttributes(data);
799  if (data.size() < 2) {
800  SETERRQ(PETSC_COMM_SELF, 1, "Data inconsistency");
801  }
802  CHKERR mField.get_moab().get_entities_by_type(
803  it->meshset, MBTET, blockMaterialDataMap[it->getMeshsetId()].tEts,
804  true);
805  blockMaterialDataMap[it->getMeshsetId()].gBeta = data[0];
806  blockMaterialDataMap[it->getMeshsetId()].vBeta = data[1];
807  }
808  }
810  }

◆ setOperators()

MoFEMErrorCode KelvinVoigtDamper::setOperators ( const int  tag)
inline

Definition at line 812 of file KelvinVoigtDamper.hpp.

812  {
814 
815  for (auto &&fe_ptr : {&feRhs, &feLhs}) {
816  // CHKERR addHOOpsVol(commonData.meshNodePositionName, *fe_ptr, true, false,
817  // false, false);
818  fe_ptr->getOpPtrVector().push_back(
822  fe_ptr->getOpPtrVector().push_back(new OpGetDataAtGaussPts(
823  commonData.spatialPositionName, commonData, false, true, false));
824  fe_ptr->getOpPtrVector().push_back(
825  new OpCalculateVectorFieldGradientDot<3, 3>(
828  fe_ptr->getOpPtrVector().push_back(new OpGetDataAtGaussPts(
829  commonData.spatialPositionName, commonData, false, true, true));
830  }
831 
832  // attach tags for each recorder
833  std::vector<int> tags;
834  tags.push_back(tag);
835 
836  ConstitutiveEquationMap::iterator mit = constitutiveEquationMap.begin();
837  for (; mit != constitutiveEquationMap.end(); mit++) {
838  ConstitutiveEquation<adouble> &ce =
839  constitutiveEquationMap.at(mit->first);
840  // Right hand side operators
841  feRhs.getOpPtrVector().push_back(new OpJacobian(
842  commonData.spatialPositionName, tags, ce, commonData, true, false));
843  feRhs.getOpPtrVector().push_back(new OpRhsStress(commonData));
844 
845  // Left hand side operators
846  feLhs.getOpPtrVector().push_back(new OpJacobian(
847  commonData.spatialPositionName, tags, ce, commonData, false, true));
848  feLhs.getOpPtrVector().push_back(new OpLhsdxdx(commonData));
849  feLhs.getOpPtrVector().push_back(new OpLhsdxdot(commonData));
850  }
851 
853  }

Member Data Documentation

◆ blockMaterialDataMap

std::map<int, BlockMaterialData> KelvinVoigtDamper::blockMaterialDataMap

Definition at line 37 of file KelvinVoigtDamper.hpp.

◆ commonData

CommonData KelvinVoigtDamper::commonData

Definition at line 198 of file KelvinVoigtDamper.hpp.

◆ constitutiveEquationMap

ConstitutiveEquationMap KelvinVoigtDamper::constitutiveEquationMap

Definition at line 164 of file KelvinVoigtDamper.hpp.

◆ feLhs

DamperFE KelvinVoigtDamper::feLhs

Definition at line 247 of file KelvinVoigtDamper.hpp.

◆ feRhs

DamperFE KelvinVoigtDamper::feRhs

Definition at line 247 of file KelvinVoigtDamper.hpp.

◆ mField

MoFEM::Interface& KelvinVoigtDamper::mField

Definition at line 24 of file KelvinVoigtDamper.hpp.


The documentation for this struct was generated from the following file:
KelvinVoigtDamper::mField
MoFEM::Interface & mField
Definition: KelvinVoigtDamper.hpp:24
KelvinVoigtDamper::feLhs
DamperFE feLhs
Definition: KelvinVoigtDamper.hpp:247
KelvinVoigtDamper::CommonData::gradDataAtGaussTmpPtr
boost::shared_ptr< MatrixDouble > gradDataAtGaussTmpPtr
Definition: KelvinVoigtDamper.hpp:179
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
KelvinVoigtDamper::blockMaterialDataMap
std::map< int, BlockMaterialData > blockMaterialDataMap
Definition: KelvinVoigtDamper.hpp:37
KelvinVoigtDamper::DAMPERSTRESS
@ DAMPERSTRESS
Definition: KelvinVoigtDamper.hpp:22
_IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_
#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.
Definition: MeshsetsManager.hpp:71
KelvinVoigtDamper::feRhs
DamperFE feRhs
Definition: KelvinVoigtDamper.hpp:247
BLOCKSET
@ BLOCKSET
Definition: definitions.h:161
MoFEM::ForcesAndSourcesCore::getOpPtrVector
boost::ptr_deque< UserDataOperator > & getOpPtrVector()
Use to push back operator for row operator.
Definition: ForcesAndSourcesCore.hpp:83
KelvinVoigtDamper::CommonData::spatialPositionName
string spatialPositionName
Definition: KelvinVoigtDamper.hpp:171
KelvinVoigtDamper::constitutiveEquationMap
ConstitutiveEquationMap constitutiveEquationMap
Definition: KelvinVoigtDamper.hpp:164
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
OpCalculateVectorFieldGradient
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
KelvinVoigtDamper::commonData
CommonData commonData
Definition: KelvinVoigtDamper.hpp:198