v0.15.0
Loading...
Searching...
No Matches
OpCalculatePiola< DIM_0, DIM_1 > Struct Template Reference
Inheritance diagram for OpCalculatePiola< DIM_0, DIM_1 >:
[legend]
Collaboration diagram for OpCalculatePiola< DIM_0, DIM_1 >:
[legend]

Public Member Functions

 OpCalculatePiola (double shear_modulus, double bulk_modulus, double m_u, double lambda_lamme, boost::shared_ptr< MatrixDouble > first_piola_ptr, boost::shared_ptr< MatrixDouble > def_grad_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 

Private Attributes

double shearModulus
 
double bulkModulus
 
double mU
 
double lammeLambda
 
boost::shared_ptr< MatrixDoublefirstPiolaPtr
 
boost::shared_ptr< MatrixDoubledefGradPtr
 

Detailed Description

template<int DIM_0, int DIM_1>
struct OpCalculatePiola< DIM_0, DIM_1 >
Examples
dynamic_first_order_con_law.cpp.

Definition at line 167 of file dynamic_first_order_con_law.cpp.

Constructor & Destructor Documentation

◆ OpCalculatePiola()

template<int DIM_0, int DIM_1>
OpCalculatePiola< DIM_0, DIM_1 >::OpCalculatePiola ( double shear_modulus,
double bulk_modulus,
double m_u,
double lambda_lamme,
boost::shared_ptr< MatrixDouble > first_piola_ptr,
boost::shared_ptr< MatrixDouble > def_grad_ptr )
inline
Examples
dynamic_first_order_con_law.cpp.

Definition at line 168 of file dynamic_first_order_con_law.cpp.

172 : ForcesAndSourcesCore::UserDataOperator(NOSPACE, OPLAST),
173 shearModulus(shear_modulus), bulkModulus(bulk_modulus), mU(m_u),
174 lammeLambda(lambda_lamme), firstPiolaPtr(first_piola_ptr),
175 defGradPtr(def_grad_ptr) {}
@ NOSPACE
Definition definitions.h:83
boost::shared_ptr< MatrixDouble > defGradPtr
boost::shared_ptr< MatrixDouble > firstPiolaPtr

Member Function Documentation

◆ doWork()

template<int DIM_0, int DIM_1>
MoFEMErrorCode OpCalculatePiola< DIM_0, DIM_1 >::doWork ( int side,
EntityType type,
DataForcesAndSourcesCore::EntData & data )
inline
Examples
dynamic_first_order_con_law.cpp.

Definition at line 177 of file dynamic_first_order_con_law.cpp.

178 {
180 // Define Indicies
184
185 // Define Kronecker Delta
186 constexpr auto t_kd = FTensor::Kronecker_Delta<double>();
187
188 // Number of Gauss points
189 const size_t nb_gauss_pts = getGaussPts().size2();
190
191 // Resize Piola
192 firstPiolaPtr->resize(DIM_0 * DIM_1, nb_gauss_pts, false); // ignatios check
193 firstPiolaPtr->clear();
194
195 // Extract matrix from data matrix
198 const double two_o_three = 2. / 3.;
199 const double trace_t_dk = DIM_0;
200 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
201
202 t_P(i, j) = shearModulus * (t_F(i, j) + t_F(j, i) - 2. * t_kd(i, j) -
203 two_o_three * trace(t_F) * t_kd(i, j) +
204 two_o_three * trace_t_dk * t_kd(i, j)) +
205 bulkModulus * trace(t_F) * t_kd(i, j) -
206 bulkModulus * trace_t_dk * t_kd(i, j);
207
208 ++t_F;
209 ++t_P;
210 }
211
213 }
Kronecker Delta class.
#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 int SPACE_DIM
double trace(FTensor::Tensor2< T, 2, 2 > &t_stress)
constexpr auto t_kd
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, Tensor_Dim1, Tensor_Dim2 > getFTensor2FromMat(MatrixDouble &data)
Get tensor rank 2 (matrix) form data matrix.

Member Data Documentation

◆ bulkModulus

template<int DIM_0, int DIM_1>
double OpCalculatePiola< DIM_0, DIM_1 >::bulkModulus
private

◆ defGradPtr

template<int DIM_0, int DIM_1>
boost::shared_ptr<MatrixDouble> OpCalculatePiola< DIM_0, DIM_1 >::defGradPtr
private

◆ firstPiolaPtr

template<int DIM_0, int DIM_1>
boost::shared_ptr<MatrixDouble> OpCalculatePiola< DIM_0, DIM_1 >::firstPiolaPtr
private

◆ lammeLambda

template<int DIM_0, int DIM_1>
double OpCalculatePiola< DIM_0, DIM_1 >::lammeLambda
private

◆ mU

template<int DIM_0, int DIM_1>
double OpCalculatePiola< DIM_0, DIM_1 >::mU
private

◆ shearModulus

template<int DIM_0, int DIM_1>
double OpCalculatePiola< DIM_0, DIM_1 >::shearModulus
private

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