v0.14.0
Public Member Functions | Private Attributes | List of all members
HenckyOps::OpCalculatePiolaStressImpl< DIM, GAUSS, DomainEleOp, S > Struct Template Reference

#include <tutorials/vec-2/src/HenckyOps.hpp>

Inheritance diagram for HenckyOps::OpCalculatePiolaStressImpl< DIM, GAUSS, DomainEleOp, S >:
[legend]
Collaboration diagram for HenckyOps::OpCalculatePiolaStressImpl< DIM, GAUSS, DomainEleOp, S >:
[legend]

Public Member Functions

 OpCalculatePiolaStressImpl (const std::string field_name, boost::shared_ptr< CommonData > common_data)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Private Attributes

boost::shared_ptr< CommonDatacommonDataPtr
 

Detailed Description

template<int DIM, typename DomainEleOp, int S>
struct HenckyOps::OpCalculatePiolaStressImpl< DIM, GAUSS, DomainEleOp, S >

Definition at line 407 of file HenckyOps.hpp.

Constructor & Destructor Documentation

◆ OpCalculatePiolaStressImpl()

template<int DIM, typename DomainEleOp , int S>
HenckyOps::OpCalculatePiolaStressImpl< DIM, GAUSS, DomainEleOp, S >::OpCalculatePiolaStressImpl ( const std::string  field_name,
boost::shared_ptr< CommonData common_data 
)
inline

Definition at line 410 of file HenckyOps.hpp.

412  : DomainEleOp(field_name, DomainEleOp::OPROW),
413  commonDataPtr(common_data) {
414  std::fill(&DomainEleOp::doEntities[MBEDGE],
415  &DomainEleOp::doEntities[MBMAXTYPE], false);
416  }

Member Function Documentation

◆ doWork()

template<int DIM, typename DomainEleOp , int S>
MoFEMErrorCode HenckyOps::OpCalculatePiolaStressImpl< DIM, GAUSS, DomainEleOp, S >::doWork ( int  side,
EntityType  type,
EntData data 
)
inline

Definition at line 418 of file HenckyOps.hpp.

418  {
420 
425 
426  constexpr auto t_kd = FTensor::Kronecker_Delta<int>();
427 
428  // const size_t nb_gauss_pts = matGradPtr->size2();
429  const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
430  #ifdef HENCKY_SMALL_STRAIN
431  auto t_D = getFTensor4DdgFromMat<DIM, DIM, S>(*commonDataPtr->matDPtr);
432  #endif
433  auto t_logC = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matLogC);
434  auto t_logC_dC = getFTensor4DdgFromMat<DIM, DIM>(commonDataPtr->matLogCdC);
435  constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
436  commonDataPtr->matFirstPiolaStress.resize(DIM * DIM, nb_gauss_pts, false);
437  commonDataPtr->matSecondPiolaStress.resize(size_symm, nb_gauss_pts, false);
438  auto t_P = getFTensor2FromMat<DIM, DIM>(commonDataPtr->matFirstPiolaStress);
439  auto t_T = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matHenckyStress);
440  auto t_S =
441  getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matSecondPiolaStress);
442  auto t_grad = getFTensor2FromMat<DIM, DIM>(*(commonDataPtr->matGradPtr));
443 
444  for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
445 
446 #ifdef HENCKY_SMALL_STRAIN
447  t_P(i, j) = t_D(i, j, k, l) * t_grad(k, l);
448 #else
450  t_F(i, j) = t_grad(i, j) + t_kd(i, j);
451  t_S(k, l) = t_T(i, j) * t_logC_dC(i, j, k, l);
452  t_P(i, l) = t_F(i, k) * t_S(k, l);
453 #endif
454 
455  ++t_grad;
456  ++t_logC;
457  ++t_logC_dC;
458  ++t_P;
459  ++t_T;
460  ++t_S;
461 #ifdef HENCKY_SMALL_STRAIN
462  ++t_D;
463 #endif
464  }
465 
467  }

Member Data Documentation

◆ commonDataPtr

template<int DIM, typename DomainEleOp , int S>
boost::shared_ptr<CommonData> HenckyOps::OpCalculatePiolaStressImpl< DIM, GAUSS, DomainEleOp, S >::commonDataPtr
private

Definition at line 470 of file HenckyOps.hpp.


The documentation for this struct was generated from the following file:
HenckyOps::OpCalculatePiolaStressImpl< DIM, GAUSS, DomainEleOp, S >::commonDataPtr
boost::shared_ptr< CommonData > commonDataPtr
Definition: HenckyOps.hpp:470
FTensor::Kronecker_Delta
Kronecker Delta class.
Definition: Kronecker_Delta.hpp:15
FTensor::Tensor2
Definition: Tensor2_value.hpp:16
DomainEleOp
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
Definition: child_and_parent.cpp:36
size_symm
constexpr auto size_symm
Definition: plastic.cpp:42
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
t_kd
constexpr auto t_kd
Definition: free_surface.cpp:137
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
FTensor::Index< 'i', DIM >
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21