1385 {
1387
1389
1390 auto get_body_id = [&](auto fe_ent) {
1391 for (
auto &
m : contact_tree_ptr->bodyMap) {
1392 if (
m.second.find(fe_ent) !=
m.second.end()) {
1394 }
1395 }
1396 return -1;
1397 };
1398
1399 auto &moab_post_proc_mesh = contact_tree_ptr->getPostProcMesh();
1400 auto &post_proc_ents = contact_tree_ptr->getPostProcElements();
1401
1402 auto fe_ent = getNumeredEntFiniteElementPtr()->getEnt();
1404 auto body_id = get_body_id(fe_ent);
1405 auto &map_gauss_pts = contact_tree_ptr->getMapGaussPts();
1406
1407 CHKERR moab_post_proc_mesh.tag_clear_data(contact_tree_ptr->thEleId,
1408 post_proc_ents, &fe_id);
1409 CHKERR moab_post_proc_mesh.tag_clear_data(contact_tree_ptr->thBodyId,
1410 post_proc_ents, &body_id);
1411
1412 auto nb_gauss_pts = getGaussPts().size2();
1413 auto t_u_h1 = getFTensor1FromMat<3>(*
uH1Ptr);
1414 auto t_u_l2 = getFTensor1FromMat<3>(
commonDataPtr->contactDisp);
1415 auto t_coords = getFTensor1CoordsAtGaussPts();
1416
1418 auto t_x_h1 = getFTensor1FromPtr<3>(&x_h1(0, 0));
1420 auto t_x_l2 = getFTensor1FromPtr<3>(&x_l2(0, 0));
1423
1425
1426
1427 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
1428 t_x_h1(
i) = t_coords(
i) + t_u_h1(
i);
1429 t_x_l2(
i) = t_coords(
i) + t_u_l2(
i);
1430
1431 ++t_coords;
1432 ++t_u_h1;
1433 ++t_u_l2;
1434 ++t_x_h1;
1435 ++t_x_l2;
1436 }
1437
1438 CHKERR moab_post_proc_mesh.set_coords(
1439 &*map_gauss_pts.begin(), map_gauss_pts.size(), &*x_h1.data().begin());
1440 CHKERR moab_post_proc_mesh.tag_set_data(
1441 contact_tree_ptr->thSmallX, &*map_gauss_pts.begin(),
1442 map_gauss_pts.size(), &*x_h1.data().begin());
1443 CHKERR moab_post_proc_mesh.tag_set_data(
1444 contact_tree_ptr->thLargeX, &*map_gauss_pts.begin(),
1445 map_gauss_pts.size(), &*coords.data().begin());
1446 CHKERR moab_post_proc_mesh.tag_set_data(
1447 contact_tree_ptr->thTraction, &*map_gauss_pts.begin(),
1448 map_gauss_pts.size(), &*tractions.data().begin());
1449
1450 } else {
1452 "ContactTree pointer expired in OpMoveNode");
1453 }
1454
1456}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#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