v0.16.3
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
HenckyOps::OpCalculateHenckyStressImpl< DIM, GAUSS, DomainEleOp, S > Struct Template Reference

[Hencky Stress] More...

#include "tutorials/vec-2_nonlinear_elasticity/src/HenckyOps.hpp"

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

Public Member Functions

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

Private Attributes

boost::shared_ptr< CommonData > commonDataPtr
 

Detailed Description

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

[Hencky Stress]

Definition at line 258 of file HenckyOps.hpp.

Constructor & Destructor Documentation

◆ OpCalculateHenckyStressImpl()

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

Definition at line 261 of file HenckyOps.hpp.

263 : DomainEleOp(field_name, DomainEleOp::OPROW),
264 commonDataPtr(common_data) {
265 std::fill(&DomainEleOp::doEntities[MBEDGE],
266 &DomainEleOp::doEntities[MBMAXTYPE], false);
267 }
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
constexpr auto field_name

Member Function Documentation

◆ doWork()

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

Definition at line 269 of file HenckyOps.hpp.

269 {
271
272 FTensor::Index<'i', DIM> i;
273 FTensor::Index<'j', DIM> j;
274 FTensor::Index<'k', DIM> k;
275 FTensor::Index<'l', DIM> l;
276
277 // const size_t nb_gauss_pts = matGradPtr->size2();
278 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
279 auto t_D = getFTensor4DdgFromMat<DIM, DIM, S>(*commonDataPtr->matDPtr);
280 auto t_logC = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matLogC);
281 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
282 commonDataPtr->matHenckyStress.resize(nb_gauss_pts, size_symm, false);
283 auto t_T = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matHenckyStress);
284
285 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
286 t_T(i, j) = t_D(i, j, k, l) * t_logC(k, l);
287 ++t_logC;
288 ++t_T;
289 ++t_D;
290 }
291
293 }
#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()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
constexpr auto size_symm
Definition plastic.cpp:42

Member Data Documentation

◆ commonDataPtr

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

Definition at line 296 of file HenckyOps.hpp.


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