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,
71 EntitiesFieldData::EntData &data);
92 std::vector<EntityHandle> &map_gauss_pts,
94 const std::string tag_name,
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_NULL) {
156 ELEMENT::getOpPtrVector().push_back(
173 const std::string tag_name,
174 Vec
v = PETSC_NULL) {
176 ELEMENT::getOpPtrVector().push_back(
196 Vec
v = PETSC_NULL) {
198 ELEMENT::getOpPtrVector().push_back(
215 const std::string tag_name,
216 Vec
v = PETSC_NULL) {
218 ELEMENT::getOpPtrVector().push_back(
236 Vec
v = PETSC_NULL) {
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_NULL, PETSC_NULL,
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;
677 "Element type not implemented");
692 T::getOpPtrVector().clear();
699 ParallelComm *pcomm_post_proc_mesh =
701 if (pcomm_post_proc_mesh != NULL)
702 delete pcomm_post_proc_mesh;
706 auto alloc_vertices_and_elements_on_post_proc_mesh = [&]() {
709 auto fe_ptr = this->problemPtr->numeredFiniteElementsPtr;
712 fe_ptr->template get<Composite_Name_And_Part_mi_tag>().lower_bound(
713 boost::make_tuple(this->getFEName(), this->getLoFERank()));
715 fe_ptr->template get<Composite_Name_And_Part_mi_tag>().upper_bound(
716 boost::make_tuple(this->getFEName(), this->getHiFERank()));
718 const int number_of_ents_in_the_loop = this->getLoopSize();
719 if (std::distance(miit, hi_miit) != number_of_ents_in_the_loop) {
721 "Wrong size of indicices. Inconsistent size number of iterated "
722 "elements iterated by problem and from range.");
725 int nb_tet_vertices = 0;
727 int nb_hex_vertices = 0;
730 for (; miit != hi_miit; ++miit) {
731 auto type = (*miit)->getEntType();
735 this->numeredEntFiniteElementPtr = *miit;
738 if (this->exeTestHook) {
739 add = this->exeTestHook(
this);
759 "Element type not implemented");
765 ReadUtilIface *iface;
769 CHKERR iface->get_node_coords(
777 CHKERR iface->get_node_coords(
792 CHKERR alloc_vertices_and_elements_on_post_proc_mesh();
800 auto update_elements = [&]() {
802 ReadUtilIface *iface;
824 auto resolve_shared_ents = [&]() {
826 ParallelComm *pcomm_post_proc_mesh =
828 if (pcomm_post_proc_mesh == NULL) {
831 pcomm_post_proc_mesh =
new ParallelComm(
846 int rank = T::mField.get_comm_rank();
850 CHKERR pcomm_post_proc_mesh->resolve_shared_ents(0);
855 CHKERR resolve_shared_ents();
865 T::getOpPtrVector().push_back(
876 std::vector<EntityHandle> &map_gauss_pts,
883 EntitiesFieldData::EntData &data) {
886 if (data.getIndices().size() == 0)
890 th.resize(data.getFieldData().size());
892 double def_VAL[9] = {0, 0, 0};
896 for (
unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
897 std::ostringstream ss;
898 ss <<
"HDIV_FACE_" << side <<
"_" << dd;
900 ss.str().c_str(), 3, MB_TYPE_DOUBLE, th[dd],
901 MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
905 for (
unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
906 std::ostringstream ss;
907 ss <<
"HDIV_TET_" << dd;
909 ss.str().c_str(), 3, MB_TYPE_DOUBLE, th[dd],
910 MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
915 "data inconsistency");
918 for (
unsigned int gg = 0; gg < data.getN().size1(); gg++) {
919 for (
unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
921 &data.getVectorN<3>(gg)(dd, 0));
957 MoFEM::VolumeElementForcesAndSourcesCore> {
961 PostProcTemplateVolumeOnRefinedMesh;
975 MoFEM::FatPrismElementForcesAndSourcesCore> {
980 bool ten_nodes_post_proc_tets =
true)
997 typedef multi_index_container<
999 indexed_by<ordered_unique<composite_key<
1000 PointsMap3D, member<PointsMap3D, const int, &PointsMap3D::kSi>,
1001 member<PointsMap3D, const int, &PointsMap3D::eTa>,
1002 member<PointsMap3D, const int, &PointsMap3D::zEta>>>>>
1013 std::map<EntityHandle, std::vector<PointsMap3D_multiIndex>>
1033 MoFEM::FaceElementForcesAndSourcesCore> {
1038 bool six_node_post_proc_tris =
true)
1064 :
public FaceElementForcesAndSourcesCore::UserDataOperator {
1068 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide>
sideOpFe;
1076 moab::Interface &post_proc_mesh,
1077 std::vector<EntityHandle> &map_gauss_pts,
const std::string
field_name,
1078 const std::string tag_name,
1079 boost::shared_ptr<VolumeElementForcesAndSourcesCoreOnSide> side_fe,
1080 const std::string vol_fe_name, boost::shared_ptr<MatrixDouble> mat_ptr,
1089 EntitiesFieldData::EntData &data);
1096 const std::string
field_name,
const std::string vol_fe_name =
"dFE",
1097 boost::shared_ptr<MatrixDouble> grad_mat_ptr =
nullptr,
1098 bool save_on_tag =
true);
1101 const std::string
field_name,
const std::string vol_fe_name =
"dFE",
1102 boost::shared_ptr<MatrixDouble> mat_ptr =
nullptr,
1103 bool save_on_tag =
true);
1115 std::vector<double *>
1118 std::vector<double *>
1154 bool six_node_post_proc_tris =
true)
1184template <
int DIM1,
int DIM2>
1187 using DataMapVec = std::map<std::string, boost::shared_ptr<VectorDouble>>;
1188 using DataMapMat = std::map<std::string, boost::shared_ptr<MatrixDouble>>;
1202 std::vector<EntityHandle> &map_gauss_pts,
1211 std::fill(&doEntities[MBEDGE], &doEntities[MBMAXTYPE],
false);
1214 EntitiesFieldData::EntData &data);
1225template <
int DIM1,
int DIM2>
1228 EntitiesFieldData::EntData &data) {
1231 std::array<double, 9> def;
1232 std::fill(def.begin(), def.end(), 0);
1234 auto get_tag = [&](
const std::string name,
size_t size) {
1236 CHKERR postProcMesh.tag_get_handle(name.c_str(), size, MB_TYPE_DOUBLE, th,
1237 MB_TAG_CREAT | MB_TAG_SPARSE,
1242 MatrixDouble3by3 mat(3, 3);
1244 auto set_vector_3d = [&](
auto &
t) -> MatrixDouble3by3 & {
1246 for (
size_t r = 0; r != DIM1; ++r)
1251 auto set_matrix_3d = [&](
auto &
t) -> MatrixDouble3by3 & {
1253 for (
size_t r = 0; r != DIM1; ++r)
1254 for (
size_t c = 0;
c != DIM2; ++
c)
1255 mat(r,
c) =
t(r,
c);
1259 auto set_matrix_symm_3d = [&](
auto &
t) -> MatrixDouble3by3 & {
1261 for (
size_t r = 0; r != DIM1; ++r)
1262 for (
size_t c = 0;
c != DIM1; ++
c)
1263 mat(r,
c) =
t(r,
c);
1267 auto set_scalar = [&](
auto t) -> MatrixDouble3by3 & {
1273 auto set_float_precision = [](
const double x) {
1274 if (std::abs(x) < std::numeric_limits<float>::epsilon())
1280 auto set_tag = [&](
auto th,
auto gg, MatrixDouble3by3 &mat) {
1281 for (
auto &
v : mat.data())
1282 v = set_float_precision(
v);
1283 return postProcMesh.tag_set_data(th, &mapGaussPts[gg], 1,
1284 &*mat.data().begin());
1287 for (
auto &
m : dataMapScalar) {
1288 auto th = get_tag(
m.first, 1);
1289 auto t_scl = getFTensor0FromVec(*
m.second);
1290 auto nb_integration_pts = getGaussPts().size2();
1292 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1293 CHKERR set_tag(th, gg, set_scalar(t_scl));
1298 for (
auto &
m : dataMapVec) {
1299 auto th = get_tag(
m.first, 3);
1300 auto t_vec = getFTensor1FromMat<DIM1>(*
m.second);
1301 auto nb_integration_pts = getGaussPts().size2();
1303 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1304 CHKERR set_tag(th, gg, set_vector_3d(t_vec));
1309 for (
auto &
m : dataMapMat) {
1310 auto th = get_tag(
m.first, 9);
1311 auto t_mat = getFTensor2FromMat<DIM1, DIM2>(*
m.second);
1312 auto nb_integration_pts = getGaussPts().size2();
1314 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1315 CHKERR set_tag(th, gg, set_matrix_3d(t_mat));
1320 for (
auto &
m : dataMapSymmMat) {
1321 auto th = get_tag(
m.first, 9);
1322 auto t_mat = getFTensor2SymmetricFromMat<DIM1>(*
m.second);
1323 auto nb_integration_pts = getGaussPts().size2();
1325 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1326 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.
FTensor::Index< 'm', SPACE_DIM > m
MoFEMErrorCode addFieldValuesPostProc(const std::string field_name, const std::string tag_name, Vec v=PETSC_NULL)
Add operator to post-process L2 or H1 field value.
MoFEMErrorCode addFieldValuesGradientPostProc(const std::string field_name, Vec v=PETSC_NULL)
Add operator to post-process L2 or H1 field gradient.
MoFEMErrorCode addFieldValuesPostProc(const std::string field_name, Vec v=PETSC_NULL)
Add operator to post-process L2, H1, Hdiv, Hcurl field value.
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_NULL)
Add operator to post-process L2 or H1 field gradient.
MoFEMErrorCode addFieldValuesGradientPostProc(const std::string field_name, const std::string tag_name, Vec v=PETSC_NULL)
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
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 refernce 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
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
std::map< std::string, boost::shared_ptr< VectorDouble > > DataMapVec
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_NULL, 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)
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_NULL)
std::vector< EntityHandle > & mapGaussPts
moab::Interface & postProcMesh
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()
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
Postprocess 2d face elements.
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)
int getRuleThroughThickness(int order)
std::map< EntityHandle, std::vector< EntityHandle > > elementsMap
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
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.
PostProcCommonOnRefMesh::CommonDataForVolume CommonData
std::vector< MatrixDouble > levelGaussPtsOnRefMeshTets
std::vector< ublas::matrix< int > > levelRefTets
size_t getMaxLevel() const
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
PostProcTemplateOnRefineMesh< VOLUME_ELEMENT > T
MoFEMErrorCode preProcess()
std::vector< MatrixDouble > levelShapeFunctionsTets
std::vector< ublas::matrix< int > > levelRefHexes
MoFEMErrorCode postProcess()
MoFEMErrorCode clearOperators()
Clear operators list.
EntityHandle startingEleTetHandle