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

#include "users_modules/multifield-thermoplasticity-private/tutorials/vec-2/src/HenckyOps.hpp"

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

Public Member Functions

 OpCalculateHenckyThermoPlasticStressImpl (const std::string field_name, boost::shared_ptr< VectorDouble > temperature, boost::shared_ptr< CommonData > common_data, boost::shared_ptr< VectorDouble > coeff_expansion_ptr, boost::shared_ptr< double > ref_temp_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Private Attributes

boost::shared_ptr< CommonDatacommonDataPtr
 
boost::shared_ptr< VectorDouble > tempPtr
 
boost::shared_ptr< MatrixDouble > matLogCPlastic
 
boost::shared_ptr< VectorDouble > coeffExpansionPtr
 
boost::shared_ptr< doublerefTempPtr
 

Detailed Description

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

Definition at line 491 of file HenckyOps.hpp.

Constructor & Destructor Documentation

◆ OpCalculateHenckyThermoPlasticStressImpl()

template<int DIM, typename DomainEleOp , int S>
HenckyOps::OpCalculateHenckyThermoPlasticStressImpl< DIM, GAUSS, DomainEleOp, S >::OpCalculateHenckyThermoPlasticStressImpl ( const std::string  field_name,
boost::shared_ptr< VectorDouble >  temperature,
boost::shared_ptr< CommonData common_data,
boost::shared_ptr< VectorDouble >  coeff_expansion_ptr,
boost::shared_ptr< double ref_temp_ptr 
)
inline

Definition at line 494 of file HenckyOps.hpp.

499 : DomainEleOp(field_name, DomainEleOp::OPROW), tempPtr(temperature),
500 commonDataPtr(common_data), coeffExpansionPtr(coeff_expansion_ptr),
501 refTempPtr(ref_temp_ptr) {
502 std::fill(&DomainEleOp::doEntities[MBEDGE],
503 &DomainEleOp::doEntities[MBMAXTYPE], false);
504
505 matLogCPlastic = commonDataPtr->matLogCPlastic;
506 }
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
constexpr auto field_name

Member Function Documentation

◆ doWork()

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

Definition at line 508 of file HenckyOps.hpp.

508 {
510
511 FTensor::Index<'i', DIM> i;
512 FTensor::Index<'j', DIM> j;
513 FTensor::Index<'k', DIM> k;
514 FTensor::Index<'l', DIM> l;
515
516 constexpr auto t_kd = FTensor::Kronecker_Delta<double>();
517
518 // const size_t nb_gauss_pts = matGradPtr->size2();
519 const size_t nb_gauss_pts = DomainEleOp::getGaussPts().size2();
520 auto t_D =
521 getFTensor4DdgFromMat<DIM, DIM, S,
522 DataLayoutTraits<DataLayout::GaussByCoeffs>>(
523 *commonDataPtr->matDPtr);
524 auto t_logC = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matLogC);
525 auto t_logC_dC = getFTensor4DdgFromMat<DIM, DIM>(commonDataPtr->matLogCdC);
526 auto t_logCPlastic = getFTensor2SymmetricFromMat<DIM>(*matLogCPlastic);
527 constexpr auto size_symm = (DIM * (DIM + 1)) / 2;
528 commonDataPtr->matHenckyStress.resize(size_symm, nb_gauss_pts, false);
529 commonDataPtr->matFirstPiolaStress.resize(DIM * DIM, nb_gauss_pts, false);
530 commonDataPtr->matSecondPiolaStress.resize(size_symm, nb_gauss_pts, false);
531 auto t_T = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matHenckyStress);
532 auto t_P = getFTensor2FromMat<DIM, DIM>(commonDataPtr->matFirstPiolaStress);
533 auto t_S =
534 getFTensor2SymmetricFromMat<DIM>(commonDataPtr->matSecondPiolaStress);
535 auto t_grad = getFTensor2FromMat<DIM, DIM>(*(commonDataPtr->matGradPtr));
536 auto t_temp = getFTensor0FromVec(*tempPtr);
537
539 t_coeff_exp(i, j) = 0;
540 for (auto d = 0; d != SPACE_DIM; ++d) {
541 t_coeff_exp(d, d) = (*coeffExpansionPtr)[d];
542 }
543
544 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
545#ifdef HENCKY_SMALL_STRAIN
546 t_P(i, j) =
547 t_D(i, j, k, l) * (t_grad(k, l) - t_logCPlastic(k, l) -
548 t_coeff_exp(k, l) * (t_temp - (*refTempPtr)));
549#else
550 t_T(i, j) =
551 t_D(i, j, k, l) * (t_logC(k, l) - t_logCPlastic(k, l) -
552 t_coeff_exp(k, l) * (t_temp - (*refTempPtr)));
554 t_F(i, j) = t_grad(i, j) + t_kd(i, j);
555 t_S(k, l) = t_T(i, j) * t_logC_dC(i, j, k, l);
556 t_P(i, l) = t_F(i, k) * t_S(k, l);
557#endif
558 ++t_grad;
559 ++t_logC;
560 ++t_P;
561 ++t_T;
562 ++t_S;
563 ++t_D;
564 ++t_temp;
565 ++t_logCPlastic;
566 }
567
569 }
constexpr int SPACE_DIM
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 auto t_kd
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

◆ coeffExpansionPtr

template<int DIM, typename DomainEleOp , int S>
boost::shared_ptr<VectorDouble> HenckyOps::OpCalculateHenckyThermoPlasticStressImpl< DIM, GAUSS, DomainEleOp, S >::coeffExpansionPtr
private

Definition at line 575 of file HenckyOps.hpp.

◆ commonDataPtr

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

Definition at line 572 of file HenckyOps.hpp.

◆ matLogCPlastic

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

Definition at line 574 of file HenckyOps.hpp.

◆ refTempPtr

template<int DIM, typename DomainEleOp , int S>
boost::shared_ptr<double> HenckyOps::OpCalculateHenckyThermoPlasticStressImpl< DIM, GAUSS, DomainEleOp, S >::refTempPtr
private

Definition at line 576 of file HenckyOps.hpp.

◆ tempPtr

template<int DIM, typename DomainEleOp , int S>
boost::shared_ptr<VectorDouble> HenckyOps::OpCalculateHenckyThermoPlasticStressImpl< DIM, GAUSS, DomainEleOp, S >::tempPtr
private

Definition at line 573 of file HenckyOps.hpp.


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