v0.15.5
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
EshelbianPlasticity::OpMoveNode Struct Reference
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 1344 of file EshelbianContact.cpp.

Member Typedef Documentation

◆ UOP

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

Definition at line 1346 of file EshelbianContact.cpp.

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

1364 : UOP(NOSPACE, UOP::OPSPACE), contactTreePtr(contact_tree_ptr),
1365 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 1367 of file EshelbianContact.cpp.

1368 {
1370
1371 auto get_body_id = [&](auto fe_ent) {
1372 for (auto &m : contactTreePtr->bodyMap) {
1373 if (m.second.find(fe_ent) != m.second.end()) {
1374 return m.first;
1375 }
1376 }
1377 return -1;
1378 };
1379
1380 auto &moab_post_proc_mesh = contactTreePtr->getPostProcMesh();
1381 auto &post_proc_ents = contactTreePtr->getPostProcElements();
1382
1383 auto fe_ent = getNumeredEntFiniteElementPtr()->getEnt();
1384 auto fe_id = id_from_handle(fe_ent);
1385 auto body_id = get_body_id(fe_ent);
1386 auto &map_gauss_pts = contactTreePtr->getMapGaussPts();
1387
1388 CHKERR moab_post_proc_mesh.tag_clear_data(contactTreePtr->thEleId,
1389 post_proc_ents, &fe_id);
1390 CHKERR moab_post_proc_mesh.tag_clear_data(contactTreePtr->thBodyId,
1391 post_proc_ents, &body_id);
1392
1393 auto nb_gauss_pts = getGaussPts().size2();
1394 auto t_u_h1 = getFTensor1FromMat<3>(*uH1Ptr);
1395 auto t_u_l2 = getFTensor1FromMat<3>(commonDataPtr->contactDisp);
1396 auto t_coords = getFTensor1CoordsAtGaussPts();
1397
1398 MatrixDouble x_h1(nb_gauss_pts, 3);
1399 auto t_x_h1 = getFTensor1FromPtr<3>(&x_h1(0, 0));
1400 MatrixDouble x_l2(nb_gauss_pts, 3);
1401 auto t_x_l2 = getFTensor1FromPtr<3>(&x_l2(0, 0));
1402 MatrixDouble tractions = trans(commonDataPtr->contactTraction);
1403 MatrixDouble coords = getCoordsAtGaussPts();
1404
1405 FTensor::Index<'i', 3> i;
1406
1407 // VectorDouble bases(nb_bases, 0);
1408 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
1409 t_x_h1(i) = t_coords(i) + t_u_h1(i);
1410 t_x_l2(i) = t_coords(i) + t_u_l2(i);
1411
1412 ++t_coords;
1413 ++t_u_h1;
1414 ++t_u_l2;
1415 ++t_x_h1;
1416 ++t_x_l2;
1417 }
1418
1419 CHKERR moab_post_proc_mesh.set_coords(
1420 &*map_gauss_pts.begin(), map_gauss_pts.size(), &*x_h1.data().begin());
1421 CHKERR moab_post_proc_mesh.tag_set_data(
1422 contactTreePtr->thSmallX, &*map_gauss_pts.begin(), map_gauss_pts.size(),
1423 &*x_h1.data().begin());
1424 CHKERR moab_post_proc_mesh.tag_set_data(
1425 contactTreePtr->thLargeX, &*map_gauss_pts.begin(), map_gauss_pts.size(),
1426 &*coords.data().begin());
1427 CHKERR moab_post_proc_mesh.tag_set_data(
1428 contactTreePtr->thTraction, &*map_gauss_pts.begin(), map_gauss_pts.size(),
1429 &*tractions.data().begin());
1430
1432}
#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 1357 of file EshelbianContact.cpp.

◆ contactTreePtr

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

Definition at line 1355 of file EshelbianContact.cpp.

◆ uH1Ptr

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

Definition at line 1356 of file EshelbianContact.cpp.


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