DUNE-FEM (unstable)
The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures used by the MacroGrid class. More...
#include <dune/grid/io/file/dgfparser/parser.hh>
Public Member Functions | |
DuneGridFormatParser (int rank, int size) | |
constructor | |
bool | readDuneGrid (std::istream &input, int dimG, int dimW) |
parse dune grid format from stream More... | |
void | writeTetgenPoly (const std::string &, std::string &, std::string &) |
method to write in Tetgen/Triangle Poly Format | |
Static Public Member Functions | |
static bool | isDuneGridFormat (std::istream &input) |
check whether a stream is in DUNE grid format More... | |
static bool | isDuneGridFormat (const std::string &filename) |
check whether a file is in dune grid format More... | |
Detailed Description
The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures used by the MacroGrid class.
Member Function Documentation
◆ isDuneGridFormat() [1/2]
|
static |
check whether a file is in dune grid format
This is just a convenience method. It calls isDuneGridFormat with a std::ifstream.
- Parameters
-
filename file to check
- Returns
- whether the keyword 'DGF' was found
References isDuneGridFormat().
◆ isDuneGridFormat() [2/2]
|
static |
check whether a stream is in DUNE grid format
Actually checks whether the stream starts with the keyword 'DGF'.
- Parameters
-
input std::istream to check
- Note
- The stream must support seeking.
- Returns
- whether the keyword 'DGF' was found
Referenced by isDuneGridFormat(), and readDuneGrid().
◆ readDuneGrid()
bool Dune::DuneGridFormatParser::readDuneGrid | ( | std::istream & | input, |
int | dimG, | ||
int | dimW | ||
) |
parse dune grid format from stream
This method actually fills the vtx, element, and bound vectors.
- Parameters
-
input std::istream to read the grid from [in] dimG dimension of the grid (i.e., Grid::dimension) [in] dimW dimension of the world (i.e., Grid::dimensionworld)
- Note
- The stream must support seeking.
- Returns
- whether reading succeeded
References DUNE_THROW, and isDuneGridFormat().
The documentation for this class was generated from the following files:
- dune/grid/io/file/dgfparser/parser.hh
- dune/grid/io/file/dgfparser/dgfparser.cc