v0.16.0
Loading...
Searching...
No Matches
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_plasticity/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)
 
 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 288 of file PlasticOpsGeneric.hpp.

Constructor & Destructor Documentation

◆ OpCalculatePlasticSurfaceImpl() [1/2]

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

302 : DomainEleOp(field_name, DomainEleOp::OPROW),
303 commonDataPtr(common_data_ptr) {
304 // Operator is only executed for vertices
305 std::fill(&DomainEleOp::doEntities[MBEDGE],
306 &DomainEleOp::doEntities[MBMAXTYPE], false);
307}
DomainEle::UserDataOperator DomainEleOp
Finire element operator type.
constexpr auto field_name

◆ OpCalculatePlasticSurfaceImpl() [2/2]

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

Member Function Documentation

◆ doWork() [1/2]

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

Definition at line 310 of file PlasticOpsGeneric.hpp.

311 {
313
314 FTensor::Index<'i', DIM> i;
315 FTensor::Index<'j', DIM> j;
316
317 const size_t nb_gauss_pts = commonDataPtr->mStressPtr->size1();
318 auto t_stress = getFTensor2SymmetricFromMat<DIM>(*(commonDataPtr->mStressPtr));
319 auto t_plastic_strain =
320 getFTensor2SymmetricFromMat<DIM>(commonDataPtr->plasticStrain);
321
322 commonDataPtr->plasticSurface.resize(nb_gauss_pts, false);
323 commonDataPtr->plasticFlow.resize(nb_gauss_pts, size_symm, false);
324 auto t_flow = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->plasticFlow);
325
326 auto &params = commonDataPtr->blockParams;
327
328 for (auto &f : commonDataPtr->plasticSurface) {
329
331
332 deviator(
333 t_stress, trace(t_stress),
334 kinematic_hardening(t_plastic_strain, params[CommonData::C1_k]))
335
336 );
337
338 auto t_flow_tmp =
339 plastic_flow(f,
340
341 deviator(t_stress, trace(t_stress),
342 kinematic_hardening(t_plastic_strain,
343 params[CommonData::C1_k])),
344
345 FTensor::diff_deviator<double, DIM>());
346 t_flow(i, j) = t_flow_tmp(i, j);
347
348 ++t_plastic_strain;
349 ++t_flow;
350 ++t_stress;
351 }
352
354}
#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< 'j', 3 > j
double platsic_surface(FTensor::Tensor2_symmetric< double, 3 > &&t_stress_deviator)
auto plastic_flow(long double f, FTensor::Tensor2_symmetric< double, 3 > &&t_dev_stress, const FTensor::DiffDeviator< T, DIM > &t_diff_deviator)
double trace(FTensor::Tensor2_symmetric< T, 2 > &t_stress)
auto deviator(FTensor::Tensor2_symmetric< T, DIM > &t_stress, double trace, FTensor::Tensor2_symmetric< double, DIM > &t_alpha, FTensor::Number< DIM >)
auto kinematic_hardening(FTensor::Tensor2_symmetric< T, DIM > &t_plastic_strain, double C1_k)
Definition plastic.cpp:93
constexpr auto size_symm
Definition plastic.cpp:42

◆ doWork() [2/2]

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

Member Data Documentation

◆ commonDataPtr

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

Definition at line 295 of file PlasticOpsGeneric.hpp.


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