KASKADE 7 development version
Public Member Functions | Static Public Member Functions | List of all members
Dune::AmiraMeshWriter< GridView > Class Template Reference

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

#include <amirameshwriter.hh>

Detailed Description

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

Provides file writing facilities in the AmiraMesh format.

Definition at line 32 of file amirameshwriter.hh.

Public Member Functions

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

Static Public Member Functions

static void writeSurfaceGrid (const GridView &gridView, const std::string &filename)
 Write a 2d grid in a 3d world. More...
 

Member Function Documentation

◆ addCellData()

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

Add cell data.

Parameters
dataAn ISTL compliant vector type
gridViewGrid view that the data belongs to
GridSplitUpIf the grid has been split up into triangles/tetrahedra you have to set GridSplitUp to make the data consistent with the grid

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

◆ addGrid()

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

Add a grid view to the file.

Parameters
gridViewGridView to be written
splitAllIf 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!

◆ addLeafGrid()

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

Add leaf grid.

Parameters
gridGrid to be written
splitAllIf 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!

◆ addLevelGrid()

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

Add level grid.

Parameters
gridGrid to be written
levelLevel of the level grid that is to be written
splitAllIf 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!

◆ addUniformData()

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

Write data on a uniform grid into an AmiraMesh file.

◆ addVertexData()

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

Add vertex data.

Parameters
dataAn ISTL compliant vector type
gridViewGrid view that the data belongs to
GridSplitUpIf the grid has been split up into triangles/tetrahedra you have to set GridSplitUp to make the data consistent with the grid

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

◆ write()

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

Write AmiraMesh object to disk.

Parameters
filenameName of the file to write to
asciiSet 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().

◆ writeSurfaceGrid()

template<class GridView >
static void Dune::AmiraMeshWriter< GridView >::writeSurfaceGrid ( const GridView &  gridView,
const std::string &  filename 
)
static

Write a 2d grid in a 3d world.

Technically, the format written is 'HyperSurface', not 'AmiraMesh'. AmiraMesh doesn't support 2d grids in a 3d world. Hypersurface is the native Amira format for such grids. Historically, it is the ancestor of the AmiraMesh format, and syntactically it is fairly similar.

Currently, quadrilaterals will get split into triangles.

Note
This code is experimental and may change withour prior warning

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