v0.15.0
Loading...
Searching...
No Matches
OpCalculateLameStress< DIM > Struct Template Reference
Inheritance diagram for OpCalculateLameStress< DIM >:
[legend]
Collaboration diagram for OpCalculateLameStress< DIM >:
[legend]

Public Member Functions

 OpCalculateLameStress (double m_u, boost::shared_ptr< MatrixDouble > stress_ptr, boost::shared_ptr< MatrixDouble > strain_ptr, boost::shared_ptr< VectorDouble > pressure_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 

Private Attributes

double mU
 
boost::shared_ptr< MatrixDoublestressPtr
 
boost::shared_ptr< MatrixDoublestrainPtr
 
boost::shared_ptr< VectorDoublepressurePtr
 

Detailed Description

template<int DIM>
struct OpCalculateLameStress< DIM >

Definition at line 208 of file incompressible_elasticity.cpp.

Constructor & Destructor Documentation

◆ OpCalculateLameStress()

template<int DIM>
OpCalculateLameStress< DIM >::OpCalculateLameStress ( double m_u,
boost::shared_ptr< MatrixDouble > stress_ptr,
boost::shared_ptr< MatrixDouble > strain_ptr,
boost::shared_ptr< VectorDouble > pressure_ptr )
inline

Definition at line 209 of file incompressible_elasticity.cpp.

212 : ForcesAndSourcesCore::UserDataOperator(NOSPACE, OPLAST), mU(m_u),
213 stressPtr(stress_ptr), strainPtr(strain_ptr),
214 pressurePtr(pressure_ptr) {}
@ NOSPACE
Definition definitions.h:83
boost::shared_ptr< MatrixDouble > stressPtr
boost::shared_ptr< VectorDouble > pressurePtr
boost::shared_ptr< MatrixDouble > strainPtr

Member Function Documentation

◆ doWork()

template<int DIM>
MoFEMErrorCode OpCalculateLameStress< DIM >::doWork ( int side,
EntityType type,
EntitiesFieldData::EntData & data )
inline

Definition at line 216 of file incompressible_elasticity.cpp.

217 {
219 // Define Indicies
222
223 // Define Kronecker Delta
225
226 // Number of Gauss points
227 const size_t nb_gauss_pts = getGaussPts().size2();
228
229 stressPtr->resize((DIM * (DIM + 1)) / 2, nb_gauss_pts);
232 auto t_pressure = getFTensor0FromVec(*(pressurePtr));
233
234 const double l_mu = mU;
235 // Extract matrix from data matrix
236 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
237
238 t_stress(i, j) = t_pressure * t_kd(i, j) + 2. * l_mu * t_strain(i, j);
239
240 ++t_strain;
241 ++t_stress;
242 ++t_pressure;
243 }
244
246 }
Kronecker Delta class symmetric.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
constexpr auto t_kd
FTensor::Index< 'i', SPACE_DIM > i
constexpr int SPACE_DIM
FTensor::Index< 'j', 3 > j
static auto getFTensor2SymmetricFromMat(ublas::matrix< T, L, A > &data)
Get symmetric tensor rank 2 (matrix) form data matrix.
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.

Member Data Documentation

◆ mU

template<int DIM>
double OpCalculateLameStress< DIM >::mU
private

Definition at line 249 of file incompressible_elasticity.cpp.

◆ pressurePtr

template<int DIM>
boost::shared_ptr<VectorDouble> OpCalculateLameStress< DIM >::pressurePtr
private

Definition at line 252 of file incompressible_elasticity.cpp.

◆ strainPtr

template<int DIM>
boost::shared_ptr<MatrixDouble> OpCalculateLameStress< DIM >::strainPtr
private

Definition at line 251 of file incompressible_elasticity.cpp.

◆ stressPtr

template<int DIM>
boost::shared_ptr<MatrixDouble> OpCalculateLameStress< DIM >::stressPtr
private

Definition at line 250 of file incompressible_elasticity.cpp.


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