NuTo
Numerics Tool
Classes | Public Member Functions | List of all members
NuTo::Visualize::PostProcess Class Reference

Allows you do define multiple visualizers with various visualization objects and writes them at once (including a *pvd file) More...

#include <PostProcess.h>

Public Member Functions

 PostProcess ()=default
 default ctor More...
 
 PostProcess (std::string resultDir)
 Ctor that sets the result directory. More...
 
void ResultDirectory (std::string resultDir)
 Setter for the result directory. More...
 
std::string ResultDirectory () const
 Getter for the result directory. More...
 
void DefineVisualizer (std::string name, Visualizer &&visualizer)
 Moves a visualizer into the PostProcess. More...
 
void DefineVisualizer (std::string name, Group< CellInterface > cells, const HandlerInterface &handler)
 Constructs a visualizer into the PostProcess. More...
 
void Add (std::string name, DofType dof)
 Adds a dof visualization. More...
 
void Add (std::string name, std::function< Eigen::VectorXd(const CellIpData &)> cellFunction, std::string cellFunctionName)
 Add a cell data function that should be visualized. More...
 
void Add (std::string name, std::function< double(const CellIpData &)> cellFunction, std::string cellFunctionName)
 Add a cell data function that should be visualized. More...
 
void Add (std::string name, std::function< Eigen::VectorXd(Eigen::VectorXd)> pointFunction, std::string pointFunctionName)
 Visualize a function y = f(x) over a collection of cells. More...
 
void Plot (double t, bool asBinary=true)
 Writes one result file per defined visualizer and adds this result file to [visualizerName].pvd. More...
 

Detailed Description

Allows you do define multiple visualizers with various visualization objects and writes them at once (including a *pvd file)

Constructor & Destructor Documentation

NuTo::Visualize::PostProcess::PostProcess ( )
default

default ctor

PostProcess::PostProcess ( std::string  resultDir)

Ctor that sets the result directory.

Parameters
resultDirResult directory.

Member Function Documentation

void PostProcess::Add ( std::string  name,
DofType  dof 
)

Adds a dof visualization.

Parameters
nameName of an existing visualizer.
dofDofType to visualize.
void PostProcess::Add ( std::string  name,
std::function< Eigen::VectorXd(const CellIpData &)>  cellFunction,
std::string  cellFunctionName 
)

Add a cell data function that should be visualized.

Parameters
nameName of an existint visualizer.
cellFunctionFunction that is passed to the cell for evaluation.
cellFunctionNameName to be used in the resulting output file for the data array.
void PostProcess::Add ( std::string  name,
std::function< double(const CellIpData &)>  cellFunction,
std::string  cellFunctionName 
)

Add a cell data function that should be visualized.

Parameters
nameName of an existint visualizer.
cellFunctionFunction that is passed to the cell for evaluation.
cellFunctionNameName to be used in the resulting output file for the data array.
void PostProcess::Add ( std::string  name,
std::function< Eigen::VectorXd(Eigen::VectorXd)>  pointFunction,
std::string  pointFunctionName 
)

Visualize a function y = f(x) over a collection of cells.

Parameters
nameName of an existint visualizer.
pointFunctionFunction taking the coordinates as an Eigen vector and returning an Eigen vector
pointFunctionNameName to be used in the resulting output file for the data array.
void PostProcess::DefineVisualizer ( std::string  name,
Visualizer &&  visualizer 
)

Moves a visualizer into the PostProcess.

Parameters
nameUnique (new) visualizer name.
visualizer(Unnamed) visualizer.
void PostProcess::DefineVisualizer ( std::string  name,
Group< CellInterface cells,
const HandlerInterface handler 
)

Constructs a visualizer into the PostProcess.

Parameters
nameUnique (new) visualizer name.
cellsGroup of cells you want to visualize.
handlerImplementation of the HandlerInterface.
void PostProcess::Plot ( double  t,
bool  asBinary = true 
)

Writes one result file per defined visualizer and adds this result file to [visualizerName].pvd.

Parameters
tGlobal time for the pvd file
asBinaryTrue for output as binary vtu file. False for output as ASCII.
void PostProcess::ResultDirectory ( std::string  resultDir)

Setter for the result directory.

Parameters
resultDirResult directory.
std::string PostProcess::ResultDirectory ( ) const

Getter for the result directory.

Returns
Result directory.

The documentation for this class was generated from the following files: