v0.14.0
Public Member Functions | Protected Attributes | List of all members
PlasticOps::OpCalculatePlasticSurfaceImpl< DIM, GAUSS, DomainEleOp > Struct Template Reference

[Auxiliary functions functions More...

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

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

Public Member Functions

 OpCalculatePlasticSurfaceImpl (const std::string field_name, boost::shared_ptr< CommonData > common_data_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 

Protected Attributes

boost::shared_ptr< CommonDatacommonDataPtr
 

Detailed Description

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

[Auxiliary functions functions

Definition at line 387 of file PlasticOpsGeneric.hpp.

Constructor & Destructor Documentation

◆ OpCalculatePlasticSurfaceImpl()

template<int DIM, typename DomainEleOp >
PlasticOps::OpCalculatePlasticSurfaceImpl< DIM, GAUSS, DomainEleOp >::OpCalculatePlasticSurfaceImpl ( const std::string  field_name,
boost::shared_ptr< CommonData common_data_ptr 
)

Definition at line 399 of file PlasticOpsGeneric.hpp.

401  : DomainEleOp(field_name, DomainEleOp::OPROW),
402  commonDataPtr(common_data_ptr) {
403  // Operator is only executed for vertices
404  std::fill(&DomainEleOp::doEntities[MBEDGE],
405  &DomainEleOp::doEntities[MBMAXTYPE], false);
406 }

Member Function Documentation

◆ doWork()

template<int DIM, typename DomainEleOp >
MoFEMErrorCode PlasticOps::OpCalculatePlasticSurfaceImpl< DIM, GAUSS, DomainEleOp >::doWork ( int  side,
EntityType  type,
EntData data 
)
Examples
PlasticOpsGeneric.hpp.

Definition at line 409 of file PlasticOpsGeneric.hpp.

410  {
412 
415 
416  const size_t nb_gauss_pts = commonDataPtr->mStressPtr->size2();
417  auto t_stress =
418  getFTensor2SymmetricFromMat<DIM>(*(commonDataPtr->mStressPtr));
419  auto t_plastic_strain =
420  getFTensor2SymmetricFromMat<DIM>(commonDataPtr->plasticStrain);
421 
422  commonDataPtr->plasticSurface.resize(nb_gauss_pts, false);
423  commonDataPtr->plasticFlow.resize(size_symm, nb_gauss_pts, false);
424  auto t_flow = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->plasticFlow);
425 
426  auto &params = commonDataPtr->blockParams;
427 
428  for (auto &f : commonDataPtr->plasticSurface) {
429 
430  f = platsic_surface(
431 
432  deviator(
433  t_stress, trace(t_stress),
434  kinematic_hardening(t_plastic_strain, params[CommonData::C1_k]))
435 
436  );
437 
438  auto t_flow_tmp =
439  plastic_flow(f,
440 
441  deviator(t_stress, trace(t_stress),
442  kinematic_hardening(t_plastic_strain,
443  params[CommonData::C1_k])),
444 
446  t_flow(i, j) = t_flow_tmp(i, j);
447 
448  ++t_plastic_strain;
449  ++t_flow;
450  ++t_stress;
451  }
452 
454 }

Member Data Documentation

◆ commonDataPtr

template<int DIM, typename DomainEleOp >
boost::shared_ptr<CommonData> PlasticOps::OpCalculatePlasticSurfaceImpl< DIM, GAUSS, DomainEleOp >::commonDataPtr
protected

Definition at line 394 of file PlasticOpsGeneric.hpp.


The documentation for this struct was generated from the following file:
PlasticOps::diff_deviator
auto diff_deviator(FTensor::Ddg< double, DIM, DIM > &&t_diff_stress, FTensor::Number< DIM >)
Definition: PlasticOpsGeneric.hpp:125
PlasticOps::diff_tensor
auto diff_tensor(FTensor::Number< DIM >)
[Lambda functions]
Definition: PlasticOpsGeneric.hpp:10
PlasticOps::CommonData::C1_k
@ C1_k
Definition: PlasticOps.hpp:53
PlasticOps::platsic_surface
double platsic_surface(FTensor::Tensor2_symmetric< double, 3 > &&t_stress_deviator)
Definition: PlasticOpsGeneric.hpp:189
FTensor::Number
Definition: Number.hpp:11
DomainEleOp
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
Definition: child_and_parent.cpp:36
kinematic_hardening
auto kinematic_hardening(FTensor::Tensor2_symmetric< T, DIM > &t_plastic_strain, double C1_k)
Definition: plastic.cpp:91
PlasticOps::deviator
auto deviator(FTensor::Tensor2_symmetric< T, DIM > &t_stress, double trace, FTensor::Tensor2_symmetric< double, DIM > &t_alpha, FTensor::Number< DIM >)
Definition: PlasticOpsGeneric.hpp:92
size_symm
constexpr auto size_symm
Definition: plastic.cpp:42
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 >
PlasticOps::plastic_flow
auto plastic_flow(long double f, FTensor::Tensor2_symmetric< double, 3 > &&t_dev_stress, FTensor::Ddg< double, 3, DIM > &&t_diff_deviator)
Definition: PlasticOpsGeneric.hpp:195
HenckyOps::f
auto f
Definition: HenckyOps.hpp:15
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
PlasticOps::trace
double trace(FTensor::Tensor2_symmetric< T, 2 > &t_stress)
Definition: PlasticOpsGeneric.hpp:80
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
PlasticOps::OpCalculatePlasticSurfaceImpl< DIM, GAUSS, DomainEleOp >::commonDataPtr
boost::shared_ptr< CommonData > commonDataPtr
Definition: PlasticOpsGeneric.hpp:394