Dune::LevelAmiraMeshWriter< GridType > Class Template Reference
[AmiraMesh]

#include <amirameshwriter.hh>

Inheritance diagram for Dune::LevelAmiraMeshWriter< GridType >:

Dune::AmiraMeshWriter< GridType, IndexSetType >

List of all members.


Detailed Description

template<class GridType>
class Dune::LevelAmiraMeshWriter< GridType >

Provides file writing facilities in the AmiraMesh format for level grids.

Public Member Functions

 LevelAmiraMeshWriter ()
 Default constructor.
 LevelAmiraMeshWriter (const GridType &grid, int level)
 Constructor which initializes the AmiraMesh object with a given level grid.
template<class GridType2, class IndexSetType2>
void addGrid (const GridType2 &grid, const IndexSetType2 &indexSet, bool splitQuads=false)
 Add grid with a given index set.
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 GridType2, class DataContainer>
void addCellData (const DataContainer &data, const GridType2 &grid)
 Add cell data.
template<class DataContainer>
void addVertexData (const DataContainer &data, const IndexSetType &indexSet)
 Add vertex data.
void write (const std::string &filename, bool ascii=false) const
 Write AmiraMesh object to disk.

Static Public Member Functions

static void writeGrid (const GridType &grid, const std::string &filename, int level)
 Write a grid in AmiraMesh format.
template<class VectorType>
static void writeBlockVector (const GridType &grid, const VectorType &f, const std::string &filename, int level)
 Writes an ISTL block vector in AmiraMesh format.

Member Function Documentation

template<class GridType>
static void Dune::LevelAmiraMeshWriter< GridType >::writeGrid ( const GridType grid,
const std::string &  filename,
int  level 
) [inline, static]

Write a grid in AmiraMesh format.

Parameters:
grid The grid objects that is to be written
filename The filename
level The level to be written

References Dune::AmiraMeshWriter< GridType, IndexSetType >::write().

template<class GridType>
template<class VectorType>
static void Dune::LevelAmiraMeshWriter< GridType >::writeBlockVector ( const GridType grid,
const VectorType &  f,
const std::string &  filename,
int  level 
) [inline, static]

Writes an ISTL block vector in AmiraMesh format.

Parameters:
grid The grid objects that the vector lives on
f The vector to be written. Has to comply with the ISTL conventions
filename The filename
level The level of the grid that the vector lives on

References Dune::AmiraMeshWriter< GridType, IndexSetType >::addVertexData(), Dune::YaspGrid< dim, dimworld >::levelIndexSet(), and Dune::AmiraMeshWriter< GridType, IndexSetType >::write().

template<class GridType, class IndexSetType>
template<class GridType2, class IndexSetType2>
void Dune::AmiraMeshWriter< GridType, IndexSetType >::addGrid ( const GridType2 &  grid,
const IndexSetType2 &  indexSet,
bool  splitQuads = false 
) [inline, inherited]

Add grid with a given index set.

Parameters:
grid Grid to be written
indexSet Index set of the grid section 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::Grid< dim, dimworld, ct, GridFamily >::dimensionworld, Dune::ReferenceCube< ctype, dim >::type(), and Dune::ReferenceSimplex< ctype, dim >::type().

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

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

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< GridType, IndexSetType >::addGrid().

Referenced by Dune::LevelAmiraMeshWriter< GridType >::LevelAmiraMeshWriter().

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

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< GridType, IndexSetType >::addGrid().

Referenced by Dune::LeafAmiraMeshWriter< GridType >::LeafAmiraMeshWriter().

template<class GridType, class IndexSetType>
template<class DataContainer>
void Dune::AmiraMeshWriter< GridType, IndexSetType >::addVertexData ( const DataContainer &  data,
const IndexSetType &  indexSet 
) [inline, inherited]

Add vertex data.

Parameters:
An ISTL compliant vector type
IndexSet of the grid that the data belongs to

Todo:
Auto-detect data type

References Dune::Grid< dim, dimworld, ct, GridFamily >::dimension.

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

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

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

Generated on 6 Nov 2008 with Doxygen (ver 1.5.6) [logfile].