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

413 : DomainEleOp(field_name, DomainEleOp::OPROW),
414 commonDataPtr(common_data_ptr) {
415 // Operator is only executed for vertices
416 std::fill(&DomainEleOp::doEntities[MBEDGE],
417 &DomainEleOp::doEntities[MBMAXTYPE], false);
418}
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 421 of file PlasticOpsGeneric.hpp.

422 {
424
425 FTensor::Index<'i', DIM> i;
426 FTensor::Index<'j', DIM> j;
427
428 const size_t nb_gauss_pts = commonDataPtr->mStressPtr->size1();
429 auto t_stress = getFTensor2SymmetricFromMat<DIM>(*(commonDataPtr->mStressPtr));
430 auto t_plastic_strain =
431 getFTensor2SymmetricFromMat<DIM>(commonDataPtr->plasticStrain);
432
433 commonDataPtr->plasticSurface.resize(nb_gauss_pts, false);
434 commonDataPtr->plasticFlow.resize(nb_gauss_pts, size_symm, false);
435 auto t_flow = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->plasticFlow);
436
437 auto &params = commonDataPtr->blockParams;
438
439 for (auto &f : commonDataPtr->plasticSurface) {
440
442
443 deviator(
444 t_stress, trace(t_stress),
445 kinematic_hardening(t_plastic_strain, params[CommonData::C1_k]))
446
447 );
448
449 auto t_flow_tmp =
450 plastic_flow(f,
451
452 deviator(t_stress, trace(t_stress),
453 kinematic_hardening(t_plastic_strain,
454 params[CommonData::C1_k])),
455
457 t_flow(i, j) = t_flow_tmp(i, j);
458
459 ++t_plastic_strain;
460 ++t_flow;
461 ++t_stress;
462 }
463
465}
#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 diff_tensor(FTensor::Number< DIM >)
[Lambda functions]
auto diff_deviator(FTensor::Ddg< double, DIM, DIM > &&t_diff_stress, FTensor::Number< DIM >)
double trace(FTensor::Tensor2_symmetric< T, 2 > &t_stress)
auto plastic_flow(long double f, FTensor::Tensor2_symmetric< double, 3 > &&t_dev_stress, FTensor::Ddg< double, 3, DIM > &&t_diff_deviator)
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 406 of file PlasticOpsGeneric.hpp.


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