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

Class to write visualization files of DOF values and cell data. More...

#include <Visualizer.h>

Public Member Functions

 Visualizer (const Group< CellInterface > &cells, const HandlerInterface &handler)
 Construct a visualizer with a group of cells to be visualized. More...
 
 Visualizer (Visualizer &&)=default
 copy ctor that allows overriding an existing visualizer to e.g. change the cells More...
 
Visualizeroperator= (Visualizer &&)=default
 assigment operator that allows overriding an existing visualizer to e.g. change the cells More...
 
void DofValues (DofType dof)
 Define DOF values that should be visualized. More...
 
void CellData (std::function< Eigen::VectorXd(const CellIpData &)> f, std::string name)
 Define cell data that should be visualized. More...
 
void PointData (std::function< Eigen::VectorXd(Eigen::VectorXd)> f, std::string name)
 Visualize a function y = f(x) over a collection of cells. More...
 
void WriteVtuFile (std::string filename, bool asBinary=true)
 Write out a VTK unstructured grid file. More...
 

Detailed Description

Class to write visualization files of DOF values and cell data.

Constructor & Destructor Documentation

Visualizer::Visualizer ( const Group< CellInterface > &  cells,
const HandlerInterface handler 
)

Construct a visualizer with a group of cells to be visualized.

Parameters
cellsGroup of cells you want to visualize.
handlerimplementation of the HandlerInterface
NuTo::Visualize::Visualizer::Visualizer ( Visualizer &&  )
default

copy ctor that allows overriding an existing visualizer to e.g. change the cells

Member Function Documentation

void Visualizer::CellData ( std::function< Eigen::VectorXd(const CellIpData &)>  f,
std::string  name 
)

Define cell data that should be visualized.

Parameters
fFunction that is passed to the cell for evaluation.
nameName to be used in the resulting output file for the data array.
void Visualizer::DofValues ( DofType  dof)

Define DOF values that should be visualized.

Parameters
dofDofType to visualize.
Visualizer& NuTo::Visualize::Visualizer::operator= ( Visualizer &&  )
default

assigment operator that allows overriding an existing visualizer to e.g. change the cells

void Visualizer::PointData ( std::function< Eigen::VectorXd(Eigen::VectorXd)>  f,
std::string  name 
)

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

Parameters
fFunction taking the coordinates as an Eigen vector and returning an Eigen vector
nameName to be used in the resulting output file for the data array.
void Visualizer::WriteVtuFile ( std::string  filename,
bool  asBinary = true 
)

Write out a VTK unstructured grid file.

Parameters
filenameName of the resulting file.
asBinarytrue for output as binary vtu file

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