Post-processings
In this section, we describe the post-processing options available in MFEM-MGIS.
Warning
This section is under construction
The ParaviewExport
post-processing
This post-processing allows to export the unknowns of a nonlinear
evolution problem for visualization in paraview
:
Key:
ParaviewExportResults
Example:
problem.addPostProcessing("ParaviewExportResults",
{{"OutputFileName", "SatohTestOutput"}});
Results

It is also possible to extract only portions of the mesh by defining either the boundary zones or the materials (domain attributes). This is particularly useful for reducing the size of output files when only a small part is to be studied.
Example
std::vector<mfem_mgis::Parameter> materials{"Attr1","Attr2"};
std::vector<mfem_mgis::Parameter> bdrs{"left","right"};
/** You can not define Materials and Boundaries in a single post processing */
problem.addPostProcessing("ParaviewExportResults",
{{"OutputFileName", "TestPPSubMeshOutputDir/AllMesh"},
{"Materials", materials},
{"OutputFieldName", "Displacement"},
{"Verbosity", 1}});
problem.addPostProcessing("ParaviewExportResults",
{{"OutputFileName", "TestPPSubMeshOutputDir/Attribute1"},
{"OutputFieldName", "Displacement"},
{"Material", "Attr1"},
{"Verbosity", 1}});
problem.addPostProcessing("ParaviewExportResults",
{{"OutputFileName", "TestPPSubMeshOutputDir/Attribute2"},
{"OutputFieldName", "Displacement"},
{"Material", "Attr2"},
{"Verbosity", 1}});
problem.addPostProcessing("ParaviewExportResults",
{{"OutputFileName", "TestPPSubMeshOutputDir/Boundaries"},
{"OutputFieldName", "Displacement"},
{"Boundaries", bdrs},
{"Verbosity", 1}});
Note
Boundary and Material names are defined by the problem using the key words: “Boundaries” or “Materials” such as:
{“Materials”, mfem_mgis::Parameters{{“Attr1”, 1}, {“Attr2”, 2}}}
{“Boundaries”, mfem_mgis::Parameters{{“left”, 1}, {“right”, 2}}}
Results

Key |
Description |
---|---|
OutputFileName |
Name of the output directory |
OutputFieldName |
Name of the field that will appear in ParaView (default: |
Material/Materials |
List of materials; a submesh will be used instead of exporting the entire mesh |
Boundary/Boundaries |
List of boundaries; a submesh will be used instead of exporting the entire mesh |
Verbosity |
If this value is |
Export Integration Point Results At Nodes
Key:
ParaviewExportIntegrationPointResultsAtNodes
Example:
auto results = std::vector<mfem_mgis::Parameter>{
"Stress", "ImposedTemperature", "HydrostaticPressure"};
problem.addPostProcessing(
"ParaviewExportIntegrationPointResultsAtNodes",
{{"OutputFileName", "SatohTestIntegrationPointOutput"},
{"Materials", {"plate"}},
{"Results", results}});
Results



Compute Mean Thermodynamic Forces
The Compute Mean Thermodynamic Forces post-processing step calculates the average stress over selected regions of the mesh.
Key:
MeanThermodynamicForces
Example: print the average stress of one inclusion into a matrix (RVE)
p.addPostProcessing(
"MeanThermodynamicForces",
{{"OutputFileName", "avgStress"}});
Results
We display the average stress SZZ over the RVE (composed of 83% matrix and 17% inclusion), we process the avgstress file and then plot the result:
awk '{if(NR>13) print $1 " " 0.83*$4+0.17*$10}' avgStress > res-mfem-mgis.txt
plot "res-mfem-mgis.txt" u 1:2 w l title "mfem-mgis"

Compute Stored Energy
Key:
StoredEnergy
Example:
p.addPostProcessing(
"StoredEnergy",
{{"OutputFileName", "energy.txt"}});
Compute dissipated Energy
Key:
DissipatedEnergy
Example:
p.addPostProcessing(
"DissipatedEnergy",
{{"OutputFileName", "dissiped_energy.txt"}});