dune-grid 3.0-git
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Dune::DGFWriter< GV > Class Template Reference

write a GridView to a DGF file More...

#include <dune/grid/io/file/dgfparser/dgfwriter.hh>

Public Types

typedef GV GridView
 type of grid view
 
typedef GridView::Grid Grid
 type of underlying hierarchical grid
 

Public Member Functions

 DGFWriter (const GridView &gridView)
 constructor
 
void write (std::ostream &gridout, const std::vector< Index > &newElemOrder, const std::stringstream &addParams=std::stringstream()) const
 write the GridView into a std::ostream
 
void write (std::ostream &gridout) const
 write the GridView into a std::ostream
 
void write (std::ostream &gridout, const std::stringstream &addParams) const
 write the GridView into a std::ostream
 
void write (const std::string &fileName) const
 write the GridView to a file
 

Static Public Attributes

static const int dimGrid = GridView::dimension
 dimension of the grid
 

Protected Member Functions

void writeAllElements (const std::vector< ElementSeed > &elementSeeds, const IndexSet &indexSet, const GeometryType &elementType, const std::vector< Index > &vertexIndex, std::ostream &gridout) const
 
void writeElement (const Element &element, const IndexSet &indexSet, const GeometryType &elementType, const std::vector< Index > &vertexIndex, std::ostream &gridout) const
 

Protected Attributes

GridView gridView_
 

Detailed Description

template<class GV>
class Dune::DGFWriter< GV >

write a GridView to a DGF file

The DGFWriter allows create a DGF file from a given GridView. It allows for the easy creation of file format converters.

Template Parameters
GVGridView to write in DGF format

Member Typedef Documentation

◆ Grid

template<class GV >
typedef GridView::Grid Dune::DGFWriter< GV >::Grid

type of underlying hierarchical grid

◆ GridView

template<class GV >
typedef GV Dune::DGFWriter< GV >::GridView

type of grid view

Constructor & Destructor Documentation

◆ DGFWriter()

template<class GV >
Dune::DGFWriter< GV >::DGFWriter ( const GridView gridView)
inline

constructor

Parameters
[in]gridViewgrid view to operate on

Member Function Documentation

◆ write() [1/4]

template<class GV >
void Dune::DGFWriter< GV >::write ( const std::string &  fileName) const
inline

write the GridView to a file

Parameters
[in]fileNamename of the write to write the grid to

◆ write() [2/4]

template<class GV >
void Dune::DGFWriter< GV >::write ( std::ostream &  gridout) const
inline

write the GridView into a std::ostream

Parameters
gridoutstd::ostream to write the grid to

◆ write() [3/4]

template<class GV >
void Dune::DGFWriter< GV >::write ( std::ostream &  gridout,
const std::stringstream &  addParams 
) const
inline

write the GridView into a std::ostream

Parameters
gridoutstd::ostream to write the grid to
addParamsadditional data to write to dgf file, such as projections etc. (defaults to an emoty data stream)

◆ write() [4/4]

template<class GV >
void Dune::DGFWriter< GV >::write ( std::ostream &  gridout,
const std::vector< Index > &  newElemOrder,
const std::stringstream &  addParams = std::stringstream() 
) const
inline

write the GridView into a std::ostream

Parameters
gridoutstd::ostream to write the grid to
newElemOrdervector providing a new ordering for the elements in the given GridView
addParamsadditional data to write to dgf file, such as projections etc. (defaults to an emoty data stream)

◆ writeAllElements()

template<class GV >
void Dune::DGFWriter< GV >::writeAllElements ( const std::vector< ElementSeed > &  elementSeeds,
const IndexSet &  indexSet,
const GeometryType &  elementType,
const std::vector< Index > &  vertexIndex,
std::ostream &  gridout 
) const
inlineprotected

◆ writeElement()

template<class GV >
void Dune::DGFWriter< GV >::writeElement ( const Element &  element,
const IndexSet &  indexSet,
const GeometryType &  elementType,
const std::vector< Index > &  vertexIndex,
std::ostream &  gridout 
) const
inlineprotected

Member Data Documentation

◆ dimGrid

template<class GV >
const int Dune::DGFWriter< GV >::dimGrid = GridView::dimension
static

dimension of the grid

◆ gridView_

template<class GV >
GridView Dune::DGFWriter< GV >::gridView_
protected

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