Dune::VTKWriter< GridImp, IS > Class Template Reference
[Visualization ToolKit (VTK)]
#include <vtkwriter.hh>
Detailed Description
template<class GridImp, class IS = typename GridImp::template Codim<0>::LeafIndexSet>
class Dune::VTKWriter< GridImp, IS >
Writer for the ouput of grid functions in the vtk format.
Writes arbitrary grid functions (living on cells or vertices of a grid) to a file suitable for easy visualization with The Visualization Toolkit (VTK).
Public Member Functions | |
VTKWriter (const GridImp &g, VTKOptions::DataMode dm=VTKOptions::conforming) | |
Constructs a VTKWriter working on the leaf index set of a grid. | |
VTKWriter (const GridImp &g, const IndexSet &i, VTKOptions::DataMode dm=VTKOptions::conforming) | |
Construct a VTKWriter working on a specific index set of a grid. | |
void | addCellData (VTKFunction *p) |
Add a grid function that lives on the cells of the grid to the visualization. | |
template<class V> | |
void | addCellData (const V &v, std::string name) |
Add a grid function (represented by container) that lives on the cells of the grid to the visualization. | |
void | addVertexData (VTKFunction *p) |
Add a grid function that lives on the vertices of the grid to the visualization. | |
template<class V> | |
void | addVertexData (const V &v, std::string name) |
Add a grid function (represented by container) that lives on the cells of the grid to the visualization output. | |
void | clear () |
clear list of registered functions | |
~VTKWriter () | |
destructor | |
void | write (const char *name, VTKOptions::OutputType ot=VTKOptions::ascii) |
write output; interface might change later | |
void | pwrite (const char *name, const char *path, const char *extendpath, VTKOptions::OutputType ot=VTKOptions::ascii) |
write output; interface might change later | |
Classes | |
class | VTKFunction |
A base class for grid functions with any return type and dimension. More... |
Constructor & Destructor Documentation
Dune::VTKWriter< GridImp, IS >::VTKWriter | ( | const GridImp & | g, | |
VTKOptions::DataMode | dm = VTKOptions::conforming | |||
) | [inline] |
Constructs a VTKWriter working on the leaf index set of a grid.
All functions are supposed to live on the leaf elements of the grid. E. g. you could use a VTKWriter constructed like this for the visualization of the solution.
- Parameters:
-
g The grid where the functions to be visualized live. dm The data mode??
Dune::VTKWriter< GridImp, IS >::VTKWriter | ( | const GridImp & | g, | |
const IndexSet & | i, | |||
VTKOptions::DataMode | dm = VTKOptions::conforming | |||
) | [inline] |
Construct a VTKWriter working on a specific index set of a grid.
- Parameters:
-
g The grid where the functions to be visualized live. i The index set the grid functions live on. (E. g. a level index set.) dm The data mode.
Member Function Documentation
void Dune::VTKWriter< GridImp, IS >::addCellData | ( | VTKFunction * | p | ) | [inline] |
Add a grid function that lives on the cells of the grid to the visualization.
- Parameters:
-
p The function to visualize.
void Dune::VTKWriter< GridImp, IS >::addCellData | ( | const V & | v, | |
std::string | name | |||
) | [inline] |
Add a grid function (represented by container) that lives on the cells of the grid to the visualization.
The container has to have random access via operator[] (e. g. std::vector). The value of the grid function for an arbitrary element will be accessed by calling operator[] with the id of the element.
- Parameters:
-
v The container with the values of the grid function for each cell. name A name to indentify the grid function.
void Dune::VTKWriter< GridImp, IS >::addVertexData | ( | VTKFunction * | p | ) | [inline] |
Add a grid function that lives on the vertices of the grid to the visualization.
- Parameters:
-
p The function to visualize.
void Dune::VTKWriter< GridImp, IS >::addVertexData | ( | const V & | v, | |
std::string | name | |||
) | [inline] |
Add a grid function (represented by container) that lives on the cells of the grid to the visualization output.
The container has to have random access via operator[] (e. g. std::vector). The value of the grid function for an arbitrary element will be accessed by calling operator[] with the id of the element.
- Parameters:
-
v The container with the values of the grid function for each cell. name A name to indentify the grid function.
void Dune::VTKWriter< GridImp, IS >::write | ( | const char * | name, | |
VTKOptions::OutputType | ot = VTKOptions::ascii | |||
) | [inline] |
write output; interface might change later
- Parameters:
-
name The name of the file to write to. ot The output type for the file.
The documentation for this class was generated from the following file: