v0.13.1
Public Member Functions | Private Attributes | List of all members
OpRotatingFrameTools::OpPostProcPlasticSkeleton Struct Reference

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

Inheritance diagram for OpRotatingFrameTools::OpPostProcPlasticSkeleton:
[legend]
Collaboration diagram for OpRotatingFrameTools::OpPostProcPlasticSkeleton:
[legend]

Public Member Functions

 OpPostProcPlasticSkeleton (const std::string field_name, moab::Interface &post_proc_mesh, std::vector< EntityHandle > &map_gauss_pts, boost::shared_ptr< CommonData > common_data_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntData &data)
 [Postprocessing] More...
 

Private Attributes

moab::Interface & postProcMesh
 
std::vector< EntityHandle > & mapGaussPts
 
boost::shared_ptr< CommonDatacommonDataPtr
 

Detailed Description

Definition at line 119 of file RotatingFrameOperators.hpp.

Constructor & Destructor Documentation

◆ OpPostProcPlasticSkeleton()

OpRotatingFrameTools::OpPostProcPlasticSkeleton::OpPostProcPlasticSkeleton ( const std::string  field_name,
moab::Interface &  post_proc_mesh,
std::vector< EntityHandle > &  map_gauss_pts,
boost::shared_ptr< CommonData common_data_ptr 
)

Definition at line 564 of file RotatingFrameOperators.cpp.

568 : SkeletonEleOp(field_name, field_name, SkeletonEleOp::OPROW),
569 postProcMesh(post_proc_mesh), mapGaussPts(map_gauss_pts),
570 commonDataPtr(common_data_ptr) {
571 // Operator is only executed for vertices
572 std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE], false);
573 doEntities[MBTRI] = doEntities[MBQUAD] = true;
574}
SkeletonEle::UserDataOperator SkeletonEleOp
constexpr auto field_name
boost::shared_ptr< CommonData > commonDataPtr
std::vector< EntityHandle > & mapGaussPts
moab::Interface & postProcMesh

Member Function Documentation

◆ doWork()

MoFEMErrorCode OpRotatingFrameTools::OpPostProcPlasticSkeleton::doWork ( int  side,
EntityType  type,
EntData data 
)

[Postprocessing]

Definition at line 577 of file RotatingFrameOperators.cpp.

578 {
580 // if (skinEnts.find(getFEEntityHandle()) != skinEnts.end())
581 // MoFEMFunctionReturnHot(0);
582 const size_t nb_gauss_pts = getGaussPts().size2();
583 std::array<double, 9> def;
584 std::fill(def.begin(), def.end(), 0);
585
586 auto get_tag = [&](const std::string name, size_t size) {
587 Tag th;
588 CHKERR postProcMesh.tag_get_handle(name.c_str(), size, MB_TYPE_DOUBLE, th,
589 MB_TAG_CREAT | MB_TAG_SPARSE,
590 def.data());
591 return th;
592 };
593
594 MatrixDouble3by3 mat(3, 3);
595
596 auto set_matrix_3d = [&](auto &t) -> MatrixDouble3by3 & {
597 mat.clear();
598 for (size_t r = 0; r != 3; ++r)
599 for (size_t c = 0; c != 3; ++c)
600 mat(r, c) = t(r, c);
601 return mat;
602 };
603 auto set_vector = [&](auto &t) -> MatrixDouble3by3 & {
604 mat.clear();
605 for (size_t r = 0; r != 3; ++r)
606 mat(0, r) = t(r);
607 return mat;
608 };
609 auto set_scalar = [&](auto t) -> MatrixDouble3by3 & {
610 mat.clear();
611 mat(0, 0) = t;
612 return mat;
613 };
614
615 auto set_tag = [&](auto th, auto gg, MatrixDouble3by3 &mat) {
616 return postProcMesh.tag_set_data(th, &mapGaussPts[gg], 1,
617 &*mat.data().begin());
618 };
619
620 auto th_rot_vel = get_tag("ROT_VELOCITY", 3);
621 auto th_tau_jump = get_tag("TAU_JUMP", 1);
622 auto th_plastic_jump = get_tag("PLASTIC_STRAIN_JUMP", 9);
623 auto t_coords = getFTensor1CoordsAtGaussPts();
624 auto t_ep_jump =
625 getFTensor2SymmetricFromMat<3>(*(commonDataPtr->plasticStrainJumpPtr));
626 auto t_tau_jump = getFTensor0FromVec(*(commonDataPtr->plasticTauJumpPtr));
627
628 for (size_t gg = 0; gg != nb_gauss_pts; ++gg) {
629
630 Tensor1<double, 3> velocity;
631 velocity(i) = (*cache).Omega(i, j) * t_coords(j);
632
633 CHKERR set_tag(th_tau_jump, gg, set_scalar(t_tau_jump));
634 CHKERR set_tag(th_plastic_jump, gg, set_matrix_3d(t_ep_jump));
635 CHKERR set_tag(th_rot_vel, gg, set_vector(velocity));
636 ++t_coords;
637 ++t_ep_jump;
638 ++t_tau_jump;
639 }
640
642}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
#define CHKERR
Inline error check.
Definition: definitions.h:548
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
MatrixBoundedArray< double, 9 > MatrixDouble3by3
Definition: Types.hpp:116
static auto getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vector.
Definition: Templates.hpp:149
const double r
rate factor
constexpr double t
plate stiffness
Definition: plate.cpp:76

Member Data Documentation

◆ commonDataPtr

boost::shared_ptr<CommonData> OpRotatingFrameTools::OpPostProcPlasticSkeleton::commonDataPtr
private

Definition at line 129 of file RotatingFrameOperators.hpp.

◆ mapGaussPts

std::vector<EntityHandle>& OpRotatingFrameTools::OpPostProcPlasticSkeleton::mapGaussPts
private

Definition at line 128 of file RotatingFrameOperators.hpp.

◆ postProcMesh

moab::Interface& OpRotatingFrameTools::OpPostProcPlasticSkeleton::postProcMesh
private

Definition at line 127 of file RotatingFrameOperators.hpp.


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