1372 {
1374
1376
1377 auto get_body_id = [&](auto fe_ent) {
1378 for (
auto &
m : contact_tree_ptr->bodyMap) {
1379 if (
m.second.find(fe_ent) !=
m.second.end()) {
1381 }
1382 }
1383 return -1;
1384 };
1385
1386 auto &moab_post_proc_mesh = contact_tree_ptr->getPostProcMesh();
1387 auto &post_proc_ents = contact_tree_ptr->getPostProcElements();
1388
1389 auto fe_ent = getNumeredEntFiniteElementPtr()->getEnt();
1391 auto body_id = get_body_id(fe_ent);
1392 auto &map_gauss_pts = contact_tree_ptr->getMapGaussPts();
1393
1394 CHKERR moab_post_proc_mesh.tag_clear_data(contact_tree_ptr->thEleId,
1395 post_proc_ents, &fe_id);
1396 CHKERR moab_post_proc_mesh.tag_clear_data(contact_tree_ptr->thBodyId,
1397 post_proc_ents, &body_id);
1398
1399 auto nb_gauss_pts = getGaussPts().size2();
1400 auto t_u_h1 = getFTensor1FromMat<3>(*
uH1Ptr);
1401 auto t_u_l2 = getFTensor1FromMat<3>(
commonDataPtr->contactDisp);
1402 auto t_coords = getFTensor1CoordsAtGaussPts();
1403
1405 auto t_x_h1 = getFTensor1FromPtr<3>(&x_h1(0, 0));
1407 auto t_x_l2 = getFTensor1FromPtr<3>(&x_l2(0, 0));
1410
1412
1413
1414 for (auto gg = 0; gg != nb_gauss_pts; ++gg) {
1415 t_x_h1(
i) = t_coords(
i) + t_u_h1(
i);
1416 t_x_l2(
i) = t_coords(
i) + t_u_l2(
i);
1417
1418 ++t_coords;
1419 ++t_u_h1;
1420 ++t_u_l2;
1421 ++t_x_h1;
1422 ++t_x_l2;
1423 }
1424
1425 CHKERR moab_post_proc_mesh.set_coords(
1426 &*map_gauss_pts.begin(), map_gauss_pts.size(), &*x_h1.data().begin());
1427 CHKERR moab_post_proc_mesh.tag_set_data(
1428 contact_tree_ptr->thSmallX, &*map_gauss_pts.begin(),
1429 map_gauss_pts.size(), &*x_h1.data().begin());
1430 CHKERR moab_post_proc_mesh.tag_set_data(
1431 contact_tree_ptr->thLargeX, &*map_gauss_pts.begin(),
1432 map_gauss_pts.size(), &*coords.data().begin());
1433 CHKERR moab_post_proc_mesh.tag_set_data(
1434 contact_tree_ptr->thTraction, &*map_gauss_pts.begin(),
1435 map_gauss_pts.size(), &*tractions.data().begin());
1436
1437 } else {
1439 "ContactTree pointer expired in OpMoveNode");
1440 }
1441
1443}
#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