Public Member Functions | Private Attributes | List of all members
PlasticOps::OpCalculatePlasticFlowRhs Struct Reference

#include <users_modules/tutorials/adv-0/src/PlasticOps.hpp>

Inheritance diagram for PlasticOps::OpCalculatePlasticFlowRhs:
Collaboration diagram for PlasticOps::OpCalculatePlasticFlowRhs:

Public Member Functions

 OpCalculatePlasticFlowRhs (const std::string field_name, boost::shared_ptr< CommonData > common_data_ptr)
 [Calculate stress] More...
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &data)
- Public Member Functions inherited from MoFEM::OpBaseImpl< A, EleOp >
 OpBaseImpl (const std::string row_field_name, const std::string col_field_name, const OpType type, boost::shared_ptr< Range > ents_ptr=nullptr)
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntData &row_data, EntData &col_data)
 Do calculations for the left hand side. More...
MoFEMErrorCode doWork (int row_side, EntityType row_type, EntData &row_data)
 Do calculations for the right hand side. More...

Private Attributes

boost::shared_ptr< CommonDatacommonDataPtr

Additional Inherited Members

- Public Types inherited from MoFEM::OpBaseImpl< A, EleOp >
using OpType = typename EleOp::OpType
using EntData = EntitiesFieldData::EntData
- Public Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
TimeFun timeScalingFun
 assumes that time variable is set More...
FEFun feScalingFun
 assumes that time variable is set More...
boost::shared_ptr< RangeentsPtr
 Entities on which element is run. More...
- Protected Member Functions inherited from MoFEM::OpBaseImpl< A, EleOp >
template<int DIM>
FTensor::Tensor1< FTensor::PackPtr< double *, DIM >, DIM > getNf ()
template<int DIM>
FTensor::Tensor2< FTensor::PackPtr< double *, DIM >, DIM, DIM > getLocMat (const int rr)
virtual MoFEMErrorCode iNtegrate (EntData &row_data, EntData &col_data)
 Integrate grad-grad operator. More...
virtual MoFEMErrorCode aSsemble (EntData &row_data, EntData &col_data, const bool trans)=0
virtual MoFEMErrorCode iNtegrate (EntData &data)
 Class dedicated to integrate operator. More...
virtual MoFEMErrorCode aSsemble (EntData &data)=0
- Protected Attributes inherited from MoFEM::OpBaseImpl< A, EleOp >
int nbRows
 number of dofs on rows More...
int nbCols
 number if dof on column More...
int nbIntegrationPts
 number of integration points More...
int nbRowBaseFunctions
 number or row base functions More...
int rowSide
 row side number More...
int colSide
 column side number More...
EntityType rowType
 row type More...
EntityType colType
 column type More...
bool assembleTranspose
bool onlyTranspose
MatrixDouble locMat
 local entity block matrix More...
MatrixDouble locMatTranspose
 local entity block matrix More...
VectorDouble locF
 local entity vector More...

Detailed Description


Definition at line 114 of file PlasticOps.hpp.

Constructor & Destructor Documentation

◆ OpCalculatePlasticFlowRhs()

PlasticOps::OpCalculatePlasticFlowRhs::OpCalculatePlasticFlowRhs ( const std::string  field_name,
boost::shared_ptr< CommonData common_data_ptr 

[Calculate stress]

PlasticOps.hpp, and PlasticOpsGeneric.hpp.

Definition at line 84 of file PlasticOpsGeneric.hpp.

87 commonDataPtr(common_data_ptr) {}
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::OpBase AssemblyDomainEleOp
Definition: plastic.cpp:43
constexpr auto field_name
operator doWork function is executed on FE rows
boost::shared_ptr< CommonData > commonDataPtr
Definition: PlasticOps.hpp:120

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode PlasticOps::OpCalculatePlasticFlowRhs::iNtegrate ( EntitiesFieldData::EntData data)
PlasticOps.hpp, and PlasticOpsGeneric.hpp.

Definition at line 102 of file PlasticOpsGeneric.hpp.

102 {
105 auto t_flow =
106 getFTensor2SymmetricFromMat<SPACE_DIM>(commonDataPtr->plasticFlow);
108 auto t_plastic_strain_dot =
109 getFTensor2SymmetricFromMat<SPACE_DIM>(commonDataPtr->plasticStrainDot);
110 auto t_tau_dot = getFTensor0FromVec(commonDataPtr->plasticTauDot);
112 auto t_D =
113 getFTensor4DdgFromMat<SPACE_DIM, SPACE_DIM, 0>(*commonDataPtr->mDPtr);
114 constexpr auto size_symm = (SPACE_DIM * (SPACE_DIM + 1)) / 2;
116 const size_t nb_integration_pts = data.getN().size1();
117 const size_t nb_base_functions = data.getN().size2();
118 auto t_w = getFTensor0IntegrationWeight();
119 auto t_base = data.getFTensor0N();
121 auto &nf = AssemblyDomainEleOp::locF;
123 for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
124 double alpha = getMeasure() * t_w;
126 auto t_nf = get_nf(nf, FTensor::Number<SPACE_DIM>());
128 const double tau_dot = t_tau_dot;
131 t_flow_stress_diff(i, j) = t_D(i, j, k, l) * (t_plastic_strain_dot(k, l) -
132 t_tau_dot * t_flow(k, l));
134 size_t bb = 0;
135 for (; bb != AssemblyDomainEleOp::nbRows / size_symm; ++bb) {
136 t_nf(i, j) += (alpha * t_base) * t_flow_stress_diff(i, j);
137 ++t_base;
138 ++t_nf;
139 }
140 for (; bb < nb_base_functions; ++bb)
141 ++t_base;
143 ++t_flow;
144 ++t_plastic_strain_dot;
145 ++t_tau_dot;
146 ++t_w;
147 }
constexpr int SPACE_DIM
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
static FTensor::Tensor2< FTensor::PackPtr< double *, 3 >, 2, 2 > get_nf(VectorDouble &nf, FTensor::Number< 2 >)
FTensor::Index< 'j', SPACE_DIM > j
[Common data]
Definition: PlasticOps.hpp:77
FTensor::Index< 'l', SPACE_DIM > l
Definition: PlasticOps.hpp:79
FTensor::Index< 'k', SPACE_DIM > k
Definition: PlasticOps.hpp:78
FTensor::Index< 'i', SPACE_DIM > i
Definition: PlasticOps.hpp:81
VectorDouble locF
local entity vector
int nbRows
number of dofs on rows

Member Data Documentation

◆ commonDataPtr

boost::shared_ptr<CommonData> PlasticOps::OpCalculatePlasticFlowRhs::commonDataPtr
PlasticOps.hpp, and PlasticOpsGeneric.hpp.

Definition at line 120 of file PlasticOps.hpp.

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