v0.15.0
Loading...
Searching...
No Matches
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 399 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 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

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 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->size2();
429 auto t_stress =
430 getFTensor2SymmetricFromMat<DIM>(*(commonDataPtr->mStressPtr));
431 auto t_plastic_strain =
432 getFTensor2SymmetricFromMat<DIM>(commonDataPtr->plasticStrain);
433
434 commonDataPtr->plasticSurface.resize(nb_gauss_pts, false);
435 commonDataPtr->plasticFlow.resize(size_symm, nb_gauss_pts, false);
436 auto t_flow = getFTensor2SymmetricFromMat<DIM>(commonDataPtr->plasticFlow);
437
438 auto &params = commonDataPtr->blockParams;
439
440 for (auto &f : commonDataPtr->plasticSurface) {
441
443
444 deviator(
445 t_stress, trace(t_stress),
446 kinematic_hardening(t_plastic_strain, params[CommonData::C1_k]))
447
448 );
449
450 auto t_flow_tmp =
451 plastic_flow(f,
452
453 deviator(t_stress, trace(t_stress),
454 kinematic_hardening(t_plastic_strain,
455 params[CommonData::C1_k])),
456
458 t_flow(i, j) = t_flow_tmp(i, j);
459
460 ++t_plastic_strain;
461 ++t_flow;
462 ++t_stress;
463 }
464
466}
#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:92
constexpr auto size_symm
Definition plastic.cpp:42

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 file: