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

#include <subsamplingvtkwriter.hh>

Inheritance diagram for Dune::SubsamplingVTKWriter< GridView >:

Dune::VTKWriter< GridView >

List of all members.


Detailed Description

template<class GridView>
class Dune::SubsamplingVTKWriter< GridView >

Writer for the ouput of subsampled 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). In contrast to the regular VTKWriter, this Writer allows subsampling of the elements via VirtualRefinement. The SubSamplingVTKWriter always writes nonconforming data.

Public Member Functions

 SubsamplingVTKWriter (const GridView &gridView, unsigned int level_, bool coerceToSimplex_=false)
 Construct a SubsamplingVTKWriter 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
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

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


Constructor & Destructor Documentation

template<class GridView>
Dune::SubsamplingVTKWriter< GridView >::SubsamplingVTKWriter ( const GridView gridView,
unsigned int  level_,
bool  coerceToSimplex_ = false 
) [inline, explicit]

Construct a SubsamplingVTKWriter working on a specific GridView.

Parameters:
gridView The gridView the grid functions live on. (E. g. a LevelGridView.)
level_ The level for the subrefinement.
coerceToSimplex_ Set this to true to always triangulate elements into simplices, even where it's not necessary (i.e. for hypercubes).
The datamode is always nonconforming.


Member Function Documentation

template<class GridView>
void Dune::VTKWriter< GridView >::addCellData ( VTKFunction p  )  [inline, inherited]

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, 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.

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, inherited]

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, 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.

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, inherited]

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, inherited]

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, inherited]

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 Sun Nov 15 22:29:01 2009 for dune-grid by  doxygen 1.5.6