Dune::AmiraMeshWriter< GridView > Class Template Reference
[AmiraMesh]

#include <amirameshwriter.hh>

List of all members.


Detailed Description

template<class GridView>
class Dune::AmiraMeshWriter< GridView >

Provides file writing facilities in the AmiraMesh format.

Public Member Functions

void addGrid (const GridView &gridView, bool splitQuads=false)
 Add a grid view to the file.
template<class GridType2>
void addLevelGrid (const GridType2 &grid, int level, bool splitQuads=false)
 Add level grid.
template<class GridType2>
void addLeafGrid (const GridType2 &grid, bool splitQuads=false)
 Add leaf grid.
template<class DataContainer>
void addCellData (const DataContainer &data, const GridView &gridView)
 Add cell data.
template<class DataContainer>
void addVertexData (const DataContainer &data, const GridView &gridView)
 Add vertex data.
void write (const std::string &filename, bool ascii=false) const
 Write AmiraMesh object to disk.
template<class DataContainer>
void addUniformData (const GridView &gridView, const array< unsigned int, dim > &n, const DataContainer &data)
 Write data on a uniform grid into an AmiraMesh file.

Member Function Documentation

template<class GridView>
void Dune::AmiraMeshWriter< GridView >::addGrid ( const GridView gridView,
bool  splitQuads = false 
) [inline]

Add a grid view to the file.

Parameters:
grid GridView to be written
splitQuads Amira doesn't support 2d quad grids. If this is set any quadrilateral will be split in two triangles. If not, the file is not readable by standard Amira.

References Dune::GridView< ViewTraits >::indexSet(), Dune::GridView< ViewTraits >::size(), Dune::ReferenceCube< ctype, dim >::type(), and Dune::ReferenceSimplex< ctype, dim >::type().

Referenced by Dune::AmiraMeshWriter< GridView >::addLeafGrid(), and Dune::AmiraMeshWriter< GridView >::addLevelGrid().

template<class GridView>
template<class GridType2>
void Dune::AmiraMeshWriter< GridView >::addLevelGrid ( const GridType2 &  grid,
int  level,
bool  splitQuads = false 
) [inline]

Add level grid.

Parameters:
grid Grid to be written
indexSet Level of the level grid that is to be written
splitQuads Amira doesn't support 2d quad grids. If this is set any quadrilateral will be split in two triangles. If not, the file is not readable by standard Amira.

References Dune::AmiraMeshWriter< GridView >::addGrid().

template<class GridView>
template<class GridType2>
void Dune::AmiraMeshWriter< GridView >::addLeafGrid ( const GridType2 &  grid,
bool  splitQuads = false 
) [inline]

Add leaf grid.

Parameters:
grid Grid to be written
splitQuads Amira doesn't support 2d quad grids. If this is set any quadrilateral will be split in two triangles. If not, the file is not readable by standard Amira.

References Dune::AmiraMeshWriter< GridView >::addGrid().

template<class GridView>
template<class DataContainer>
void Dune::AmiraMeshWriter< GridView >::addCellData ( const DataContainer &  data,
const GridView gridView 
) [inline]

Add cell data.

Parameters:
An ISTL compliant vector type
Grid view that the data belongs to

template<class GridView>
template<class DataContainer>
void Dune::AmiraMeshWriter< GridView >::addVertexData ( const DataContainer &  data,
const GridView gridView 
) [inline]

Add vertex data.

Parameters:
An ISTL compliant vector type
Grid view that the data belongs to

Todo:
Auto-detect data type

References Dune::GridView< ViewTraits >::indexSet().

Referenced by Dune::LeafAmiraMeshWriter< GridType >::writeBlockVector(), and Dune::LevelAmiraMeshWriter< GridType >::writeBlockVector().

template<class GridView>
void Dune::AmiraMeshWriter< GridView >::write ( const std::string &  filename,
bool  ascii = false 
) const [inline]

Write AmiraMesh object to disk.

Parameters:
filename Name of the file to write to
ascii Set this if you want an ascii AmiraMesh file

Referenced by Dune::LeafAmiraMeshWriter< GridType >::writeBlockVector(), Dune::LevelAmiraMeshWriter< GridType >::writeBlockVector(), Dune::LeafAmiraMeshWriter< GridType >::writeGrid(), and Dune::LevelAmiraMeshWriter< GridType >::writeGrid().


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

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