#include <vtkwriter.hh>
Public Member Functions | |
LeafVTKWriter (const Grid &grid, VTKOptions::DataMode dm=VTKOptions::conforming) | |
Construct a VTK writer for the leaf level of a given 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 | |
std::string | write (const std::string &name, VTKOptions::OutputType type=VTKOptions::ascii) |
write output (interface might change later) | |
std::string | pwrite (const char *name, const char *path, const char *extendpath, VTKOptions::OutputType type=VTKOptions::ascii) |
write output (interface might change later) | |
Protected Member Functions | |
std::string | pwrite (const char *name, const char *path, const char *extendpath, VTKOptions::OutputType ot, const int commRank, const int commSize) |
write output; interface might change later | |
virtual void | countEntities (int &nvertices, int &ncells, int &ncorners) |
count the vertices, cells and corners | |
virtual void | writeCellData (std::ostream &s) |
write cell data | |
virtual void | writeVertexData (std::ostream &s) |
write vertex data | |
virtual void | writeGridPoints (std::ostream &s) |
write the positions of vertices | |
virtual void | writeGridCells (std::ostream &s) |
write the connectivity array | |
virtual void | writeAppendedData (std::ostream &s) |
write the appended data sections | |
template<class T> | |
VTKDataArrayWriter< T > * | makeVTKDataArrayWriter (std::ostream &s, const char *name, unsigned int components, unsigned int totallength) |
Make a VTKDataArrayWriter with new. | |
void | indentUp () |
increase indentation level | |
void | indentDown () |
decrease indentation level | |
void | indent (std::ostream &s) |
write indentation to stream | |
Static Protected Member Functions | |
static VTKGeometryType | vtkType (const Dune::GeometryType &t) |
mapping from GeometryType to VTKGeometryType |
Dune::LeafVTKWriter< Grid >::LeafVTKWriter | ( | const Grid & | grid, | |
VTKOptions::DataMode | dm = VTKOptions::conforming | |||
) | [inline, explicit] |
void Dune::VTKWriter< GridView >::addCellData | ( | VTKFunction * | p | ) | [inline, inherited] |
Add a grid function that lives on the cells of the grid to the visualization.
p | The function to visualize. The VTKWriter object will take ownership of the VTKFunction *p and delete it when it's done. |
void Dune::VTKWriter< GridView >::addCellData | ( | const V & | v, | |
std::string | name | |||
) | [inline, inherited] |
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.
v | The container with the values of the grid function for each cell. | |
name | A name to identify the grid function. |
void Dune::VTKWriter< GridView >::addVertexData | ( | VTKFunction * | p | ) | [inline, inherited] |
Add a grid function that lives on the vertices of the grid to the visualization.
p | The function to visualize. The VTKWriter object will take ownership of the VTKFunction *p and delete it when it's done. |
void Dune::VTKWriter< GridView >::addVertexData | ( | const V & | v, | |
std::string | name | |||
) | [inline, inherited] |
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.
v | The container with the values of the grid function for each cell. | |
name | A name to identify the grid function. |
std::string Dune::VTKWriter< GridView >::write | ( | const std::string & | name, | |
VTKOptions::OutputType | type = VTKOptions::ascii | |||
) | [inline, inherited] |
write output (interface might change later)
[in] | name | basic name to write (may not contain a path) |
[in] | type | type of output (e.g,, ASCII) (optional) |
Referenced by Dune::VTKWriter< Partition< All_Partition >::LeafGridView >::write().
std::string Dune::VTKWriter< GridView >::pwrite | ( | const char * | name, | |
const char * | path, | |||
const char * | extendpath, | |||
VTKOptions::OutputType | type = VTKOptions::ascii | |||
) | [inline, inherited] |
write output (interface might change later)
[in] | name | basic name to write (may not contain a path) |
[in] | path | path to data output |
[in] | extendpath | path keyword for each process |
[in] | type | type of output (e.g,, ASCII) (optional) |
Referenced by Dune::VTKWriter< Partition< All_Partition >::LeafGridView >::pwrite().
VTKDataArrayWriter<T>* Dune::VTKWriter< GridView >::makeVTKDataArrayWriter | ( | std::ostream & | s, | |
const char * | name, | |||
unsigned int | components, | |||
unsigned int | totallength | |||
) | [inline, protected, inherited] |
Make a VTKDataArrayWriter with new.
s | The stream to write to | |
name | The name of the vtk array | |
components | The number of components of the vector | |
totallength | the total number of entries, i.e. components*vectors |