Dune::VTKWriter< GridView > Class Template Reference
[Visualization ToolKit (VTK)]

#include <vtkwriter.hh>

Inheritance diagram for Dune::VTKWriter< GridView >:

Dune::LeafVTKWriter< Grid > Dune::LevelVTKWriter< Grid > Dune::SubsamplingVTKWriter< GridView > Dune::VTKSequenceWriter< GridView >

List of all members.


Detailed Description

template<class GridView>
class Dune::VTKWriter< GridView >

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 GridView &gridView, VTKOptions::DataMode dm=VTKOptions::conforming)
 Construct a VTKWriter working on a specific GridView.
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
virtual ~VTKWriter ()
 destructor
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

Classes

class  SimpleStream
 write out data in binary More...
class  VTKDataArrayWriter
 base class for data array writers More...
class  VTKFunction
 A base class for grid functions with any return type and dimension

Trick : use double as return type. More...


Constructor & Destructor Documentation

template<class GridView>
Dune::VTKWriter< GridView >::VTKWriter ( const GridView gridView,
VTKOptions::DataMode  dm = VTKOptions::conforming 
) [inline, explicit]

Construct a VTKWriter working on a specific GridView.

Parameters:
gridView The gridView the grid functions live on. (E. g. a LevelGridView.)
dm The data mode.


Member Function Documentation

template<class GridView>
void Dune::VTKWriter< GridView >::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. The VTKWriter object will take ownership of the VTKFunction *p and delete it when it's done.

template<class GridView>
template<class V>
void Dune::VTKWriter< GridView >::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 identify the grid function.

template<class GridView>
void Dune::VTKWriter< GridView >::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. The VTKWriter object will take ownership of the VTKFunction *p and delete it when it's done.

template<class GridView>
template<class V>
void Dune::VTKWriter< GridView >::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 identify the grid function.

template<class GridView>
std::string Dune::VTKWriter< GridView >::write ( const std::string &  name,
VTKOptions::OutputType  type = VTKOptions::ascii 
) [inline]

write output (interface might change later)

Parameters:
[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().

template<class GridView>
std::string Dune::VTKWriter< GridView >::pwrite ( const char *  name,
const char *  path,
const char *  extendpath,
VTKOptions::OutputType  type = VTKOptions::ascii 
) [inline]

write output (interface might change later)

Parameters:
[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().

template<class GridView>
template<class T>
VTKDataArrayWriter<T>* Dune::VTKWriter< GridView >::makeVTKDataArrayWriter ( std::ostream &  s,
const char *  name,
unsigned int  components,
unsigned int  totallength 
) [inline, protected]

Make a VTKDataArrayWriter with new.

Parameters:
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


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

Generated on Thu Apr 2 10:40:48 2009 for dune-grid by  doxygen 1.5.6