v0.14.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
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< MatrixDouble > firstPiolaPtr
 
boost::shared_ptr< MatrixDouble > defGradPtr
 

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 168 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

Definition at line 169 of file dynamic_first_order_con_law.cpp.

173 : ForcesAndSourcesCore::UserDataOperator(NOSPACE, OPLAST),
174 shearModulus(shear_modulus), bulkModulus(bulk_modulus), mU(m_u),
175 lammeLambda(lambda_lamme), firstPiolaPtr(first_piola_ptr),
176 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 178 of file dynamic_first_order_con_law.cpp.

179 {
181 // Define Indicies
185
186 // Define Kronecker Delta
187 constexpr auto t_kd = FTensor::Kronecker_Delta<double>();
188
189 // Number of Gauss points
190 const size_t nb_gauss_pts = getGaussPts().size2();
191
192 // Resize Piola
193 firstPiolaPtr->resize(DIM_0 * DIM_1, nb_gauss_pts, false); // ignatios check
194 firstPiolaPtr->clear();
195
196 // Extract matrix from data matrix
197 auto t_P = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(*firstPiolaPtr);
198 auto t_F = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(*defGradPtr);
199 const double two_o_three = 2. / 3.;
200 const double trace_t_dk = DIM_0;
201 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
202
203 t_P(i, j) = shearModulus * (t_F(i, j) + t_F(j, i) - 2. * t_kd(i, j) -
204 two_o_three * trace(t_F) * t_kd(i, j) +
205 two_o_three * trace_t_dk * t_kd(i, j)) +
206 bulkModulus * trace(t_F) * t_kd(i, j) -
207 bulkModulus * trace_t_dk * t_kd(i, j);
208
209 ++t_F;
210 ++t_P;
211 }
212
214 }
Kronecker Delta class.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
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

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: