v0.14.0
Public Types | Public Member Functions | Protected Attributes | List of all members
EshelbianPlasticity::OpMoveNode Struct Reference

#include <users_modules/eshelbian_plasticit/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

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 1053 of file EshelbianContact.cpp.

1057  : UOP(NOSPACE, UOP::OPSPACE), contactTreePtr(contact_tree_ptr),
1058  uH1Ptr(u_h1_ptr), commonDataPtr(common_data_ptr) {}

Member Function Documentation

◆ doWork()

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

Definition at line 1060 of file EshelbianContact.cpp.

1061  {
1063 
1064  auto get_body_id = [&](auto fe_ent) {
1065  for (auto &m : contactTreePtr->bodyMap) {
1066  if (m.second.find(fe_ent) != m.second.end()) {
1067  return m.first;
1068  }
1069  }
1070  return -1;
1071  };
1072 
1073  auto &moab_post_proc_mesh = contactTreePtr->getPostProcMesh();
1074  auto &post_proc_ents = contactTreePtr->getPostProcElements();
1075 
1076  auto fe_ent = getNumeredEntFiniteElementPtr()->getEnt();
1077  auto fe_id = id_from_handle(fe_ent);
1078  auto body_id = get_body_id(fe_ent);
1079  auto &map_gauss_pts = contactTreePtr->getMapGaussPts();
1080 
1081  CHKERR moab_post_proc_mesh.tag_clear_data(contactTreePtr->thEleId,
1082  post_proc_ents, &fe_id);
1083  CHKERR moab_post_proc_mesh.tag_clear_data(contactTreePtr->thBodyId,
1084  post_proc_ents, &body_id);
1085 
1086  auto nb_gauss_pts = getGaussPts().size2();
1087  auto t_u_h1 = getFTensor1FromMat<3>(*uH1Ptr);
1088  auto t_u_l2 = getFTensor1FromMat<3>(commonDataPtr->contactDisp);
1089  auto t_coords = getFTensor1CoordsAtGaussPts();
1090 
1091  MatrixDouble x_h1(nb_gauss_pts, 3);
1092  auto t_x_h1 = getFTensor1FromPtr<3>(&x_h1(0, 0));
1093  MatrixDouble x_l2(nb_gauss_pts, 3);
1094  auto t_x_l2 = getFTensor1FromPtr<3>(&x_l2(0, 0));
1095  MatrixDouble tractions = trans(commonDataPtr->contactTraction);
1096  MatrixDouble coords = getCoordsAtGaussPts();
1097 
1099 
1100  // VectorDouble bases(nb_bases, 0);
1101  for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
1102  t_x_h1(i) = t_coords(i) + t_u_h1(i);
1103  t_x_l2(i) = t_coords(i) + t_u_l2(i);
1104 
1105  ++t_coords;
1106  ++t_u_h1;
1107  ++t_u_l2;
1108  ++t_x_h1;
1109  ++t_x_l2;
1110  }
1111 
1112  CHKERR moab_post_proc_mesh.set_coords(
1113  &*map_gauss_pts.begin(), map_gauss_pts.size(), &*x_h1.data().begin());
1114  CHKERR moab_post_proc_mesh.tag_set_data(
1115  contactTreePtr->thSmallX, &*map_gauss_pts.begin(), map_gauss_pts.size(),
1116  &*x_h1.data().begin());
1117  CHKERR moab_post_proc_mesh.tag_set_data(
1118  contactTreePtr->thLargeX, &*map_gauss_pts.begin(), map_gauss_pts.size(),
1119  &*coords.data().begin());
1120  CHKERR moab_post_proc_mesh.tag_set_data(
1121  contactTreePtr->thTraction, &*map_gauss_pts.begin(), map_gauss_pts.size(),
1122  &*tractions.data().begin());
1123 
1125 }

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:
NOSPACE
@ NOSPACE
Definition: definitions.h:83
MoFEM::id_from_handle
auto id_from_handle(const EntityHandle h)
Definition: Templates.hpp:1890
EshelbianPlasticity::OpMoveNode::UOP
FaceElementForcesAndSourcesCore::UserDataOperator UOP
Definition: EshelbianContact.hpp:223
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
EshelbianPlasticity::OpMoveNode::contactTreePtr
boost::shared_ptr< ContactTree > contactTreePtr
Definition: EshelbianContact.hpp:232
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Index< 'i', 3 >
EshelbianPlasticity::OpMoveNode::commonDataPtr
boost::shared_ptr< ContactOps::CommonData > commonDataPtr
Definition: EshelbianContact.hpp:234
EshelbianPlasticity::OpMoveNode::uH1Ptr
boost::shared_ptr< MatrixDouble > uH1Ptr
Definition: EshelbianContact.hpp:233
m
FTensor::Index< 'm', 3 > m
Definition: shallow_wave.cpp:80
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359