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

Provides file writing facilities in the AmiraMesh format for leaf grids. More...

#include <amirameshwriter.hh>

Detailed Description

template<class GridType>
class Dune::LeafAmiraMeshWriter< GridType >

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

Definition at line 184 of file amirameshwriter.hh.

Inheritance diagram for Dune::LeafAmiraMeshWriter< GridType >:
Dune::AmiraMeshWriter< GridType::LeafGridView >

Public Member Functions

 LeafAmiraMeshWriter ()
 Default constructor. More...
 
 LeafAmiraMeshWriter (const GridType &grid)
 Constructor which initializes the AmiraMesh object with a given leaf grid. More...
 
void addGrid (const GridType::LeafGridView &gridView, bool splitAll=false)
 Add a grid view to the file. More...
 
void addLevelGrid (const GridType2 &grid, int level, bool splitAll=false)
 Add level grid. More...
 
void addLeafGrid (const GridType2 &grid, bool splitAll=false)
 Add leaf grid. More...
 
void addCellData (const DataContainer &data, const GridType::LeafGridView &gridView, bool GridSplitUp=false)
 Add cell data. More...
 
void addVertexData (const DataContainer &data, const GridType::LeafGridView &gridView, bool GridSplitUp=false)
 Add vertex data. More...
 
void write (const std::string &filename, bool ascii=false) const
 Write AmiraMesh object to disk. More...
 
void addUniformData (const GridType::LeafGridView &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 writeGrid (const GridType &grid, const std::string &filename)
 Write a grid in AmiraMesh format. More...
 
template<class VectorType >
static void writeBlockVector (const GridType &grid, const VectorType &f, const std::string &filename, bool GridSplitUp=false)
 Writes an ISTL block vector in AmiraMesh format. More...
 
static void writeSurfaceGrid (const GridType::LeafGridView &gridView, const std::string &filename)
 Write a 2d grid in a 3d world. More...
 

Constructor & Destructor Documentation

◆ LeafAmiraMeshWriter() [1/2]

template<class GridType >
Dune::LeafAmiraMeshWriter< GridType >::LeafAmiraMeshWriter ( )
inline

Default constructor.

Definition at line 191 of file amirameshwriter.hh.

◆ LeafAmiraMeshWriter() [2/2]

template<class GridType >
Dune::LeafAmiraMeshWriter< GridType >::LeafAmiraMeshWriter ( const GridType &  grid)
inline

Constructor which initializes the AmiraMesh object with a given leaf grid.

Definition at line 194 of file amirameshwriter.hh.

Member Function Documentation

◆ addCellData()

void Dune::AmiraMeshWriter< GridType::LeafGridView >::addCellData ( const DataContainer &  data,
const GridType::LeafGridView &  gridView,
bool  GridSplitUp = false 
)
inherited

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

◆ addGrid()

void Dune::AmiraMeshWriter< GridType::LeafGridView >::addGrid ( const GridType::LeafGridView &  gridView,
bool  splitAll = false 
)
inherited

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

void Dune::AmiraMeshWriter< GridType::LeafGridView >::addLeafGrid ( const GridType2 &  grid,
bool  splitAll = false 
)
inherited

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

void Dune::AmiraMeshWriter< GridType::LeafGridView >::addLevelGrid ( const GridType2 &  grid,
int  level,
bool  splitAll = false 
)
inherited

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

void Dune::AmiraMeshWriter< GridType::LeafGridView >::addUniformData ( const GridType::LeafGridView &  gridView,
const std::array< unsigned int, dim > &  n,
const DataContainer &  data 
)
inherited

Write data on a uniform grid into an AmiraMesh file.

◆ addVertexData()

void Dune::AmiraMeshWriter< GridType::LeafGridView >::addVertexData ( const DataContainer &  data,
const GridType::LeafGridView &  gridView,
bool  GridSplitUp = false 
)
inherited

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

◆ write()

void Dune::AmiraMeshWriter< GridType::LeafGridView >::write ( const std::string &  filename,
bool  ascii = false 
) const
inherited

Write AmiraMesh object to disk.

Parameters
filenameName of the file to write to
asciiSet this if you want an ascii AmiraMesh file

◆ writeBlockVector()

template<class GridType >
template<class VectorType >
static void Dune::LeafAmiraMeshWriter< GridType >::writeBlockVector ( const GridType &  grid,
const VectorType &  f,
const std::string &  filename,
bool  GridSplitUp = false 
)
inlinestatic

Writes an ISTL block vector in AmiraMesh format.

Parameters
gridThe grid objects that the vector lives on
fThe vector to be written. Has to comply with the ISTL conventions
filenameThe filename
GridSplitUpset true to split up the grid into triangles/tetrahedra

Definition at line 216 of file amirameshwriter.hh.

◆ writeGrid()

template<class GridType >
static void Dune::LeafAmiraMeshWriter< GridType >::writeGrid ( const GridType &  grid,
const std::string &  filename 
)
inlinestatic

Write a grid in AmiraMesh format.

Parameters
gridThe grid objects that is to be written
filenameThe filename

Definition at line 203 of file amirameshwriter.hh.

◆ writeSurfaceGrid()

static void Dune::AmiraMeshWriter< GridType::LeafGridView >::writeSurfaceGrid ( const GridType::LeafGridView &  gridView,
const std::string &  filename 
)
staticinherited

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: