v0.15.0
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
PlasticOps::OpPlasticStressImpl< DIM, GAUSS, DomainEleOp > Struct Template Reference

#include "tutorials/adv-0/src/PlasticOpsGeneric.hpp"

Inheritance diagram for PlasticOps::OpPlasticStressImpl< DIM, GAUSS, DomainEleOp >:
[legend]
Collaboration diagram for PlasticOps::OpPlasticStressImpl< DIM, GAUSS, DomainEleOp >:
[legend]

Public Member Functions

DEPRECATED OpPlasticStressImpl (const std::string field_name, boost::shared_ptr< CommonData > common_data_ptr, boost::shared_ptr< MatrixDouble > mDPtr)
 
 OpPlasticStressImpl (boost::shared_ptr< CommonData > common_data_ptr, boost::shared_ptr< MatrixDouble > mDPtr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 [Calculate stress]
 

Private Attributes

boost::shared_ptr< MatrixDouble > mDPtr
 
boost::shared_ptr< CommonDatacommonDataPtr
 

Detailed Description

template<int DIM, typename DomainEleOp>
struct PlasticOps::OpPlasticStressImpl< DIM, GAUSS, DomainEleOp >

Definition at line 753 of file PlasticOpsGeneric.hpp.

Constructor & Destructor Documentation

◆ OpPlasticStressImpl() [1/2]

template<int DIM, typename DomainEleOp >
PlasticOps::OpPlasticStressImpl< DIM, GAUSS, DomainEleOp >::OpPlasticStressImpl ( const std::string  field_name,
boost::shared_ptr< CommonData common_data_ptr,
boost::shared_ptr< MatrixDouble >  mDPtr 
)
Deprecated:
do not use this constructor

Definition at line 772 of file PlasticOpsGeneric.hpp.

775 : DomainEleOp(field_name, DomainEleOp::OPROW),
776 commonDataPtr(common_data_ptr), mDPtr(m_D_ptr) {
777 // Operator is only executed for vertices
778 std::fill(&DomainEleOp::doEntities[MBEDGE],
779 &DomainEleOp::doEntities[MBMAXTYPE], false);
780}
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
constexpr auto field_name

◆ OpPlasticStressImpl() [2/2]

template<int DIM, typename DomainEleOp >
PlasticOps::OpPlasticStressImpl< DIM, GAUSS, DomainEleOp >::OpPlasticStressImpl ( boost::shared_ptr< CommonData common_data_ptr,
boost::shared_ptr< MatrixDouble >  mDPtr 
)

Definition at line 783 of file PlasticOpsGeneric.hpp.

786 : DomainEleOp(NOSPACE, DomainEleOp::OPSPACE),
787 commonDataPtr(common_data_ptr), mDPtr(m_D_ptr) {}
@ NOSPACE
Definition definitions.h:83

Member Function Documentation

◆ doWork()

template<int DIM, typename DomainEleOp >
MoFEMErrorCode PlasticOps::OpPlasticStressImpl< DIM, GAUSS, DomainEleOp >::doWork ( int  side,
EntityType  type,
EntData data 
)

[Calculate stress]

Definition at line 792 of file PlasticOpsGeneric.hpp.

793 {
795
796 FTensor::Index<'i', DIM> i;
797 FTensor::Index<'j', DIM> j;
798 FTensor::Index<'k', DIM> k;
799 FTensor::Index<'l', DIM> l;
800
801 const size_t nb_gauss_pts = commonDataPtr->mStrainPtr->size2();
802 commonDataPtr->mStressPtr->resize((DIM * (DIM + 1)) / 2, nb_gauss_pts);
803 auto t_D = getFTensor4DdgFromMat<DIM, DIM, 0>(*mDPtr);
804 auto t_strain =
805 getFTensor2SymmetricFromMat<DIM>(*(commonDataPtr->mStrainPtr));
806 auto t_plastic_strain =
807 getFTensor2SymmetricFromMat<DIM>(commonDataPtr->plasticStrain);
808 auto t_stress =
809 getFTensor2SymmetricFromMat<DIM>(*(commonDataPtr->mStressPtr));
810
811 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
812 t_stress(i, j) =
813 t_D(i, j, k, l) * (t_strain(k, l) - t_plastic_strain(k, l));
814 ++t_strain;
815 ++t_plastic_strain;
816 ++t_stress;
817 }
818
820}
#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

Member Data Documentation

◆ commonDataPtr

template<int DIM, typename DomainEleOp >
boost::shared_ptr<CommonData> PlasticOps::OpPlasticStressImpl< DIM, GAUSS, DomainEleOp >::commonDataPtr
private

Definition at line 768 of file PlasticOpsGeneric.hpp.

◆ mDPtr

template<int DIM, typename DomainEleOp >
boost::shared_ptr<MatrixDouble> PlasticOps::OpPlasticStressImpl< DIM, GAUSS, DomainEleOp >::mDPtr
private

Definition at line 767 of file PlasticOpsGeneric.hpp.


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