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 193 of file EshelbianContact.hpp.

Member Typedef Documentation

◆ UOP

Definition at line 195 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 984 of file EshelbianContact.cpp.

988  : UOP(NOSPACE, UOP::OPSPACE), contactTreePtr(contact_tree_ptr),
989  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 991 of file EshelbianContact.cpp.

992  {
994 
995  auto get_body_id = [&](auto fe_ent) {
996  for (auto &m : contactTreePtr->bodyMap) {
997  if (m.second.find(fe_ent) != m.second.end()) {
998  return m.first;
999  }
1000  }
1001  return -1;
1002  };
1003 
1004  auto &moab_post_proc_mesh = contactTreePtr->getPostProcMesh();
1005  auto &post_proc_ents = contactTreePtr->getPostProcElements();
1006 
1007  auto fe_ent = getNumeredEntFiniteElementPtr()->getEnt();
1008  auto fe_id = id_from_handle(fe_ent);
1009  auto body_id = get_body_id(fe_ent);
1010  auto &map_gauss_pts = contactTreePtr->getMapGaussPts();
1011 
1012  CHKERR moab_post_proc_mesh.tag_clear_data(contactTreePtr->thEleId,
1013  post_proc_ents, &fe_id);
1014  CHKERR moab_post_proc_mesh.tag_clear_data(contactTreePtr->thBodyId,
1015  post_proc_ents, &body_id);
1016 
1017  auto nb_gauss_pts = getGaussPts().size2();
1018  auto t_u_h1 = getFTensor1FromMat<3>(*uH1Ptr);
1019  auto t_u_l2 = getFTensor1FromMat<3>(commonDataPtr->contactDisp);
1020  auto t_coords = getFTensor1CoordsAtGaussPts();
1021 
1022  MatrixDouble x_h1(nb_gauss_pts, 3);
1023  auto t_x_h1 = getFTensor1FromPtr<3>(&x_h1(0, 0));
1024  MatrixDouble x_l2(nb_gauss_pts, 3);
1025  auto t_x_l2 = getFTensor1FromPtr<3>(&x_l2(0, 0));
1026  MatrixDouble tractions = trans(commonDataPtr->contactTraction);
1027  MatrixDouble coords = getCoordsAtGaussPts();
1028 
1030 
1031  // VectorDouble bases(nb_bases, 0);
1032  for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
1033  t_x_h1(i) = t_coords(i) + t_u_h1(i);
1034  t_x_l2(i) = t_coords(i) + t_u_l2(i);
1035 
1036  ++t_coords;
1037  ++t_u_h1;
1038  ++t_u_l2;
1039  ++t_x_h1;
1040  ++t_x_l2;
1041  }
1042 
1043  CHKERR moab_post_proc_mesh.set_coords(
1044  &*map_gauss_pts.begin(), map_gauss_pts.size(), &*x_h1.data().begin());
1045  CHKERR moab_post_proc_mesh.tag_set_data(
1046  contactTreePtr->thSmallX, &*map_gauss_pts.begin(), map_gauss_pts.size(),
1047  &*x_h1.data().begin());
1048  CHKERR moab_post_proc_mesh.tag_set_data(
1049  contactTreePtr->thLargeX, &*map_gauss_pts.begin(), map_gauss_pts.size(),
1050  &*coords.data().begin());
1051  CHKERR moab_post_proc_mesh.tag_set_data(
1052  contactTreePtr->thTraction, &*map_gauss_pts.begin(), map_gauss_pts.size(),
1053  &*tractions.data().begin());
1054 
1056 }

Member Data Documentation

◆ commonDataPtr

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

Definition at line 206 of file EshelbianContact.hpp.

◆ contactTreePtr

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

Definition at line 204 of file EshelbianContact.hpp.

◆ uH1Ptr

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

Definition at line 205 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:1861
EshelbianPlasticity::OpMoveNode::UOP
FaceElementForcesAndSourcesCore::UserDataOperator UOP
Definition: EshelbianContact.hpp:195
MoFEM::Types::MatrixDouble
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:77
EshelbianPlasticity::OpMoveNode::contactTreePtr
boost::shared_ptr< ContactTree > contactTreePtr
Definition: EshelbianContact.hpp:204
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
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:206
EshelbianPlasticity::OpMoveNode::uH1Ptr
boost::shared_ptr< MatrixDouble > uH1Ptr
Definition: EshelbianContact.hpp:205
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:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346