v0.16.0
Loading...
Searching...
No Matches
Files | Classes | Functions
Post Process
Collaboration diagram for Post Process:

Files

file  PostProc.hpp
 Post-process fields on refined mesh.
 
file  PostProcOnRefMesh.cpp
 Postprocess fields on refined mesh made for 10 Node tets.
 
file  PostProcOnRefMesh.hpp
 Post-process fields on refined mesh.
 

Classes

struct  PostProcCommonOnRefMesh
 Set of operators and data structures used for post-processing. More...
 
struct  PostProcCommonOnRefMesh::CommonData
 
struct  PostProcCommonOnRefMesh::CommonDataForVolume
 
struct  PostProcCommonOnRefMesh::OpGetFieldValues
 operator to post-process (save gradients on refined post-processing mesh) field gradient More...
 
struct  PostProcCommonOnRefMesh::OpGetFieldGradientValues
 operator to post-process (save gradients on refined post-processing mesh) field gradient More...
 
struct  PostProcTemplateOnRefineMesh< ELEMENT >
 Generic post-processing class. More...
 
struct  PostProcVolumeOnRefinedMesh
 Post processing. More...
 
struct  PostProcFatPrismOnRefinedMesh
 Postprocess on prism. More...
 
struct  PostProcFatPrismOnRefinedMesh::PointsMap3D
 
struct  PostProcFaceOnRefinedMesh
 Postprocess on face. More...
 
struct  PostProcFaceOnRefinedMesh::OpGetFieldValuesOnSkinImpl< RANK >
 
struct  PostProcEdgeOnRefinedMesh
 Postprocess on edge. More...
 

Functions

MoFEMErrorCode MoFEM::PostProcBrokenMeshInMoabBase< E >::writeFile (const std::string file_name)
 wrote results in (MOAB) format, use "file_name.h5m"
 
MoFEMErrorCode PostProcTemplateOnRefineMesh< ELEMENT >::addFieldValuesPostProc (const std::string field_name, Vec v=PETSC_NULLPTR)
 Add operator to post-process L2, H1, Hdiv, Hcurl field value.
 
MoFEMErrorCode PostProcTemplateOnRefineMesh< ELEMENT >::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 PostProcTemplateOnRefineMesh< ELEMENT >::addFieldValuesGradientPostProc (const std::string field_name, Vec v=PETSC_NULLPTR)
 Add operator to post-process L2 or H1 field gradient.
 
MoFEMErrorCode PostProcTemplateOnRefineMesh< ELEMENT >::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 PostProcTemplateOnRefineMesh< ELEMENT >::addFieldValuesGradientPostProc (const std::string field_name, int space_dim, Vec v=PETSC_NULLPTR)
 Add operator to post-process L2 or H1 field gradient.
 
MoFEMErrorCode PostProcTemplateOnRefineMesh< ELEMENT >::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"
 

Detailed Description

Function Documentation

◆ addFieldValuesGradientPostProc() [1/3]

template<class ELEMENT >
MoFEMErrorCode PostProcTemplateOnRefineMesh< ELEMENT >::addFieldValuesGradientPostProc ( const std::string  field_name,
const std::string  tag_name,
Vec  v = PETSC_NULLPTR 
)
inline

#include <users_modules/basic_finite_elements/src/PostProcOnRefMesh.hpp>

Add operator to post-process L2 or H1 field gradient.

Parameters
field_name
tag_nameto store results on post-process mesh
vIf vector is given, values from vector are used to set tags on mesh

Definition at line 214 of file PostProcOnRefMesh.hpp.

216 {
218 ELEMENT::getOpPtrVector().push_back(
221 v));
223 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
const double v
phase velocity of light in medium (cm/ns)
constexpr auto field_name
operator to post-process (save gradients on refined post-processing mesh) field gradient
std::vector< EntityHandle > mapGaussPts
virtual PostProcCommonOnRefMesh::CommonData & getCommonData()

◆ addFieldValuesGradientPostProc() [2/3]

template<class ELEMENT >
MoFEMErrorCode PostProcTemplateOnRefineMesh< ELEMENT >::addFieldValuesGradientPostProc ( const std::string  field_name,
int  space_dim,
Vec  v = PETSC_NULLPTR 
)
inline

#include <users_modules/basic_finite_elements/src/PostProcOnRefMesh.hpp>

Add operator to post-process L2 or H1 field gradient.

Parameters
field_name
space_dimthe dimension of the problem
vIf vector is given, values from vector are used to set tags on mesh

Definition at line 234 of file PostProcOnRefMesh.hpp.

236 {
238 ELEMENT::getOpPtrVector().push_back(
241 getCommonData(), v, space_dim));
243 }

◆ addFieldValuesGradientPostProc() [3/3]

template<class ELEMENT >
MoFEMErrorCode PostProcTemplateOnRefineMesh< ELEMENT >::addFieldValuesGradientPostProc ( const std::string  field_name,
Vec  v = PETSC_NULLPTR 
)
inline

#include <users_modules/basic_finite_elements/src/PostProcOnRefMesh.hpp>

Add operator to post-process L2 or H1 field gradient.

Parameters
field_name
vIf vector is given, values from vector are used to set tags on mesh

Note: Name of the tag to store values on post-process mesh is the same as field name

Examples
mofem/users_modules/basic_finite_elements/nonlinear_elasticity/nonlinear_dynamics.cpp.

Definition at line 195 of file PostProcOnRefMesh.hpp.

196 {
198 ELEMENT::getOpPtrVector().push_back(
201 getCommonData(), v));
203 }

◆ addFieldValuesPostProc() [1/2]

template<class ELEMENT >
MoFEMErrorCode PostProcTemplateOnRefineMesh< ELEMENT >::addFieldValuesPostProc ( const std::string  field_name,
const std::string  tag_name,
Vec  v = PETSC_NULLPTR 
)
inline

#include <users_modules/basic_finite_elements/src/PostProcOnRefMesh.hpp>

Add operator to post-process L2 or H1 field value.

Parameters
field_name
tag_nameto store results on post-process mesh
vIf vector is given, values from vector are used to set tags on mesh

Definition at line 172 of file PostProcOnRefMesh.hpp.

174 {
176 ELEMENT::getOpPtrVector().push_back(
178 field_name, tag_name,
179 getCommonData(), v));
181 }
operator to post-process (save gradients on refined post-processing mesh) field gradient

◆ addFieldValuesPostProc() [2/2]

template<class ELEMENT >
MoFEMErrorCode PostProcTemplateOnRefineMesh< ELEMENT >::addFieldValuesPostProc ( const std::string  field_name,
Vec  v = PETSC_NULLPTR 
)
inline

#include <users_modules/basic_finite_elements/src/PostProcOnRefMesh.hpp>

Add operator to post-process L2, H1, Hdiv, Hcurl field value.

Parameters
field_name
vIf vector is given, values from vector are used to set tags on mesh

Note: Name of the tag to store values on post-process mesh is the same as field name

Examples
mofem/users_modules/basic_finite_elements/nonlinear_elasticity/nonlinear_dynamics.cpp.

Definition at line 153 of file PostProcOnRefMesh.hpp.

154 {
156 ELEMENT::getOpPtrVector().push_back(
159 getCommonData(), v));
161 }

◆ writeFile() [1/2]

template<typename E >
MoFEMErrorCode MoFEM::PostProcBrokenMeshInMoabBase< E >::writeFile ( const std::string  file_name)

#include <src/post_proc/PostProcBrokenMeshInMoabBase.hpp>

wrote results in (MOAB) format, use "file_name.h5m"

Parameters
file_namefile name (should always end with .h5m)
Returns
error code

Definition at line 668 of file PostProcBrokenMeshInMoabBase.hpp.

668 {
670 auto pcomm_post_proc_mesh = getPostProcMeshPcommPtr();
671 if (!pcomm_post_proc_mesh)
672 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
673 "ParallelComm not allocated");
674
675 auto &post_proc_mesh = getPostProcMesh();
676 Tag part_tag = pcomm_post_proc_mesh->part_tag();
677 Range tagged_sets;
678 CHK_MOAB_THROW(post_proc_mesh.get_entities_by_type_and_tag(
679 0, MBENTITYSET, &part_tag, NULL, 1, tagged_sets,
680 moab::Interface::UNION),
681 "get partition sets");
682 if (tagged_sets.empty()) {
683 EntityHandle part_set;
684 CHK_MOAB_THROW(post_proc_mesh.create_meshset(MESHSET_SET, part_set),
685 "create partition meshset");
686
687 Range ents;
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));
691 CHK_MOAB_THROW(post_proc_mesh.add_entities(part_set, ents),
692 "add entities to partition meshset");
693
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");
697 }
698
699 CHKERR getPostProcMesh().write_file(file_name.c_str(), "MOAB",
700 "PARALLEL=WRITE_PART");
702};
#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_DATA_INCONSISTENCY
Definition definitions.h:31
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
auto & getPostProcMesh()
Get postprocessing mesh.

◆ writeFile() [2/2]

template<class ELEMENT >
MoFEMErrorCode PostProcTemplateOnRefineMesh< ELEMENT >::writeFile ( const std::string  file_name,
const char *  file_type = "MOAB",
const char *  file_options = "PARALLEL=WRITE_PART" 
)
inline

#include <users_modules/basic_finite_elements/src/PostProcOnRefMesh.hpp>

wrote results in (MOAB) format, use "file_name.h5m"

Parameters
file_namefile name (should always end with .h5m)
Returns
error code
Examples
mofem/users_modules/basic_finite_elements/nonlinear_elasticity/nonlinear_dynamics.cpp.

Definition at line 253 of file PostProcOnRefMesh.hpp.

255 {
257 ParallelComm *pcomm_post_proc_mesh =
258 ParallelComm::get_pcomm(&postProcMesh, MYPCOMM_INDEX);
259 if (pcomm_post_proc_mesh == NULL)
260 SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
261 "ParallelComm not allocated");
262 CHKERR postProcMesh.write_file(file_name.c_str(), file_type, file_options);
264 }
#define MYPCOMM_INDEX
default communicator number PCOMM