v0.14.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< MatrixDouble > gradTensorPtr
 
boost::shared_ptr< MatrixDouble > defGradPtr
 

Detailed Description

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

Definition at line 339 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 341 of file dynamic_first_order_con_law.cpp.

344 : ForcesAndSourcesCore::UserDataOperator(NOSPACE, OPLAST),
345 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
dynamic_first_order_con_law.cpp.

Definition at line 347 of file dynamic_first_order_con_law.cpp.

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