v0.14.0
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] More...
 

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 738 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
Examples
PlasticOpsGeneric.hpp.

Definition at line 757 of file PlasticOpsGeneric.hpp.

760  : DomainEleOp(field_name, DomainEleOp::OPROW),
761  commonDataPtr(common_data_ptr), mDPtr(m_D_ptr) {
762  // Operator is only executed for vertices
763  std::fill(&DomainEleOp::doEntities[MBEDGE],
764  &DomainEleOp::doEntities[MBMAXTYPE], false);
765 }

◆ 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 768 of file PlasticOpsGeneric.hpp.

771  : DomainEleOp(NOSPACE, DomainEleOp::OPSPACE),
772  commonDataPtr(common_data_ptr), mDPtr(m_D_ptr) {}

Member Function Documentation

◆ doWork()

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

[Calculate stress]

Examples
PlasticOpsGeneric.hpp.

Definition at line 777 of file PlasticOpsGeneric.hpp.

778  {
780 
785 
786  const size_t nb_gauss_pts = commonDataPtr->mStrainPtr->size2();
787  commonDataPtr->mStressPtr->resize((DIM * (DIM + 1)) / 2, nb_gauss_pts);
788  auto t_D = getFTensor4DdgFromMat<DIM, DIM, 0>(*mDPtr);
789  auto t_strain =
790  getFTensor2SymmetricFromMat<DIM>(*(commonDataPtr->mStrainPtr));
791  auto t_plastic_strain =
792  getFTensor2SymmetricFromMat<DIM>(commonDataPtr->plasticStrain);
793  auto t_stress =
794  getFTensor2SymmetricFromMat<DIM>(*(commonDataPtr->mStressPtr));
795 
796  for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
797  t_stress(i, j) =
798  t_D(i, j, k, l) * (t_strain(k, l) - t_plastic_strain(k, l));
799  ++t_strain;
800  ++t_plastic_strain;
801  ++t_stress;
802  }
803 
805 }

Member Data Documentation

◆ commonDataPtr

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

Definition at line 753 of file PlasticOpsGeneric.hpp.

◆ mDPtr

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

Definition at line 752 of file PlasticOpsGeneric.hpp.


The documentation for this struct was generated from the following file:
NOSPACE
@ NOSPACE
Definition: definitions.h:83
PlasticOps::OpPlasticStressImpl< DIM, GAUSS, DomainEleOp >::mDPtr
boost::shared_ptr< MatrixDouble > mDPtr
Definition: PlasticOpsGeneric.hpp:752
PlasticOps::OpPlasticStressImpl< DIM, GAUSS, DomainEleOp >::commonDataPtr
boost::shared_ptr< CommonData > commonDataPtr
Definition: PlasticOpsGeneric.hpp:753
DomainEleOp
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
Definition: child_and_parent.cpp:36
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
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