v0.16.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
OpCalculateDeformationGradient< DIM_0, DIM_1 > Struct Template Reference
Inheritance diagram for OpCalculateDeformationGradient< DIM_0, DIM_1 >:
[legend]
Collaboration diagram for OpCalculateDeformationGradient< DIM_0, DIM_1 >:
[legend]

Public Member Functions

 OpCalculateDeformationGradient (boost::shared_ptr< MatrixDouble > def_grad_ptr, boost::shared_ptr< MatrixDouble > grad_tensor_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 

Private Attributes

boost::shared_ptr< MatrixDoublegradTensorPtr
 
boost::shared_ptr< MatrixDoubledefGradPtr
 

Detailed Description

template<int DIM_0, int DIM_1>
struct OpCalculateDeformationGradient< DIM_0, DIM_1 >
Examples
mofem/tutorials/adv-4_dynamic_first_order_con_law/dynamic_first_order_con_law.cpp.

Definition at line 335 of file dynamic_first_order_con_law.cpp.

Constructor & Destructor Documentation

◆ OpCalculateDeformationGradient()

template<int DIM_0, int DIM_1>
OpCalculateDeformationGradient< DIM_0, DIM_1 >::OpCalculateDeformationGradient ( boost::shared_ptr< MatrixDouble def_grad_ptr,
boost::shared_ptr< MatrixDouble grad_tensor_ptr 
)
inline

Definition at line 337 of file dynamic_first_order_con_law.cpp.

340 : ForcesAndSourcesCore::UserDataOperator(NOSPACE, OPLAST),
341 defGradPtr(def_grad_ptr), gradTensorPtr(grad_tensor_ptr) {}
@ NOSPACE
Definition definitions.h:83
boost::shared_ptr< MatrixDouble > defGradPtr
boost::shared_ptr< MatrixDouble > gradTensorPtr

Member Function Documentation

◆ doWork()

template<int DIM_0, int DIM_1>
MoFEMErrorCode OpCalculateDeformationGradient< DIM_0, DIM_1 >::doWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData &  data 
)
inline
Examples
mofem/tutorials/adv-4_dynamic_first_order_con_law/dynamic_first_order_con_law.cpp.

Definition at line 343 of file dynamic_first_order_con_law.cpp.

344 {
346 // Define Indicies
349
350 // Define Kronecker Delta
351 constexpr auto t_kd = FTensor::Kronecker_Delta<double>();
352
353 // Number of Gauss points
354 const size_t nb_gauss_pts = getGaussPts().size2();
355
356 // Resize Piola
357 defGradPtr->resize(nb_gauss_pts, DIM_0 * DIM_1, false);
358 defGradPtr->clear();
359
360 // Extract matrix from data matrix
361 auto t_F = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(*defGradPtr);
362 auto t_H = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(*gradTensorPtr);
363 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
364
365 t_F(i, j) = t_H(i, j) + t_kd(i, j);
366
367 ++t_F;
368 ++t_H;
369 }
370
372 }
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
constexpr auto t_kd
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j

Member Data Documentation

◆ defGradPtr

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

◆ gradTensorPtr

template<int DIM_0, int DIM_1>
boost::shared_ptr<MatrixDouble> OpCalculateDeformationGradient< DIM_0, DIM_1 >::gradTensorPtr
private

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