v0.13.0
Files | Functions
Post Process
Collaboration diagram for Post Process:

Files

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

Functions

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

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_NULL 
)

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 226 of file PostProcOnRefMesh.hpp.

228  {
230  ELEMENT::getOpPtrVector().push_back(
232  postProcMesh, mapGaussPts, field_name, tag_name, getCommonData(),
233  v));
235  }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
double v
phase velocity of light in medium (cm/ns)
operator to post-process (save gradients on refined post-processing mesh) field gradient
std::vector< EntityHandle > mapGaussPts
moab::Interface & postProcMesh
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_NULL 
)

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 246 of file PostProcOnRefMesh.hpp.

248  {
250  ELEMENT::getOpPtrVector().push_back(
252  postProcMesh, mapGaussPts, field_name, field_name + "_GRAD",
253  getCommonData(), v, space_dim));
255  }

◆ addFieldValuesGradientPostProc() [3/3]

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

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

Definition at line 207 of file PostProcOnRefMesh.hpp.

208  {
210  ELEMENT::getOpPtrVector().push_back(
212  postProcMesh, mapGaussPts, field_name, field_name + "_GRAD",
213  getCommonData(), v));
215  }

◆ addFieldValuesPostProc() [1/2]

template<class ELEMENT >
MoFEMErrorCode PostProcTemplateOnRefineMesh< ELEMENT >::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.

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 184 of file PostProcOnRefMesh.hpp.

186  {
188  ELEMENT::getOpPtrVector().push_back(
190  field_name, tag_name,
191  getCommonData(), v));
193  }
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_NULL 
)

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

Definition at line 165 of file PostProcOnRefMesh.hpp.

166  {
168  ELEMENT::getOpPtrVector().push_back(
170  field_name, field_name,
171  getCommonData(), v));
173  }

◆ writeFile()

template<class ELEMENT >
MoFEMErrorCode PostProcTemplateOnRefineMesh< ELEMENT >::writeFile ( const std::string  file_name)

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

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

Definition at line 265 of file PostProcOnRefMesh.hpp.

265  {
267  ParallelComm *pcomm_post_proc_mesh =
268  ParallelComm::get_pcomm(&postProcMesh, MYPCOMM_INDEX);
269  if (pcomm_post_proc_mesh == NULL)
270  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
271  "ParallelComm not allocated");
272  CHKERR postProcMesh.write_file(file_name.c_str(), "MOAB",
273  "PARALLEL=WRITE_PART");
275  }
#define MYPCOMM_INDEX
default communicator number PCOMM
Definition: definitions.h:228
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:44
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
#define CHKERR
Inline error check.
Definition: definitions.h:548