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

Provides file writing facilities in the AmiraMesh format. More...

#include <dune/grid/io/file/amirameshwriter.hh>

Inheritance diagram for Dune::AmiraMeshWriter< GridView >:
Inheritance graph

List of all members.

Public Member Functions

void addGrid (const GridView &gridView, bool splitAll=false)
 Add a grid view to the file.
template<class GridType2 >
void addLevelGrid (const GridType2 &grid, int level, bool splitAll=false)
 Add level grid.
template<class GridType2 >
void addLeafGrid (const GridType2 &grid, bool splitAll=false)
 Add leaf grid.
template<class DataContainer >
void addCellData (const DataContainer &data, const GridView &gridView, bool GridSplitUp=false)
 Add cell data.
template<class DataContainer >
void addVertexData (const DataContainer &data, const GridView &gridView, bool GridSplitUp=false)
 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.

Detailed Description

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

Provides file writing facilities in the AmiraMesh format.


Member Function Documentation

template<class GridView>
template<class DataContainer >
void Dune::AmiraMeshWriter< GridView >::addCellData ( const DataContainer &  data,
const GridView gridView,
bool  GridSplitUp = false 
)

Add cell data.

Parameters:
data An ISTL compliant vector type
gridView Grid view that the data belongs to
GridSplitUp If the grid has been split up into triangles/tetrahedra you have to set GridSplitUp to make the data consistent with the grid

References Dune::GridView< ViewTraits >::indexSet(), and Dune::Refinement< geometryType, CoordType, coerceTo, dimension >::nElements().

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

template<class GridView>
void Dune::AmiraMeshWriter< GridView >::addGrid ( const GridView gridView,
bool  splitAll = false 
)

Add a grid view to the file.

Parameters:
gridView GridView to be written
splitAll If this is set every element of the grid will be split into triangles/tetrahedra. Amira doesn't support 2d quad grids so if this is not set for a quadrilateral grid in 2d the file won't be readable by standard Amira. See the refinement documentation to see which types can be split up yet. If the grid has been split up and contains other types than triangles/tetrahedra you also have to set GridSplitUp when calling the functions "addVertexData" and "writeBlockVector" to make the data consistent with the grid!

References Dune::GridView< ViewTraits >::dimensionworld, Dune::Refinement< geometryType, CoordType, coerceTo, dimension >::eBegin(), Dune::Refinement< geometryType, CoordType, coerceTo, dimension >::eEnd(), Dune::GridView< ViewTraits >::indexSet(), Dune::Refinement< geometryType, CoordType, coerceTo, dimension >::nElements(), Dune::Refinement< geometryType, CoordType, coerceTo, dimension >::nVertices(), Dune::Refinement< geometryType, CoordType, coerceTo, dimension >::vBegin(), Dune::Refinement< geometryType, CoordType, coerceTo, dimension >::vEnd(), and Dune::VTK::vertex.

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

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

Add leaf grid.

Parameters:
grid Grid to be written
splitAll If this is set every element of the grid will be split into triangles/tetrahedra. Amira doesn't support 2d quad grids so if this is not set for a quadrilateral grid in 2d the file won't be readable by standard Amira. See the refinement documentation to see which types can be split up yet. If the grid has been split up and contains other types than triangles/tetrahedra you also have to set GridSplitUp when calling the functions "addVertexData" and "writeBlockVector" to make the data consistent with the grid!

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

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

Add level grid.

Parameters:
grid Grid to be written
level Level of the level grid that is to be written
splitAll If this is set every element of the grid will be split into triangles/tetrahedra. Amira doesn't support 2d quad grids so if this is not set for a quadrilateral grid in 2d the file won't be readable by standard Amira. See the refinement documentation to see which types can be split up yet. If the grid has been split up and contains other types than triangles/tetrahedra you also have to set GridSplitUp when calling the functions "addVertexData" and "writeBlockVector" to make the data consistent with the grid!

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

template<class GridView>
template<class DataContainer >
void Dune::AmiraMeshWriter< GridView >::addUniformData ( const GridView gridView,
const array< unsigned int, dim > &  n,
const DataContainer &  data 
)

Write data on a uniform grid into an AmiraMesh file.

References Dune::Alberta::max(), and Dune::Alberta::min().

template<class GridView>
template<class DataContainer >
void Dune::AmiraMeshWriter< GridView >::addVertexData ( const DataContainer &  data,
const GridView gridView,
bool  GridSplitUp = false 
)

Add vertex data.

Parameters:
data An ISTL compliant vector type
gridView Grid view that the data belongs to
GridSplitUp If the grid has been split up into triangles/tetrahedra you have to set GridSplitUp to make the data consistent with the grid

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

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 Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].