12#ifndef __POSTPROCBROKENMESHINMOABBASE_HPP
13#define __POSTPROCBROKENMESHINMOABBASE_HPP
25 std::vector<MatrixDouble>
28 std::vector<MatrixDouble>
54 boost::shared_ptr<PostProcGenerateRefMeshBase>;
97 std::string opts_prefix =
"");
99 boost::shared_ptr<moab::Core> core_mesh_ptr,
100 std::string opts_prefix =
"");
165 boost::shared_ptr<moab::Core>
coreMeshPtr = boost::make_shared<moab::Core>();
170 std::map<EntityType, PostProcGenerateRefMeshPtr>
192 std::vector<Tag> tags_to_transfer) {
194 tagsToTransfer.swap(tags_to_transfer);
199 auto get_element_max_dofs_order = [&]() {
201 auto dofs_vec = E::getDataVectorDofsPtr();
202 for (
auto &dof : *dofs_vec) {
203 const int dof_order = dof->getDofOrder();
204 max_order = (max_order < dof_order) ? dof_order : max_order;
208 const auto dof_max_order = get_element_max_dofs_order();
209 return (dof_max_order > 0) ? (dof_max_order - 1) / 2 : 0;
216 auto &calc_mesh = this->mField.get_moab();
218 auto name = [&](
auto tag) {
224 auto data_type = [&](
auto tag) {
225 moab::DataType data_type;
231 auto type = [&](
auto tag) {
237 auto length = [&](
auto tag) {
239 CHK_MOAB_THROW(calc_mesh.tag_get_length(tag, length),
"get length ");
243 auto default_value = [&](
auto tag) {
246 CHK_MOAB_THROW(calc_mesh.tag_get_default_value(tag, def_val, size),
247 "get default tag value");
251 std::vector<double> tag_data_vec;
252 auto data_ptr = [&](
auto tag) {
253 const void *tag_data;
254 auto core_ent = this->getFEEntityHandle();
255 CHK_MOAB_THROW(calc_mesh.tag_get_by_ptr(tag, &core_ent, 1, &tag_data),
257 if (data_type(tag) == MB_TYPE_DOUBLE) {
258 tag_data_vec.resize(length(tag));
259 std::copy(
static_cast<const double *
>(tag_data),
260 static_cast<const double *
>(tag_data) + length(tag),
261 tag_data_vec.begin());
262 for (
auto &
v : tag_data_vec)
263 v = std::abs(
v) < std::numeric_limits<float>::min() ? 0. :
v;
264 for (
auto &
v : tag_data_vec)
265 v =
v > std::numeric_limits<float>::max()
266 ? std::numeric_limits<float>::max()
268 for (
auto &
v : tag_data_vec)
269 v =
v < std::numeric_limits<float>::lowest()
270 ? std::numeric_limits<float>::lowest()
272 return static_cast<const void *
>(tag_data_vec.data());
277 for (
auto tag : tagsToTransfer) {
279 CHKERR getPostProcMesh().tag_get_handle(
280 name(tag).c_str(), length(tag), data_type(tag), tag_postproc,
281 type(tag) | MB_TAG_CREAT, default_value(tag));
282 CHKERR getPostProcMesh().tag_clear_data(tag_postproc, postProcElements,
292 :
E(m_field), optionsPrefix(opts_prefix) {}
297 std::string opts_prefix)
320 ref_ele = refElementsMap.at(
type);
321 }
catch (
const out_of_range &e) {
324 "Generation of reference elements for type <%s> is not implemented",
325 moab::CN::EntityTypeName(
type));
328 auto set_gauss_pts = [&](
auto &level_gauss_pts_on_ref_mesh,
auto &level_ref,
329 auto &level_shape_functions,
331 auto start_vert_handle,
auto start_ele_handle,
332 auto &verts_array,
auto &conn,
auto &ver_count,
338 size_t level = getMaxLevel();
339 level = std::min(level, level_gauss_pts_on_ref_mesh.size() - 1);
341 auto &level_ref_gauss_pts = level_gauss_pts_on_ref_mesh[level];
342 auto &level_ref_ele = level_ref[level];
343 auto &shape_functions = level_shape_functions[level];
344 E::gaussPts.resize(level_ref_gauss_pts.size1(), level_ref_gauss_pts.size2(),
346 noalias(E::gaussPts) = level_ref_gauss_pts;
348 const auto fe_ent = E::numeredEntFiniteElementPtr->getEnt();
349 auto get_fe_coords = [&]() {
353 E::mField.get_moab().get_connectivity(fe_ent, conn, num_nodes,
true),
354 "error get connectivity");
357 E::mField.get_moab().get_coords(conn, num_nodes, &*coords.begin()),
358 "error get coordinates");
362 auto coords = get_fe_coords();
364 const int num_nodes = level_ref_gauss_pts.size2();
365 mapGaussPts.resize(level_ref_gauss_pts.size2());
369 &*shape_functions.data().begin());
371 &verts_array[0][ver_count], &verts_array[1][ver_count],
372 &verts_array[2][ver_count]);
373 for (
int gg = 0; gg != num_nodes; ++gg, ++ver_count) {
375 mapGaussPts[gg] = start_vert_handle + ver_count;
377 auto set_float_precision = [](
const double x) {
378 if (std::abs(x) < std::numeric_limits<float>::epsilon())
385 auto t_ele_coords = getFTensor1FromArray<3, 3>(coords);
386 for (
int nn = 0; nn != CN::VerticesPerEntity(
type); ++nn) {
387 t_coords(
i) += t_n * t_ele_coords(
i);
392 for (
auto ii : {0, 1, 2})
393 t_coords(ii) = set_float_precision(t_coords(ii));
399 int def_in_the_loop = -1;
400 CHKERR getPostProcMesh().tag_get_handle(
401 "NB_IN_THE_LOOP", 1, MB_TYPE_INTEGER,
th, MB_TAG_CREAT | MB_TAG_SPARSE,
404 postProcElements.clear();
405 const int num_el = level_ref_ele.size1();
406 const int num_nodes_on_ele = level_ref_ele.size2();
407 auto start_e = start_ele_handle + ele_count;
408 postProcElements =
Range(start_e, start_e + num_el - 1);
409 for (
auto tt = 0; tt != level_ref_ele.size1(); ++tt, ++ele_count) {
410 for (
int nn = 0; nn != num_nodes_on_ele; ++nn) {
411 conn[num_nodes_on_ele * ele_count + nn] =
412 mapGaussPts[level_ref_ele(tt, nn)];
416 const int n_in_the_loop = E::nInTheLoop;
417 CHKERR getPostProcMesh().tag_clear_data(
th, postProcElements,
426 ref_ele->levelGaussPtsOnRefMesh, ref_ele->levelRef,
427 ref_ele->levelShapeFunctions,
429 ref_ele->startingVertEleHandle, ref_ele->startingEleHandle,
430 ref_ele->verticesOnEleArrays, ref_ele->eleConn, ref_ele->countVertEle,
442auto get_ref_ele = [&](
const EntityType
type) {
445 auto it = refElementsMap.find(
type);
446 if (it != refElementsMap.end()) {
447 ref_ele_ptr = it->second;
451 ref_ele_ptr = boost::make_shared<PostProcGenerateRefMesh<MBTET>>();
454 ref_ele_ptr = boost::make_shared<PostProcGenerateRefMesh<MBHEX>>();
457 ref_ele_ptr = boost::make_shared<PostProcGenerateRefMesh<MBTRI>>();
460 ref_ele_ptr = boost::make_shared<PostProcGenerateRefMesh<MBQUAD>>();
463 ref_ele_ptr = boost::make_shared<PostProcGenerateRefMesh<MBEDGE>>();
467 <<
"Generation of reference elements for type < "
468 << moab::CN::EntityTypeName(
type) <<
" > is not implemented";
474 "Error when generating reference element");
476 refElementsMap[
type] = ref_ele_ptr;
482 auto fe_ptr = this->problemPtr->numeredFiniteElementsPtr;
485 fe_ptr->template get<Composite_Name_And_Part_mi_tag>().lower_bound(
486 boost::make_tuple(this->getFEName(), this->getLoFERank()));
488 fe_ptr->template get<Composite_Name_And_Part_mi_tag>().upper_bound(
489 boost::make_tuple(this->getFEName(), this->getHiFERank()));
491 const int number_of_ents_in_the_loop = this->getLoopSize();
492 if (std::distance(miit, hi_miit) != number_of_ents_in_the_loop) {
494 "Wrong size of indicies. Inconsistent size number of iterated "
495 "elements iterated by problem and from range.");
498 for (
auto &
m : refElementsMap) {
499 m.second->nbVertices = 0;
500 m.second->nbEles = 0;
501 m.second->countEle = 0;
502 m.second->countVertEle = 0;
505 for (; miit != hi_miit; ++miit) {
506 auto type = (*miit)->getEntType();
507 auto ref_ele = get_ref_ele(
type);
511 E::numeredEntFiniteElementPtr = *miit;
513 if (E::exeTestHook) {
514 add = E::exeTestHook(
this);
518 size_t level = getMaxLevel();
519 level = std::min(level, ref_ele->levelGaussPtsOnRefMesh.size() - 1);
520 ref_ele->nbVertices += ref_ele->levelGaussPtsOnRefMesh[level].size2();
521 ref_ele->nbEles += ref_ele->levelRef[level].size1();
525 auto alloc_vertices_and_elements_on_post_proc_mesh = [&]() {
528 ReadUtilIface *iface;
529 CHKERR getPostProcMesh().query_interface(iface);
531 for (
auto &
m : refElementsMap) {
532 if (
m.second->nbEles) {
533 CHKERR iface->get_node_coords(3,
m.second->nbVertices, 0,
534 m.second->startingVertEleHandle,
535 m.second->verticesOnEleArrays);
536 CHKERR iface->get_element_connect(
537 m.second->nbEles,
m.second->levelRef[0].size2(),
m.first, 0,
538 m.second->startingEleHandle,
m.second->eleConn);
540 m.second->countEle = 0;
541 m.second->countVertEle = 0;
548 CHKERR alloc_vertices_and_elements_on_post_proc_mesh();
557 auto update_elements = [&]() {
558 ReadUtilIface *iface;
559 CHKERR getPostProcMesh().query_interface(iface);
563 for (
auto &
m : refElementsMap) {
564 if (
m.second->nbEles) {
566 <<
"Update < " << moab::CN::EntityTypeName(
m.first)
567 <<
" number of processed " <<
m.second->countEle;
568 CHKERR iface->update_adjacencies(
569 m.second->startingEleHandle,
m.second->countEle,
570 m.second->levelRef[0].size2(),
m.second->eleConn);
571 ents.merge(
Range(
m.second->startingEleHandle,
572 m.second->startingEleHandle +
m.second->countEle - 1));
579 auto remove_obsolete_entities = [&]() {
582 for (
auto &
m : refElementsMap) {
583 if (
m.second->nbEles) {
584 ents.merge(
Range(
m.second->startingEleHandle,
585 m.second->startingEleHandle +
m.second->countEle - 1));
586 const int dim = moab::CN::Dimension(
m.first);
587 for (
auto d = 1; d != dim; ++d) {
588 CHKERR getPostProcMesh().get_adjacencies(ents, d,
false, adj,
589 moab::Interface::UNION);
593 CHKERR getPostProcMesh().delete_entities(adj);
597 auto set_proc_tags = [&]() {
599 auto pcomm_post_proc_mesh = getPostProcMeshPcommPtr();
600 if (pcomm_post_proc_mesh) {
602 for (
auto &
m : refElementsMap) {
603 if (
m.second->nbEles) {
605 Range(
m.second->startingEleHandle,
606 m.second->startingEleHandle +
m.second->countEle - 1));
609 int rank = E::mField.get_comm_rank();
610 CHKERR getPostProcMesh().tag_clear_data(pcomm_post_proc_mesh->part_tag(),
617 CHKERR remove_obsolete_entities();
627 CHKERR getPostProcMesh().delete_mesh();
639 auto pcomm_post_proc_mesh = getPostProcMeshPcommPtr();
640 if (!pcomm_post_proc_mesh)
642 "ParallelComm not allocated");
644 CHKERR postProcPostProc();
645 CHKERR pcomm_post_proc_mesh->resolve_shared_ents(0);
657 moab::Interface &post_proc_mesh_interface = *coreMeshPtr;
658 return post_proc_mesh_interface;
663 return postProcElements;
670 auto pcomm_post_proc_mesh = getPostProcMeshPcommPtr();
671 if (!pcomm_post_proc_mesh)
673 "ParallelComm not allocated");
675 auto &post_proc_mesh = getPostProcMesh();
676 Tag part_tag = pcomm_post_proc_mesh->part_tag();
679 0, MBENTITYSET, &part_tag, NULL, 1, tagged_sets,
680 moab::Interface::UNION),
681 "get partition sets");
682 if (tagged_sets.empty()) {
684 CHK_MOAB_THROW(post_proc_mesh.create_meshset(MESHSET_SET, part_set),
685 "create partition meshset");
688 CHK_MOAB_THROW(post_proc_mesh.get_entities_by_handle(0, ents,
false),
689 "get post-process entities");
690 ents = subtract(ents, ents.subset_by_type(MBENTITYSET));
692 "add entities to partition meshset");
694 int part = pcomm_post_proc_mesh->rank();
695 CHK_MOAB_THROW(post_proc_mesh.tag_set_data(part_tag, &part_set, 1, &part),
696 "tag partition meshset");
699 CHKERR getPostProcMesh().write_file(file_name.c_str(),
"MOAB",
700 "PARALLEL=WRITE_PART");
739 std::variant<boost::shared_ptr<VectorDouble>,
740 boost::shared_ptr<MatrixDouble>>;
742 using DataMapMat = std::map<std::string, boost::shared_ptr<MatrixDouble>>;
756 std::vector<EntityHandle> &map_gauss_pts,
764 std::fill(&O::doEntities[MBEDGE], &O::doEntities[MBMAXTYPE],
false);
778template <
int DIM1,
int DIM2,
typename O>
784 std::array<double, 9> def;
785 std::fill(def.begin(), def.end(), 0);
787 auto get_tag = [&](
const std::string name,
size_t size) {
789 CHKERR postProcMesh.tag_get_handle(name.c_str(), size, MB_TYPE_DOUBLE,
th,
790 MB_TAG_CREAT | MB_TAG_SPARSE,
799 for (
size_t r = 0; r !=
DIM1; ++r)
806 for (
size_t r = 0; r !=
DIM1; ++r)
807 for (
size_t c = 0;
c !=
DIM2; ++
c)
814 for (
size_t r = 0; r !=
DIM1; ++r)
815 for (
size_t c = 0;
c !=
DIM1; ++
c)
826 auto set_float_precision = [](
const double x) {
827 if (std::abs(x) < std::numeric_limits<float>::min())
828 return static_cast<float>(0.);
830 return static_cast<float>(x);
833 auto set_float_max = [](
const double x) {
834 if (x > std::numeric_limits<float>::max())
835 return std::numeric_limits<float>::max();
837 return static_cast<float>(x);
840 auto set_float_lowest = [](
const double x) {
841 if (x < std::numeric_limits<float>::lowest())
842 return std::numeric_limits<float>::lowest();
844 return static_cast<float>(x);
848 for (
auto &
v : mat.data())
849 v = set_float_max(set_float_lowest(set_float_precision(
v)));
850 return postProcMesh.tag_set_data(
th, &mapGaussPts[gg], 1,
851 &*mat.data().begin());
854 for (
auto &
m : dataMapScalar) {
855 if (
const auto *vec_ptr =
856 std::get_if<boost::shared_ptr<VectorDouble>>(&
m.second);
857 vec_ptr && *vec_ptr) {
858 auto th = get_tag(
m.first, 1);
860 auto nb_integration_pts = O::getGaussPts().size2();
861 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
862 CHKERR set_tag(
th, gg, set_scalar(t_scl));
865 }
else if (
const auto *mat_ptr =
866 std::get_if<boost::shared_ptr<MatrixDouble>>(&
m.second);
867 mat_ptr && *mat_ptr) {
868 auto th = get_tag(
m.first, 1);
869 auto nb_integration_pts = O::getGaussPts().size2();
870 for (
int gg = 0; gg != nb_integration_pts; ++gg)
871 CHKERR set_tag(
th, gg, set_scalar((**mat_ptr)(gg, 0)));
875 for (
auto &
m : dataMapVec) {
877 auto th = get_tag(
m.first, 3);
878 auto nb_integration_pts = O::getGaussPts().size2();
879 auto t_vec = getFTensor1FromMat<DIM1>(
m.second);
880 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
881 CHKERR set_tag(
th, gg, set_vector_3d(t_vec));
887 for (
auto &
m : dataMapMat) {
889 auto th = get_tag(
m.first, 9);
890 auto nb_integration_pts = O::getGaussPts().size2();
891 auto t_mat = getFTensor2FromMat<DIM1, DIM2>(
m.second);
892 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
893 CHKERR set_tag(
th, gg, set_matrix_3d(t_mat));
899 for (
auto &
m : dataMapSymmMat) {
901 auto th = get_tag(
m.first, 9);
902 auto nb_integration_pts = O::getGaussPts().size2();
903 auto t_mat = getFTensor2SymmetricFromMat<DIM1>(
m.second);
904 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
905 CHKERR set_tag(
th, gg, set_matrix_symm_3d(t_mat));
916template <
int DIM1,
int DIM2,
typename TagsRange,
919 moab::Interface &mesh,
920 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &post_proc_pip,
921 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &physical_pip,
922 moab::Interface &post_proc_mesh, std::vector<EntityHandle> &map_gauss_pts,
923 const TagsRange &tags,
int order,
927 using TagInfo = std::decay_t<
decltype(*std::begin(tags))>;
929 using DataMapVec =
typename MapOp::DataMapVec;
930 using DataMapMat =
typename MapOp::DataMapMat;
932 struct OpReadTagData :
public Op {
933 using MatrixPtr = boost::shared_ptr<MatrixDouble>;
935 OpReadTagData(moab::Interface &mesh,
936 boost::shared_ptr<std::vector<TagInfo>> tags_ptr,
937 boost::shared_ptr<std::vector<MatrixPtr>> mats_ptr)
938 :
Op(
NOSPACE, Op::OPSPACE), meshRef(mesh), tagsPtr(tags_ptr),
948 const auto nb_gauss_pts = Op::getGaussPts().size2();
949 const auto ent = Op::getFEEntityHandle();
951 for (
size_t ii = 0; ii != tagsPtr->size(); ++ii) {
952 const auto &[name, tag, num_components] = (*tagsPtr)[ii];
953 auto &mat = *(*matsPtr)[ii];
954 mat.resize(nb_gauss_pts, num_components,
false);
955 std::fill(mat.data().begin(), mat.data().end(), 0.);
960 double *tag_data =
nullptr;
963 meshRef.tag_get_by_ptr(tag, &ent, 1, (
const void **)&tag_data,
965 if (rval != MB_SUCCESS || !tag_data || tag_size <= 0)
968 if (tag_size % num_components != 0) {
970 "Inconsistent tag size for %s", name.c_str());
973 const auto stored_nb_gauss_pts = tag_size / num_components;
974 const auto copy_nb_gauss_pts =
975 std::min<int>(nb_gauss_pts, stored_nb_gauss_pts);
976 for (
int gg = 0; gg != copy_nb_gauss_pts; ++gg)
977 for (
int cc = 0; cc != num_components; ++cc)
978 mat(gg, cc) = tag_data[gg * num_components + cc];
985 moab::Interface &meshRef;
986 boost::shared_ptr<std::vector<TagInfo>> tagsPtr;
987 boost::shared_ptr<std::vector<MatrixPtr>> matsPtr;
990 auto tags_ptr = boost::make_shared<std::vector<TagInfo>>();
991 for (
const auto &tag_info : tags) {
992 const auto &[name, tag, num_components] = tag_info;
993 if (name.empty() || num_components <= 0 || !tag)
995 tags_ptr->push_back(tag_info);
998 if (tags_ptr->empty())
1001 auto entity_data_l2 = boost::make_shared<EntitiesFieldData>(MBENTITYSET);
1002 auto mass_ptr = boost::make_shared<MatrixDouble>();
1003 auto data_ptrs = boost::make_shared<std::vector<boost::shared_ptr<MatrixDouble>>>();
1004 DataMapVec scalar_data;
1005 DataMapMat vector_data;
1006 DataMapMat tensor_data;
1007 DataMapMat symm_tensor_data;
1009 physical_pip.push_back(
1011 physical_pip.push_back(
new OpReadTagData(mesh, tags_ptr, data_ptrs));
1013 for (
const auto &tag_info : *tags_ptr) {
1014 const auto &[name, tag, num_components] = tag_info;
1015 auto data_ptr = boost::make_shared<MatrixDouble>();
1016 auto coeffs_ptr = boost::make_shared<MatrixDouble>();
1017 data_ptrs->push_back(data_ptr);
1020 data_ptr, coeffs_ptr, mass_ptr, entity_data_l2, b, s, Sev::noisy,
1023 data_ptr, coeffs_ptr, entity_data_l2, b, s, Sev::noisy,
1025 switch (num_components) {
1027 scalar_data[name] = data_ptr;
1031 vector_data[name] = data_ptr;
1034 symm_tensor_data[name] = data_ptr;
1038 tensor_data[name] = data_ptr;
1042 "Tag postprocessing supports only 1, 2, 3, 4, 6 or 9 "
1047 post_proc_pip.push_back(
new MapOp(post_proc_mesh, map_gauss_pts, scalar_data,
1048 vector_data, tensor_data,
1054template <
typename PostProcEle>
struct PostProcBrokenMeshInMoabBaseBeginImpl;
1056template <
typename E>
1062 std::string opts_prefix =
"")
1077template <
typename PostProcEle>
struct PostProcBrokenMeshInMoabBaseContImpl;
1079template <
typename E>
1085 std::string opts_prefix =
"")
1095template <
typename PostProcEle>
struct PostProcBrokenMeshInMoabBaseEndImpl;
1097template <
typename E>
1103 std::string opts_prefix =
"")
1111 if (!pcomm_post_proc_mesh)
1113 "ParallelComm not allocated");
1114 CHKERR pcomm_post_proc_mesh->resolve_shared_ents(0);
1139template <
typename E>
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
FieldApproximationBase
approximation base
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FieldSpace
approximation spaces
@ L2
field with C-1 continuity
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define CHK_MOAB_THROW(err, msg)
Check error code of MoAB function and throw MoFEM exception.
@ MOFEM_OPERATION_UNSUCCESSFUL
@ 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 ...
MoFEMErrorCode writeFile(const std::string file_name)
wrote results in (MOAB) format, use "file_name.h5m"
#define MOFEM_LOG(channel, severity)
Log.
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)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
auto type_from_handle(const EntityHandle h)
get type from entity handle
boost::shared_ptr< PostProcGenerateRefMeshBase > PostProcGenerateRefMeshPtr
MoFEMErrorCode addTagDGProjectionOps(moab::Interface &mesh, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &post_proc_pip, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &physical_pip, moab::Interface &post_proc_mesh, std::vector< EntityHandle > &map_gauss_pts, const TagsRange &tags, int order, const FieldApproximationBase b=AINSWORTH_LEGENDRE_BASE, const FieldSpace s=L2)
static auto getFTensor0FromVec(V &data)
Get tensor rank 0 (scalar) form data vector.
constexpr double t
plate stiffness
FTensor::Index< 'm', 3 > m
Deprecated interface functions.
Data on single entity (This is passed as argument to DataOperator::doWork)
Structure for user loop methods on finite elements.
@ OPSPACE
operator do Work is execute on space data
static auto getOrCreate(moab::Core *core_mesh_ptr)
Evaluate field for given DG projection coefficients.
Evaluate right hand side for given data coefficients.
Post post-proc data at points from hash maps.
MoFEMErrorCode doWork(int side, EntityType type, EntitiesFieldData::EntData &data)
Operator for linear form, usually to calculate values on right hand side.
DataMapMat dataMapSymmMat
std::variant< boost::shared_ptr< VectorDouble >, boost::shared_ptr< MatrixDouble > > ScalarDataPtr
std::map< std::string, ScalarDataPtr > DataMapVec
std::vector< EntityHandle > & mapGaussPts
std::map< std::string, boost::shared_ptr< MatrixDouble > > DataMapMat
OpPostProcMapInMoab(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 OpPostProcMapInMoab object.
moab::Interface & postProcMesh
MoFEMErrorCode operator()()
MoFEMErrorCode preProcess()
MoFEMErrorCode postProcess()
PostProcBrokenMeshInMoabBaseBeginImpl(MoFEM::Interface &m_field, boost::shared_ptr< moab::Core > core_mesh_ptr, std::string opts_prefix="")
PostProcBrokenMeshInMoabBaseContImpl(MoFEM::Interface &m_field, boost::shared_ptr< moab::Core > core_mesh_ptr, std::string opts_prefix="")
MoFEMErrorCode postProcess()
MoFEMErrorCode preProcess()
MoFEMErrorCode operator()()
MoFEMErrorCode preProcess()
MoFEMErrorCode postProcess()
PostProcBrokenMeshInMoabBaseEndImpl(MoFEM::Interface &m_field, boost::shared_ptr< moab::Core > core_mesh_ptr, std::string opts_prefix="")
auto & getPostProcElements()
Get postprocessing elements.
MoFEMErrorCode preProcess()
Generate vertices and elements.
virtual MoFEMErrorCode postProcPostProc()
MoFEMErrorCode setGaussPts(int order)
std::vector< Tag > tagsToTransfer
std::string optionsPrefix
Prefix for options.
PostProcBrokenMeshInMoabBase(MoFEM::Interface &m_field, boost::shared_ptr< moab::Core > core_mesh_ptr, std::string opts_prefix="")
PostProcBrokenMeshInMoabBase(MoFEM::Interface &m_field, std::string opts_prefix="")
virtual MoFEMErrorCode transferTags()
auto & getMapGaussPts()
Get vector of vectors associated to integration points.
auto & getPostProcMesh()
Get postprocessing mesh.
MoFEMErrorCode postProcess()
boost::shared_ptr< moab::Core > coreMeshPtr
std::vector< EntityHandle > mapGaussPts
virtual int getMaxLevel() const
Determine refinement level based on fields approx ordre.
auto getPostProcMeshPcommPtr()
virtual ~PostProcBrokenMeshInMoabBase()
MoFEMErrorCode setTagsToTransfer(std::vector< Tag > tags_to_transfer)
Set tags to be transferred to post-processing mesh.
std::map< EntityType, PostProcGenerateRefMeshPtr > refElementsMap
virtual MoFEMErrorCode preProcPostProc()
EntityHandle startingEleHandle
virtual MoFEMErrorCode generateReferenceElementMesh()=0
virtual ~PostProcGenerateRefMeshBase()=default
std::vector< ublas::matrix< int > > levelRef
std::vector< double * > verticesOnEleArrays
virtual MoFEMErrorCode getOptions(std::string prefix)
std::vector< MatrixDouble > levelShapeFunctions
PostProcGenerateRefMeshBase()
std::vector< MatrixDouble > levelGaussPtsOnRefMesh
EntityHandle startingVertEleHandle
Element for postprocessing. Uses MoAB to generate post-processing mesh.
Volume finite element base.