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

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

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

Public Member Functions

 OpCalculateHenckyPlasticStressImpl (const std::string field_name, boost::shared_ptr< CommonData > common_data, boost::shared_ptr< MatrixDouble > mat_D_ptr, const double scale=1)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 
 OpCalculateHenckyPlasticStressImpl (const std::string field_name, boost::shared_ptr< CommonData > common_data, boost::shared_ptr< MatrixDouble > mat_D_ptr, const double scale=1)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Private Attributes

boost::shared_ptr< CommonDatacommonDataPtr
 
boost::shared_ptr< MatrixDouble > matDPtr
 
boost::shared_ptr< MatrixDouble > matLogCPlastic
 
const double scaleStress
 

Detailed Description

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

Definition at line 420 of file HenckyOps.hpp.

Constructor & Destructor Documentation

◆ OpCalculateHenckyPlasticStressImpl() [1/2]

template<int DIM, typename DomainEleOp , int S>
HenckyOps::OpCalculateHenckyPlasticStressImpl< DIM, GAUSS, DomainEleOp, S >::OpCalculateHenckyPlasticStressImpl ( const std::string  field_name,
boost::shared_ptr< CommonData common_data,
boost::shared_ptr< MatrixDouble >  mat_D_ptr,
const double  scale = 1 
)
inline

Definition at line 423 of file HenckyOps.hpp.

427 : DomainEleOp(field_name, DomainEleOp::OPROW), commonDataPtr(common_data),
428 scaleStress(scale), matDPtr(mat_D_ptr) {
429 std::fill(&DomainEleOp::doEntities[MBEDGE],
430 &DomainEleOp::doEntities[MBMAXTYPE], false);
431
432 matLogCPlastic = commonDataPtr->matLogCPlastic;
433 }
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
constexpr auto field_name
double scale
Definition plastic.cpp:124

◆ OpCalculateHenckyPlasticStressImpl() [2/2]

template<int DIM, typename DomainEleOp , int S>
HenckyOps::OpCalculateHenckyPlasticStressImpl< DIM, GAUSS, DomainEleOp, S >::OpCalculateHenckyPlasticStressImpl ( const std::string  field_name,
boost::shared_ptr< CommonData common_data,
boost::shared_ptr< MatrixDouble >  mat_D_ptr,
const double  scale = 1 
)
inline

Definition at line 433 of file HenckyOps.hpp.

437 : DomainEleOp(field_name, DomainEleOp::OPROW), commonDataPtr(common_data),
438 scaleStress(scale), matDPtr(mat_D_ptr) {
439 std::fill(&DomainEleOp::doEntities[MBEDGE],
440 &DomainEleOp::doEntities[MBMAXTYPE], false);
441
442 matLogCPlastic = commonDataPtr->matLogCPlastic;
443 }

Member Function Documentation

◆ doWork() [1/2]

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

Definition at line 435 of file HenckyOps.hpp.

435 {
437
438 FTensor::Index<'i', DIM> i;
439 FTensor::Index<'j', DIM> j;
440 FTensor::Index<'k', DIM> k;
441 FTensor::Index<'l', DIM> l;
442
443 // const size_t nb_gauss_pts = matGradPtr->size2();
444 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
445 auto t_D = getFTensor4DdgFromMat<DIM, DIM, S>(*matDPtr);
446 auto t_logC = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matLogC);
447 auto t_logCPlastic = getFTensor2SymmetricFromMat<DIM>(*matLogCPlastic);
448 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
449 commonDataPtr->matHenckyStress.resize(nb_gauss_pts, size_symm, false);
450 auto t_T = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matHenckyStress);
451
452 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
453 t_T(i, j) = t_D(i, j, k, l) * (t_logC(k, l) - t_logCPlastic(k, l));
454 t_T(i, j) /= scaleStress;
455 ++t_logC;
456 ++t_T;
457 ++t_D;
458 ++t_logCPlastic;
459 }
460
462 }
#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

◆ doWork() [2/2]

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

Definition at line 445 of file HenckyOps.hpp.

445 {
447
448 FTensor::Index<'i', DIM> i;
449 FTensor::Index<'j', DIM> j;
450 FTensor::Index<'k', DIM> k;
451 FTensor::Index<'l', DIM> l;
452
453 // const size_t nb_gauss_pts = matGradPtr->size2();
454 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
455 auto t_D = getFTensor4DdgFromMat<DIM, DIM, S, HenckyTensorLayout<S>>(
456 *matDPtr);
457 auto t_logC = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matLogC);
458 auto t_logCPlastic = getFTensor2SymmetricFromMat<DIM>(*matLogCPlastic);
459 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
460 commonDataPtr->matHenckyStress.resize(size_symm, nb_gauss_pts, false);
461 auto t_T = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matHenckyStress);
462
463 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
464 t_T(i, j) = t_D(i, j, k, l) * (t_logC(k, l) - t_logCPlastic(k, l));
465 t_T(i, j) /= scaleStress;
466 ++t_logC;
467 ++t_T;
468 ++t_D;
469 ++t_logCPlastic;
470 }
471
473 }

Member Data Documentation

◆ commonDataPtr

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

Definition at line 465 of file HenckyOps.hpp.

◆ matDPtr

template<int DIM, typename DomainEleOp , int S>
boost::shared_ptr< MatrixDouble > HenckyOps::OpCalculateHenckyPlasticStressImpl< DIM, GAUSS, DomainEleOp, S >::matDPtr
private

Definition at line 466 of file HenckyOps.hpp.

◆ matLogCPlastic

template<int DIM, typename DomainEleOp , int S>
boost::shared_ptr< MatrixDouble > HenckyOps::OpCalculateHenckyPlasticStressImpl< DIM, GAUSS, DomainEleOp, S >::matLogCPlastic
private

Definition at line 467 of file HenckyOps.hpp.

◆ scaleStress

template<int DIM, typename DomainEleOp , int S>
const double HenckyOps::OpCalculateHenckyPlasticStressImpl< DIM, GAUSS, DomainEleOp, S >::scaleStress
private

Definition at line 468 of file HenckyOps.hpp.


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