v0.15.0
Loading...
Searching...
No Matches
EshelbianPlasticity::OpMoveNode Struct Reference

#include "users_modules/eshelbian_plasticity/src/EshelbianContact.hpp"

Inheritance diagram for EshelbianPlasticity::OpMoveNode:
[legend]
Collaboration diagram for EshelbianPlasticity::OpMoveNode:
[legend]

Public Types

using UOP = FaceElementForcesAndSourcesCore::UserDataOperator
 

Public Member Functions

 OpMoveNode (boost::shared_ptr< ContactTree > contact_tree_ptr, boost::shared_ptr< ContactOps::CommonData > common_data_ptr, boost::shared_ptr< MatrixDouble > u_h1_ptr)
 
MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 

Protected Attributes

boost::shared_ptr< ContactTreecontactTreePtr
 
boost::shared_ptr< MatrixDouble > uH1Ptr
 
boost::shared_ptr< ContactOps::CommonDatacommonDataPtr
 

Detailed Description

Definition at line 221 of file EshelbianContact.hpp.

Member Typedef Documentation

◆ UOP

using EshelbianPlasticity::OpMoveNode::UOP = FaceElementForcesAndSourcesCore::UserDataOperator

Definition at line 223 of file EshelbianContact.hpp.

Constructor & Destructor Documentation

◆ OpMoveNode()

EshelbianPlasticity::OpMoveNode::OpMoveNode ( boost::shared_ptr< ContactTree > contact_tree_ptr,
boost::shared_ptr< ContactOps::CommonData > common_data_ptr,
boost::shared_ptr< MatrixDouble > u_h1_ptr )

Definition at line 1084 of file EshelbianContact.cpp.

1088 : UOP(NOSPACE, UOP::OPSPACE), contactTreePtr(contact_tree_ptr),
1089 uH1Ptr(u_h1_ptr), commonDataPtr(common_data_ptr) {}
@ NOSPACE
Definition definitions.h:83
boost::shared_ptr< ContactOps::CommonData > commonDataPtr
boost::shared_ptr< ContactTree > contactTreePtr
FaceElementForcesAndSourcesCore::UserDataOperator UOP
boost::shared_ptr< MatrixDouble > uH1Ptr

Member Function Documentation

◆ doWork()

MoFEMErrorCode EshelbianPlasticity::OpMoveNode::doWork ( int side,
EntityType type,
EntitiesFieldData::EntData & data )

Definition at line 1091 of file EshelbianContact.cpp.

1092 {
1094
1095 auto get_body_id = [&](auto fe_ent) {
1096 for (auto &m : contactTreePtr->bodyMap) {
1097 if (m.second.find(fe_ent) != m.second.end()) {
1098 return m.first;
1099 }
1100 }
1101 return -1;
1102 };
1103
1104 auto &moab_post_proc_mesh = contactTreePtr->getPostProcMesh();
1105 auto &post_proc_ents = contactTreePtr->getPostProcElements();
1106
1107 auto fe_ent = getNumeredEntFiniteElementPtr()->getEnt();
1108 auto fe_id = id_from_handle(fe_ent);
1109 auto body_id = get_body_id(fe_ent);
1110 auto &map_gauss_pts = contactTreePtr->getMapGaussPts();
1111
1112 CHKERR moab_post_proc_mesh.tag_clear_data(contactTreePtr->thEleId,
1113 post_proc_ents, &fe_id);
1114 CHKERR moab_post_proc_mesh.tag_clear_data(contactTreePtr->thBodyId,
1115 post_proc_ents, &body_id);
1116
1117 auto nb_gauss_pts = getGaussPts().size2();
1118 auto t_u_h1 = getFTensor1FromMat<3>(*uH1Ptr);
1119 auto t_u_l2 = getFTensor1FromMat<3>(commonDataPtr->contactDisp);
1120 auto t_coords = getFTensor1CoordsAtGaussPts();
1121
1122 MatrixDouble x_h1(nb_gauss_pts, 3);
1123 auto t_x_h1 = getFTensor1FromPtr<3>(&x_h1(0, 0));
1124 MatrixDouble x_l2(nb_gauss_pts, 3);
1125 auto t_x_l2 = getFTensor1FromPtr<3>(&x_l2(0, 0));
1126 MatrixDouble tractions = trans(commonDataPtr->contactTraction);
1127 MatrixDouble coords = getCoordsAtGaussPts();
1128
1129 FTensor::Index<'i', 3> i;
1130
1131 // VectorDouble bases(nb_bases, 0);
1132 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
1133 t_x_h1(i) = t_coords(i) + t_u_h1(i);
1134 t_x_l2(i) = t_coords(i) + t_u_l2(i);
1135
1136 ++t_coords;
1137 ++t_u_h1;
1138 ++t_u_l2;
1139 ++t_x_h1;
1140 ++t_x_l2;
1141 }
1142
1143 CHKERR moab_post_proc_mesh.set_coords(
1144 &*map_gauss_pts.begin(), map_gauss_pts.size(), &*x_h1.data().begin());
1145 CHKERR moab_post_proc_mesh.tag_set_data(
1146 contactTreePtr->thSmallX, &*map_gauss_pts.begin(), map_gauss_pts.size(),
1147 &*x_h1.data().begin());
1148 CHKERR moab_post_proc_mesh.tag_set_data(
1149 contactTreePtr->thLargeX, &*map_gauss_pts.begin(), map_gauss_pts.size(),
1150 &*coords.data().begin());
1151 CHKERR moab_post_proc_mesh.tag_set_data(
1152 contactTreePtr->thTraction, &*map_gauss_pts.begin(), map_gauss_pts.size(),
1153 &*tractions.data().begin());
1154
1156}
#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()
#define CHKERR
Inline error check.
FTensor::Index< 'i', SPACE_DIM > i
auto id_from_handle(const EntityHandle h)
FTensor::Index< 'm', 3 > m

Member Data Documentation

◆ commonDataPtr

boost::shared_ptr<ContactOps::CommonData> EshelbianPlasticity::OpMoveNode::commonDataPtr
protected

Definition at line 234 of file EshelbianContact.hpp.

◆ contactTreePtr

boost::shared_ptr<ContactTree> EshelbianPlasticity::OpMoveNode::contactTreePtr
protected

Definition at line 232 of file EshelbianContact.hpp.

◆ uH1Ptr

boost::shared_ptr<MatrixDouble> EshelbianPlasticity::OpMoveNode::uH1Ptr
protected

Definition at line 233 of file EshelbianContact.hpp.


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