v0.13.2
Loading...
Searching...
No Matches
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 565 of file RotatingFrameOperators.cpp.

569 : SkeletonEleOp(field_name, field_name, SkeletonEleOp::OPROW),
570 postProcMesh(post_proc_mesh), mapGaussPts(map_gauss_pts),
571 commonDataPtr(common_data_ptr) {
572 // Operator is only executed for vertices
573 std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE], false);
574 doEntities[MBTRI] = doEntities[MBQUAD] = true;
575}
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 578 of file RotatingFrameOperators.cpp.

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

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: