v0.13.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
OpPlasticTools::OpCalculateConstraintRhs Struct Reference

#include <users_modules/multifield_plasticity/src/PlasticOperators.hpp>

Inheritance diagram for OpPlasticTools::OpCalculateConstraintRhs:
[legend]
Collaboration diagram for OpPlasticTools::OpCalculateConstraintRhs:
[legend]

Public Member Functions

 OpCalculateConstraintRhs (const std::string field_name, boost::shared_ptr< CommonData > common_data_ptr)
 
MoFEMErrorCode iNtegrate (EntitiesFieldData::EntData &data)
 

Private Attributes

boost::shared_ptr< CommonDatacommonDataPtr
 

Detailed Description

Definition at line 111 of file PlasticOperators.hpp.

Constructor & Destructor Documentation

◆ OpCalculateConstraintRhs()

OpPlasticTools::OpCalculateConstraintRhs::OpCalculateConstraintRhs ( const std::string  field_name,
boost::shared_ptr< CommonData common_data_ptr 
)

Definition at line 178 of file PlasticOperators.cpp.

180 : DomainEleOpAssembly(field_name, field_name, DomainEleOpAssembly::OPROW),
181 commonDataPtr(common_data_ptr) {}
FormsIntegrators< DomainEleOp >::Assembly< USER_ASSEMBLE >::OpBase DomainEleOpAssembly
constexpr auto field_name
boost::shared_ptr< CommonData > commonDataPtr

Member Function Documentation

◆ iNtegrate()

MoFEMErrorCode OpPlasticTools::OpCalculateConstraintRhs::iNtegrate ( EntitiesFieldData::EntData data)

Definition at line 183 of file PlasticOperators.cpp.

183 {
185
186 const size_t nb_dofs = data.getIndices().size();
187 if (nb_dofs) {
188
189 auto get_dt = [&]() {
190 double dt;
191 CHKERR TSGetTimeStep(getFEMethod()->ts, &dt);
192 dt = 1;
193 return dt;
194 };
195 const auto dt = get_dt();
196
197 auto t_tau = getFTensor0FromVec(*(commonDataPtr->plasticTauPtr));
198 auto t_tau_dot = getFTensor0FromVec(*(commonDataPtr->plasticTauDotPtr));
199 auto t_f = getFTensor0FromVec(*(commonDataPtr->plasticSurfacePtr));
200 auto t_w = getFTensor0IntegrationWeight();
201
202 auto t_base = data.getFTensor0N();
203 const size_t nb_integration_pts = data.getN().size1();
204 const size_t nb_base_functions = data.getN().size2();
205 for (size_t gg = 0; gg != nb_integration_pts; ++gg) {
206 const double alpha = dt * getMeasure() * t_w * (*cache).scale_constraint;
207 const double beta = alpha * constraint(t_tau_dot, t_f, hardening(t_tau));
208
209 size_t bb = 0;
210 for (; bb != nb_dofs; ++bb) {
211 locF(bb) += beta * t_base;
212 ++t_base;
213 }
214 for (; bb < nb_base_functions; ++bb)
215 ++t_base;
216
217 ++t_tau;
218 ++t_tau_dot;
219 ++t_f;
220 ++t_w;
221 }
222 }
223
225}
#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
#define CHKERR
Inline error check.
Definition: definitions.h:535
double dt
Definition: heat_method.cpp:26
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:135
double constraint(long double tau_dot, long double f, long double hardening)
auto hardening(long double tau)
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorInt & getIndices() const
Get global indices of dofs on entity.

Member Data Documentation

◆ commonDataPtr

boost::shared_ptr<CommonData> OpPlasticTools::OpCalculateConstraintRhs::commonDataPtr
private

Definition at line 117 of file PlasticOperators.hpp.


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