v0.14.0
Public Member Functions | Public Attributes | List of all members
MetaSpringBC::OpCalculateDeformation Struct Reference

Operator for computing deformation gradients in side volumes. More...

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

Inheritance diagram for MetaSpringBC::OpCalculateDeformation:
[legend]
Collaboration diagram for MetaSpringBC::OpCalculateDeformation:
[legend]

Public Member Functions

MoFEMErrorCode doWork (int side, EntityType type, EntData &row_data)
 
 OpCalculateDeformation (const string field_name, boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > common_data_ptr, bool ho_geometry=false)
 

Public Attributes

boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSpringscommonDataPtr
 
bool hoGeometry
 

Detailed Description

Operator for computing deformation gradients in side volumes.

Definition at line 679 of file SpringElement.hpp.

Constructor & Destructor Documentation

◆ OpCalculateDeformation()

MetaSpringBC::OpCalculateDeformation::OpCalculateDeformation ( const string  field_name,
boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings common_data_ptr,
bool  ho_geometry = false 
)
inline

Definition at line 689 of file SpringElement.hpp.

696  commonDataPtr(common_data_ptr), hoGeometry(ho_geometry) {
697  doEdges = false;
698  doQuads = false;
699  doTris = false;
700  doTets = false;
701  doPrisms = false;
702  sYmm = false;
703  };

Member Function Documentation

◆ doWork()

MoFEMErrorCode MetaSpringBC::OpCalculateDeformation::doWork ( int  side,
EntityType  type,
EntData row_data 
)

Definition at line 846 of file SpringElement.cpp.

848  {
849 
854 
855  // get number of integration points
856  const int nb_integration_pts = getGaussPts().size2();
857 
858  auto t_h = getFTensor2FromMat<3, 3>(*commonDataPtr->hMat);
859  auto t_H = getFTensor2FromMat<3, 3>(*commonDataPtr->HMat);
860 
861  commonDataPtr->detHVec->resize(nb_integration_pts, false);
862  commonDataPtr->invHMat->resize(9, nb_integration_pts, false);
863  commonDataPtr->FMat->resize(9, nb_integration_pts, false);
864 
865  commonDataPtr->detHVec->clear();
866  commonDataPtr->invHMat->clear();
867  commonDataPtr->FMat->clear();
868 
869  auto t_detH = getFTensor0FromVec(*commonDataPtr->detHVec);
870  auto t_invH = getFTensor2FromMat<3, 3>(*commonDataPtr->invHMat);
871  auto t_F = getFTensor2FromMat<3, 3>(*commonDataPtr->FMat);
872 
873  for (int gg = 0; gg != nb_integration_pts; ++gg) {
874  CHKERR determinantTensor3by3(t_H, t_detH);
875  CHKERR invertTensor3by3(t_H, t_detH, t_invH);
876  t_F(i, j) = t_h(i, k) * t_invH(k, j);
877  ++t_h;
878  ++t_H;
879  ++t_detH;
880  ++t_invH;
881  ++t_F;
882  }
883 
885 }

Member Data Documentation

◆ commonDataPtr

boost::shared_ptr<MetaSpringBC::DataAtIntegrationPtsSprings> MetaSpringBC::OpCalculateDeformation::commonDataPtr

Definition at line 683 of file SpringElement.hpp.

◆ hoGeometry

bool MetaSpringBC::OpCalculateDeformation::hoGeometry

Definition at line 685 of file SpringElement.hpp.


The documentation for this struct was generated from the following files:
MetaSpringBC::OpCalculateDeformation::commonDataPtr
boost::shared_ptr< MetaSpringBC::DataAtIntegrationPtsSprings > commonDataPtr
Definition: SpringElement.hpp:683
MoFEM::invertTensor3by3
MoFEMErrorCode invertTensor3by3(ublas::matrix< T, L, A > &jac_data, ublas::vector< T, A > &det_data, ublas::matrix< T, L, A > &inv_jac_data)
Calculate inverse of tensor rank 2 at integration points.
Definition: Templates.hpp:1588
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::getFTensor0FromVec
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FTensor::Index< 'i', 3 >
MoFEM::determinantTensor3by3
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
Definition: Templates.hpp:1540
UserDataOperator
ForcesAndSourcesCore::UserDataOperator UserDataOperator
Definition: HookeElement.hpp:75
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
MetaSpringBC::OpCalculateDeformation::hoGeometry
bool hoGeometry
Definition: SpringElement.hpp:685
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
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
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROW
@ OPROW
operator doWork function is executed on FE rows
Definition: ForcesAndSourcesCore.hpp:567