12#ifndef __POSTPROC_ON_REF_MESH_HPP
13#define __POSTPROC_ON_REF_MESH_HPP
33 std::map<std::string, std::vector<VectorDouble>>
fieldMap;
34 std::map<std::string, std::vector<MatrixDouble>>
gradMap;
59 std::vector<EntityHandle> &map_gauss_pts,
60 const std::string
field_name,
const std::string tag_name,
70 MoFEMErrorCode
doWork(
int side, EntityType type,
71 EntitiesFieldData::EntData &data);
92 std::vector<EntityHandle> &map_gauss_pts,
94 const std::string tag_name,
106 MoFEMErrorCode
doWork(
int side, EntityType type,
107 EntitiesFieldData::EntData &data);
131 ParallelComm *pcomm_post_proc_mesh =
133 if (pcomm_post_proc_mesh != NULL)
134 delete pcomm_post_proc_mesh;
154 Vec
v = PETSC_NULLPTR) {
156 ELEMENT::getOpPtrVector().push_back(
173 const std::string tag_name,
174 Vec
v = PETSC_NULLPTR) {
176 ELEMENT::getOpPtrVector().push_back(
196 Vec
v = PETSC_NULLPTR) {
198 ELEMENT::getOpPtrVector().push_back(
215 const std::string tag_name,
216 Vec
v = PETSC_NULLPTR) {
218 ELEMENT::getOpPtrVector().push_back(
236 Vec
v = PETSC_NULLPTR) {
238 ELEMENT::getOpPtrVector().push_back(
254 const char *file_type =
"MOAB",
255 const char *file_options =
"PARALLEL=WRITE_PART") {
257 ParallelComm *pcomm_post_proc_mesh =
259 if (pcomm_post_proc_mesh == NULL)
261 "ParallelComm not allocated");
267template <
class VOLUME_ELEMENT>
277 bool ten_nodes_post_proc_tets =
true,
304 auto get_nb_of_ref_levels_from_options = [
this] {
307 PetscBool flg = PETSC_TRUE;
308 PetscOptionsGetInt(PETSC_NULLPTR, PETSC_NULLPTR,
309 "-my_max_post_proc_ref_level", &max_level, &flg);
317 auto generate_for_hex = [&]() {
321 moab::Interface &moab_ref = core_ref;
323 auto create_reference_element = [&moab_ref]() {
325 constexpr double base_coords[] = {0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0,
326 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1};
328 for (
int nn = 0; nn < 8; nn++)
329 CHKERR moab_ref.create_vertex(&base_coords[3 * nn], nodes[nn]);
331 CHKERR moab_ref.create_element(MBHEX, nodes, 8, hex);
335 auto add_ho_nodes = [&]() {
338 CHKERR moab_ref.get_entities_by_type(0, MBHEX, hexes,
true);
340 CHKERR moab_ref.create_meshset(MESHSET_SET, meshset);
341 CHKERR moab_ref.add_entities(meshset, hexes);
342 CHKERR moab_ref.convert_entities(meshset,
true,
true,
true);
343 CHKERR moab_ref.delete_entities(&meshset, 1);
347 auto set_gauss_pts = [&](std::map<EntityHandle, int> &little_map) {
350 CHKERR moab_ref.get_entities_by_type(0, MBHEX, hexes,
true);
352 CHKERR moab_ref.get_connectivity(hexes, hexes_nodes,
false);
354 gauss_pts.resize(hexes_nodes.size(), 4,
false);
356 for (
auto node : hexes_nodes) {
357 CHKERR moab_ref.get_coords(&node, 1, &gauss_pts(gg, 0));
358 little_map[node] = gg;
361 gauss_pts = trans(gauss_pts);
365 auto set_ref_hexes = [&](std::map<EntityHandle, int> &little_map) {
368 CHKERR moab_ref.get_entities_by_type(0, MBHEX, hexes,
true);
371 for (
auto hex : hexes) {
374 CHKERR moab_ref.get_connectivity(hex, conn, num_nodes,
false);
375 if (ref_hexes.size2() != num_nodes) {
376 ref_hexes.resize(hexes.size(), num_nodes);
378 for (
int nn = 0; nn != num_nodes; ++nn) {
379 ref_hexes(hh, nn) = little_map[conn[nn]];
386 auto set_shape_functions = [&]() {
390 const auto nb_gauss_pts = gauss_pts.size2();
391 shape_functions.resize(nb_gauss_pts, 8);
392 for (
int gg = 0; gg != nb_gauss_pts; ++gg) {
393 const double ksi = gauss_pts(0, gg);
394 const double zeta = gauss_pts(1, gg);
395 const double eta = gauss_pts(2, gg);
412 CHKERR create_reference_element();
415 std::map<EntityHandle, int> little_map;
416 CHKERR set_gauss_pts(little_map);
417 CHKERR set_ref_hexes(little_map);
418 CHKERR set_shape_functions();
423 auto generate_for_tet = [&]() {
426 const int max_level = get_nb_of_ref_levels_from_options();
429 moab::Interface &moab_ref = core_ref;
431 auto create_reference_element = [&moab_ref]() {
433 constexpr double base_coords[] = {0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1};
435 for (
int nn = 0; nn < 4; nn++) {
437 moab_ref.create_vertex(&base_coords[3 * nn], nodes[nn]);
440 CHKERR moab_ref.create_element(MBTET, nodes, 4, tet);
447 auto refine_ref_tetrahedron = [
this, &m_field_ref, max_level]() {
452 m_field_ref.
getInterface<BitRefManager>()->setBitRefLevelByDim(
453 0, 3, BitRefLevel().set(0));
454 for (
int ll = 0; ll != max_level; ++ll) {
456 "Refine Level %d", ll);
459 ->getEntitiesByTypeAndRefLevel(
460 BitRefLevel().set(ll), BitRefLevel().set(), MBEDGE, edges);
463 ->getEntitiesByTypeAndRefLevel(
464 BitRefLevel().set(ll), BitRefLevel(ll).set(), MBTET, tets);
466 MeshRefinement *m_ref;
468 CHKERR m_ref->addVerticesInTheMiddleOfEdges(
469 edges, BitRefLevel().set(ll + 1));
470 CHKERR m_ref->refineTets(tets, BitRefLevel().set(ll + 1));
475 auto get_ref_gauss_pts_and_shape_functions = [
this, max_level, &moab_ref,
478 for (
int ll = 0; ll != max_level + 1; ++ll) {
482 ->getEntitiesByTypeAndRefLevel(
483 BitRefLevel().set(ll), BitRefLevel().set(ll), MBTET, tets);
486 CHKERR moab_ref.create_meshset(MESHSET_SET, meshset);
487 CHKERR moab_ref.add_entities(meshset, tets);
488 CHKERR moab_ref.convert_entities(meshset,
true,
false,
false);
489 CHKERR moab_ref.delete_entities(&meshset, 1);
492 CHKERR moab_ref.get_connectivity(tets, elem_nodes,
false);
495 gauss_pts.resize(elem_nodes.size(), 4,
false);
496 std::map<EntityHandle, int> little_map;
497 Range::iterator nit = elem_nodes.begin();
498 for (
int gg = 0; nit != elem_nodes.end(); nit++, gg++) {
499 CHKERR moab_ref.get_coords(&*nit, 1, &gauss_pts(gg, 0));
500 little_map[*nit] = gg;
502 gauss_pts = trans(gauss_pts);
505 Range::iterator tit = tets.begin();
506 for (
int tt = 0; tit != tets.end(); ++tit, ++tt) {
509 CHKERR moab_ref.get_connectivity(*tit, conn, num_nodes,
false);
511 ref_tets.resize(tets.size(), num_nodes);
513 for (
int nn = 0; nn != num_nodes; ++nn) {
514 ref_tets(tt, nn) = little_map[conn[nn]];
519 shape_functions.resize(elem_nodes.size(), 4);
521 &gauss_pts(1, 0), &gauss_pts(2, 0),
531 CHKERR create_reference_element();
532 CHKERR refine_ref_tetrahedron();
533 CHKERR get_ref_gauss_pts_and_shape_functions();
538 CHKERR generate_for_hex();
539 CHKERR generate_for_tet();
545 auto get_element_max_dofs_order = [&]() {
547 auto dofs_vec = this->getDataVectorDofsPtr();
548 for (
auto &dof : *dofs_vec) {
549 const int dof_order = dof->getDofOrder();
550 max_order = (max_order < dof_order) ? dof_order : max_order;
554 const auto dof_max_order = get_element_max_dofs_order();
555 return (dof_max_order > 0) ? (dof_max_order - 1) / 2 : 0;
568 auto type = type_from_handle(this->getFEEntityHandle());
570 auto set_gauss_pts = [&](
auto &level_gauss_pts_on_ref_mesh,
auto &level_ref,
571 auto &level_shape_functions,
573 auto start_vert_handle,
auto start_ele_handle,
574 auto &verts_array,
auto &conn,
auto &ver_count,
581 std::min(
getMaxLevel(), level_gauss_pts_on_ref_mesh.size() - 1);
583 auto &level_ref_gauss_pts = level_gauss_pts_on_ref_mesh[level];
584 auto &level_ref_ele = level_ref[level];
585 auto &shape_functions = level_shape_functions[level];
586 T::gaussPts.resize(level_ref_gauss_pts.size1(),
587 level_ref_gauss_pts.size2(),
false);
588 noalias(T::gaussPts) = level_ref_gauss_pts;
590 EntityHandle fe_ent = T::numeredEntFiniteElementPtr->getEnt();
594 T::mField.get_moab().get_connectivity(fe_ent, conn, num_nodes,
true);
595 T::coords.resize(3 * num_nodes,
false);
596 CHKERR T::mField.get_moab().get_coords(conn, num_nodes, &T::coords[0]);
599 const int num_nodes = level_ref_gauss_pts.size2();
604 &*shape_functions.data().begin());
606 &verts_array[0][ver_count], &verts_array[1][ver_count],
607 &verts_array[2][ver_count]);
608 for (
int gg = 0; gg != num_nodes; ++gg, ++ver_count) {
612 auto set_float_precision = [](
const double x) {
613 if (std::abs(x) < std::numeric_limits<float>::epsilon())
620 auto t_ele_coords = getFTensor1FromArray<3, 3>(T::coords);
621 for (
int nn = 0; nn != CN::VerticesPerEntity(type); ++nn) {
622 t_coords(
i) += t_n * t_ele_coords(
i);
627 for (
auto ii : {0, 1, 2})
628 t_coords(ii) = set_float_precision(t_coords(ii));
634 int def_in_the_loop = -1;
636 "NB_IN_THE_LOOP", 1, MB_TYPE_INTEGER, th,
637 MB_TAG_CREAT | MB_TAG_SPARSE, &def_in_the_loop);
640 const int num_el = level_ref_ele.size1();
641 const int num_nodes_on_ele = level_ref_ele.size2();
642 auto start_e = start_ele_handle + ele_count;
644 for (
auto tt = 0; tt != level_ref_ele.size1(); ++tt, ++ele_count) {
645 for (
int nn = 0; nn != num_nodes_on_ele; ++nn) {
646 conn[num_nodes_on_ele * ele_count + nn] =
651 const int n_in_the_loop = T::nInTheLoop;
679 "Element type not implemented");
694 T::getOpPtrVector().clear();
701 ParallelComm *pcomm_post_proc_mesh =
703 if (pcomm_post_proc_mesh != NULL)
704 delete pcomm_post_proc_mesh;
708 auto alloc_vertices_and_elements_on_post_proc_mesh = [&]() {
711 auto fe_ptr = this->problemPtr->numeredFiniteElementsPtr;
714 fe_ptr->template get<Composite_Name_And_Part_mi_tag>().lower_bound(
715 boost::make_tuple(this->getFEName(), this->getLoFERank()));
717 fe_ptr->template get<Composite_Name_And_Part_mi_tag>().upper_bound(
718 boost::make_tuple(this->getFEName(), this->getHiFERank()));
720 const int number_of_ents_in_the_loop = this->getLoopSize();
721 if (std::distance(miit, hi_miit) != number_of_ents_in_the_loop) {
723 "Wrong size of indicices. Inconsistent size number of iterated "
724 "elements iterated by problem and from range.");
727 int nb_tet_vertices = 0;
729 int nb_hex_vertices = 0;
732 for (; miit != hi_miit; ++miit) {
733 auto type = (*miit)->getEntType();
737 this->numeredEntFiniteElementPtr = *miit;
740 if (this->exeTestHook) {
741 add = this->exeTestHook(
this);
761 "Element type not implemented");
767 ReadUtilIface *iface;
771 CHKERR iface->get_node_coords(
779 CHKERR iface->get_node_coords(
794 CHKERR alloc_vertices_and_elements_on_post_proc_mesh();
802 auto update_elements = [&]() {
804 ReadUtilIface *iface;
826 auto resolve_shared_ents = [&]() {
828 ParallelComm *pcomm_post_proc_mesh =
830 if (pcomm_post_proc_mesh == NULL) {
833 pcomm_post_proc_mesh =
new ParallelComm(
848 int rank = T::mField.get_comm_rank();
852 CHKERR pcomm_post_proc_mesh->resolve_shared_ents(0);
857 CHKERR resolve_shared_ents();
867 T::getOpPtrVector().push_back(
878 std::vector<EntityHandle> &map_gauss_pts,
880 : VOLUME_ELEMENT::UserDataOperator(
field_name,
881 T::UserDataOperator::OPCOL),
884 MoFEMErrorCode
doWork(
int side, EntityType type,
885 EntitiesFieldData::EntData &data) {
888 if (data.getIndices().size() == 0)
892 th.resize(data.getFieldData().size());
894 double def_VAL[9] = {0, 0, 0};
898 for (
unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
899 std::ostringstream ss;
900 ss <<
"HDIV_FACE_" << side <<
"_" << dd;
902 ss.str().c_str(), 3, MB_TYPE_DOUBLE, th[dd],
903 MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
907 for (
unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
908 std::ostringstream ss;
909 ss <<
"HDIV_TET_" << dd;
911 ss.str().c_str(), 3, MB_TYPE_DOUBLE, th[dd],
912 MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
917 "data inconsistency");
920 for (
unsigned int gg = 0; gg < data.getN().size1(); gg++) {
921 for (
unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
923 &data.getVectorN<3>(gg)(dd, 0));
959 MoFEM::VolumeElementForcesAndSourcesCore> {
977 MoFEM::FatPrismElementForcesAndSourcesCore> {
982 bool ten_nodes_post_proc_tets =
true)
999 typedef multi_index_container<
1001 indexed_by<ordered_unique<composite_key<
1002 PointsMap3D, member<PointsMap3D, const int, &PointsMap3D::kSi>,
1003 member<PointsMap3D, const int, &PointsMap3D::eTa>,
1004 member<PointsMap3D, const int, &PointsMap3D::zEta>>>>>
1015 std::map<EntityHandle, std::vector<PointsMap3D_multiIndex>>
1035 MoFEM::FaceElementForcesAndSourcesCore> {
1040 bool six_node_post_proc_tris =
true)
1066 :
public FaceElementForcesAndSourcesCore::UserDataOperator {
1070 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide>
sideOpFe;
1078 moab::Interface &post_proc_mesh,
1079 std::vector<EntityHandle> &map_gauss_pts,
const std::string
field_name,
1080 const std::string tag_name,
1081 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
1082 const std::string vol_fe_name, boost::shared_ptr<MatrixDouble> mat_ptr,
1090 MoFEMErrorCode
doWork(
int side, EntityType type,
1091 EntitiesFieldData::EntData &data);
1098 const std::string
field_name,
const std::string vol_fe_name =
"dFE",
1099 boost::shared_ptr<MatrixDouble> grad_mat_ptr =
nullptr,
1100 bool save_on_tag =
true);
1103 const std::string
field_name,
const std::string vol_fe_name =
"dFE",
1104 boost::shared_ptr<MatrixDouble> mat_ptr =
nullptr,
1105 bool save_on_tag =
true);
1117 std::vector<double *>
1120 std::vector<double *>
1156 bool six_node_post_proc_tris =
true)
1186template <
int DIM1,
int DIM2>
1189 using DataMapVec = std::map<std::string, boost::shared_ptr<VectorDouble>>;
1190 using DataMapMat = std::map<std::string, boost::shared_ptr<MatrixDouble>>;
1204 std::vector<EntityHandle> &map_gauss_pts,
1213 std::fill(&doEntities[MBEDGE], &doEntities[MBMAXTYPE],
false);
1215 MoFEMErrorCode
doWork(
int side, EntityType type,
1216 EntitiesFieldData::EntData &data);
1227template <
int DIM1,
int DIM2>
1230 EntitiesFieldData::EntData &data) {
1233 std::array<double, 9> def;
1234 std::fill(def.begin(), def.end(), 0);
1236 auto get_tag = [&](
const std::string name,
size_t size) {
1238 CHKERR postProcMesh.tag_get_handle(name.c_str(), size, MB_TYPE_DOUBLE, th,
1239 MB_TAG_CREAT | MB_TAG_SPARSE,
1244 MatrixDouble3by3 mat(3, 3);
1246 auto set_vector_3d = [&](
auto &
t) -> MatrixDouble3by3 & {
1248 for (
size_t r = 0; r !=
DIM1; ++r)
1253 auto set_matrix_3d = [&](
auto &
t) -> MatrixDouble3by3 & {
1255 for (
size_t r = 0; r !=
DIM1; ++r)
1256 for (
size_t c = 0;
c !=
DIM2; ++
c)
1257 mat(r,
c) =
t(r,
c);
1261 auto set_matrix_symm_3d = [&](
auto &
t) -> MatrixDouble3by3 & {
1263 for (
size_t r = 0; r !=
DIM1; ++r)
1264 for (
size_t c = 0;
c !=
DIM1; ++
c)
1265 mat(r,
c) =
t(r,
c);
1269 auto set_scalar = [&](
auto t) -> MatrixDouble3by3 & {
1275 auto set_float_precision = [](
const double x) {
1276 if (std::abs(x) < std::numeric_limits<float>::epsilon())
1282 auto set_tag = [&](
auto th,
auto gg, MatrixDouble3by3 &mat) {
1283 for (
auto &
v : mat.data())
1284 v = set_float_precision(
v);
1285 return postProcMesh.tag_set_data(th, &mapGaussPts[gg], 1,
1286 &*mat.data().begin());
1289 for (
auto &
m : dataMapScalar) {
1290 auto th = get_tag(
m.first, 1);
1291 auto t_scl = getFTensor0FromVec(*
m.second);
1292 auto nb_integration_pts = getGaussPts().size2();
1294 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1295 CHKERR set_tag(th, gg, set_scalar(t_scl));
1300 for (
auto &
m : dataMapVec) {
1301 auto th = get_tag(
m.first, 3);
1302 auto t_vec = getFTensor1FromMat<DIM1>(*
m.second);
1303 auto nb_integration_pts = getGaussPts().size2();
1305 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1306 CHKERR set_tag(th, gg, set_vector_3d(t_vec));
1311 for (
auto &
m : dataMapMat) {
1312 auto th = get_tag(
m.first, 9);
1313 auto t_mat = getFTensor2FromMat<DIM1, DIM2>(*
m.second);
1314 auto nb_integration_pts = getGaussPts().size2();
1316 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1317 CHKERR set_tag(th, gg, set_matrix_3d(t_mat));
1322 for (
auto &
m : dataMapSymmMat) {
1323 auto th = get_tag(
m.first, 9);
1324 auto t_mat = getFTensor2SymmetricFromMat<DIM1>(*
m.second);
1325 auto nb_integration_pts = getGaussPts().size2();
1327 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1328 CHKERR set_tag(th, gg, set_matrix_symm_3d(t_mat));
ForcesAndSourcesCore::UserDataOperator UserDataOperator
#define MOFEM_TAG_AND_LOG_C(channel, severity, tag, format,...)
Tag and log in channel.
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MYPCOMM_INDEX
default communicator number PCOMM
#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.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
MoFEMErrorCode addFieldValuesPostProc(const std::string field_name, const std::string tag_name, Vec v=PETSC_NULLPTR)
Add operator to post-process L2 or H1 field value.
MoFEMErrorCode addFieldValuesGradientPostProc(const std::string field_name, const std::string tag_name, Vec v=PETSC_NULLPTR)
Add operator to post-process L2 or H1 field gradient.
MoFEMErrorCode addFieldValuesPostProc(const std::string field_name, Vec v=PETSC_NULLPTR)
Add operator to post-process L2, H1, Hdiv, Hcurl field value.
MoFEMErrorCode addFieldValuesGradientPostProc(const std::string field_name, Vec v=PETSC_NULLPTR)
Add operator to post-process L2 or H1 field gradient.
MoFEMErrorCode writeFile(const std::string file_name, const char *file_type="MOAB", const char *file_options="PARALLEL=WRITE_PART")
wrote results in (MOAB) format, use "file_name.h5m"
MoFEMErrorCode addFieldValuesGradientPostProc(const std::string field_name, int space_dim, Vec v=PETSC_NULLPTR)
Add operator to post-process L2 or H1 field gradient.
constexpr int nb_ref_levels
Three levels of refinement.
FTensor::Index< 'i', SPACE_DIM > i
const double c
speed of light (cm/ns)
const double v
phase velocity of light in medium (cm/ns)
implementation of Data Operators for Forces and Sources
double zeta
Viscous hardening.
constexpr double t
plate stiffness
constexpr auto field_name
FTensor::Index< 'm', 3 > m
Deprecated interface functions.
default operator for TRI element
FatPrismElementForcesAndSourcesCore(Interface &m_field)
friend class ForcesAndSourcesCore
@ OPCOL
operator doWork function is executed on FE columns
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Volume finite element base.
Post post-proc data at points from hash maps.
std::map< std::string, boost::shared_ptr< MatrixDouble > > DataMapMat
moab::Interface & postProcMesh
OpPostProcMap(moab::Interface &post_proc_mesh, std::vector< EntityHandle > &map_gauss_pts, DataMapVec data_map_scalar, DataMapMat data_map_vec, DataMapMat data_map_mat, DataMapMat data_symm_map_mat)
Construct a new OpPostProcMap object.
std::vector< EntityHandle > & mapGaussPts
std::map< std::string, boost::shared_ptr< VectorDouble > > DataMapVec
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
DataMapMat dataMapSymmMat
std::map< std::string, std::vector< VectorDouble > > fieldMap
std::map< std::string, std::vector< MatrixDouble > > gradMap
operator to post-process (save gradients on refined post-processing mesh) field gradient
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
std::vector< EntityHandle > & mapGaussPts
moab::Interface & postProcMesh
const std::string tagName
OpGetFieldGradientValues(moab::Interface &post_proc_mesh, std::vector< EntityHandle > &map_gauss_pts, const std::string field_name, const std::string tag_name, CommonData &common_data, Vec v=PETSC_NULLPTR, int space_dim=3)
operator to post-process (save gradients on refined post-processing mesh) field gradient
const std::string tagName
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
std::vector< EntityHandle > & mapGaussPts
moab::Interface & postProcMesh
OpGetFieldValues(moab::Interface &post_proc_mesh, std::vector< EntityHandle > &map_gauss_pts, const std::string field_name, const std::string tag_name, CommonData &common_data, Vec v=PETSC_NULLPTR)
Set of operators and data structures used for post-processing.
MoFEMErrorCode postProcess()
function is run at the end of loop
MoFEMErrorCode preProcess()
function is run at the beginning of loop
MoFEMErrorCode setGaussPts(int order)
virtual PostProcCommonOnRefMesh::CommonData & getCommonData()
PostProcEdgeOnRefinedMesh(MoFEM::Interface &m_field, bool six_node_post_proc_tris=true)
std::map< EntityHandle, EntityHandle > elementsMap
MoFEMErrorCode generateReferenceElementMesh()
Postprocess 2d face elements.
const std::string feVolName
boost::shared_ptr< MatrixDouble > matPtr
moab::Interface & postProcMesh
OpGetFieldValuesOnSkinImpl(moab::Interface &post_proc_mesh, std::vector< EntityHandle > &map_gauss_pts, const std::string field_name, const std::string tag_name, boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > side_fe, const std::string vol_fe_name, boost::shared_ptr< MatrixDouble > mat_ptr, bool save_on_tag)
const std::string tagName
const std::string fieldName
std::vector< EntityHandle > & mapGaussPts
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
boost::shared_ptr< VolumeElementForcesAndSourcesCoreOnSide > sideOpFe
EntityHandle * quadConn
Connectivity for created quad elements.
int numberOfTriangles
Number of triangles to create.
MoFEMErrorCode addFieldValuesPostProcOnSkin(const std::string field_name, const std::string vol_fe_name="dFE", boost::shared_ptr< MatrixDouble > mat_ptr=nullptr, bool save_on_tag=true)
MoFEMErrorCode setGaussPts(int order)
MoFEMErrorCode generateReferenceElementMesh()
std::vector< double * > verticesOnTriArrays
MoFEMErrorCode preProcess()
function is run at the beginning of loop
int numberOfQuads
NUmber of quads to create.
std::map< EntityHandle, EntityHandle > elementsMap
std::vector< double * > verticesOnQuadArrays
EntityHandle startingVertQuadHandle
Starting handle for vertices on quads.
virtual PostProcCommonOnRefMesh::CommonData & getCommonData()
PostProcFaceOnRefinedMesh(MoFEM::Interface &m_field, bool six_node_post_proc_tris=true)
MoFEMErrorCode addFieldValuesGradientPostProcOnSkin(const std::string field_name, const std::string vol_fe_name="dFE", boost::shared_ptr< MatrixDouble > grad_mat_ptr=nullptr, bool save_on_tag=true)
MatrixDouble gaussPtsQuad
Gauss points coordinates on reference quad.
EntityHandle startingVertTriHandle
Starting handle for vertices on triangles.
EntityHandle startingEleQuadHandle
Starting handle for quads post proc.
MoFEMErrorCode postProcess()
function is run at the end of loop
MatrixDouble gaussPtsTri
Gauss points coordinates on reference triangle.
EntityHandle startingEleTriHandle
Starting handle for triangles post proc.
EntityHandle * triConn
Connectivity for created tri elements.
PointsMap3D(const int ksi, const int eta, const int zeta, const int nn)
multi_index_container< PointsMap3D, indexed_by< ordered_unique< composite_key< PointsMap3D, member< PointsMap3D, const int, &PointsMap3D::kSi >, member< PointsMap3D, const int, &PointsMap3D::eTa >, member< PointsMap3D, const int, &PointsMap3D::zEta > > > > > PointsMap3D_multiIndex
int getRuleThroughThickness(int order)
std::map< EntityHandle, std::vector< EntityHandle > > elementsMap
PostProcFatPrismOnRefinedMesh(MoFEM::Interface &m_field, bool ten_nodes_post_proc_tets=true)
MoFEMErrorCode setGaussPtsTrianglesOnly(int order_triangles_only)
int getRuleTrianglesOnly(int order)
MoFEMErrorCode preProcess()
function is run at the beginning of loop
MoFEMErrorCode setGaussPtsThroughThickness(int order_thickness)
std::map< EntityHandle, std::vector< PointsMap3D_multiIndex > > pointsMapVectorMap
virtual PostProcCommonOnRefMesh::CommonData & getCommonData()
MoFEMErrorCode generateReferenceElementMesh()
MoFEMErrorCode postProcess()
function is run at the end of loop
bool tenNodesPostProcTets
Generic post-processing class.
std::vector< EntityHandle > mapGaussPts
boost::shared_ptr< WrapMPIComm > wrapRefMeshComm
virtual ~PostProcTemplateOnRefineMesh()
virtual PostProcCommonOnRefMesh::CommonData & getCommonData()
moab::Interface & postProcMesh
PostProcTemplateOnRefineMesh(MoFEM::Interface &m_field)
moab::Interface & postProcMesh
OpHdivFunctions(moab::Interface &post_proc_mesh, std::vector< EntityHandle > &map_gauss_pts, const std::string field_name)
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
std::vector< EntityHandle > & mapGaussPts
MoFEMErrorCode generateReferenceElementMesh()
Generate reference mesh on single element.
std::vector< MatrixDouble > levelGaussPtsOnRefMeshTets
std::vector< ublas::matrix< int > > levelRefTets
size_t getMaxLevel() const
PostProcTemplateOnRefineMesh< VOLUME_ELEMENT > T
EntityHandle startingEleHexHandle
EntityHandle startingVertHexHandle
std::vector< MatrixDouble > levelShapeFunctionsHexes
PostProcTemplateVolumeOnRefinedMesh(MoFEM::Interface &m_field, bool ten_nodes_post_proc_tets=true, int nb_ref_levels=-1)
std::vector< double * > verticesOnHexArrays
MoFEMErrorCode setGaussPts(int order)
Set integration points.
std::vector< double * > verticesOnTetArrays
virtual PostProcCommonOnRefMesh::CommonData & getCommonData()
bool tenNodesPostProcTets
std::vector< MatrixDouble > levelGaussPtsOnRefMeshHexes
MoFEMErrorCode addHdivFunctionsPostProc(const std::string field_name)
Add operator to post-process Hdiv field.
EntityHandle startingVertTetHandle
MoFEMErrorCode preProcess()
std::vector< MatrixDouble > levelShapeFunctionsTets
std::vector< ublas::matrix< int > > levelRefHexes
PostProcCommonOnRefMesh::CommonDataForVolume CommonData
MoFEMErrorCode postProcess()
MoFEMErrorCode clearOperators()
Clear operators list.
EntityHandle startingEleTetHandle