dune-grid  2.1.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends
Dune::DuneGridFormatParser Class Reference

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/dgfparser.hh>

Inheritance diagram for Dune::DuneGridFormatParser:
Inheritance graph

List of all members.

Public Types

enum  element_t { Simplex, Cube, General }
enum  orientation_t { counterclockwise = 1, clockwise = -1 }

Public Member Functions

 DuneGridFormatParser (int rank, int size)
 constructor
bool readDuneGrid (std::istream &, int dimG, int dimW)
 method which reads the dgf file
bool readDuneGrid (std::istream &input, int dimG=-1)
void writeTetgenPoly (const std::string &, std::string &, std::string &)
 method to write in Tetgen/Triangle Poly Format
void writeTetgenPoly (std::ostream &out, const bool writeSegments=true)

Static Public Member Functions

static bool isDuneGridFormat (std::istream &)

Protected Types

typedef std::map< DGFEntityKey
< unsigned int >, int > 
facemap_t

Protected Member Functions

void generateBoundaries (std::istream &, bool)
void generateSimplexGrid (std::istream &)
void readTetgenTriangle (const std::string &)
void removeCopies ()
void setOrientation (int use1, int use2, orientation_t orientation=counterclockwise)
void setRefinement (int use1, int use2, int is1=-1, int is2=-1)
double testTriang (int snr)
std::vector< double > & getElParam (int i, std::vector< double > &coord)
std::vector< double > & getVtxParam (int i, std::vector< double > &coord)

Static Protected Member Functions

static std::string temporaryFileName ()

Protected Attributes

int dimw
int dimgrid
std::vector< std::vector
< double > > 
vtx
int nofvtx
int vtxoffset
double minVertexDistance
std::vector< std::vector
< unsigned int > > 
elements
int nofelements
std::vector< std::vector< int > > bound
int nofbound
facemap_t facemap
element_t element
bool simplexgrid
bool cube2simplex
int nofvtxparams
int nofelparams
std::vector< std::vector
< double > > 
vtxParams
std::vector< std::vector
< double > > 
elParams
DGFPrintInfoinfo
int rank_
int size_

Friends

class DGFGridFactory
class DGFBaseFactory

Detailed Description

The DuneGridFormatParser class: reads a DGF file and stores build information in vector structures used by the MacroGrid class.


Member Typedef Documentation

typedef std :: map< DGFEntityKey< unsigned int >, int > Dune::DuneGridFormatParser::facemap_t [protected]

Member Enumeration Documentation

Enumerator:
Simplex 
Cube 
General 
Enumerator:
counterclockwise 
clockwise 

Constructor & Destructor Documentation

constructor

References rank_, and size_.


Member Function Documentation

void Dune::DuneGridFormatParser::generateBoundaries ( std::istream &  gridin,
bool  bndseg 
) [protected]
void Dune::DuneGridFormatParser::generateSimplexGrid ( std::istream &  gridin) [protected]
std::vector< double > & Dune::DuneGridFormatParser::getElParam ( int  i,
std::vector< double > &  coord 
) [protected]

References dimw, elements, elParams, and vtx.

std::vector< double > & Dune::DuneGridFormatParser::getVtxParam ( int  i,
std::vector< double > &  coord 
) [protected]

References dimw, vtx, and vtxParams.

bool Dune::DuneGridFormatParser::isDuneGridFormat ( std::istream &  gridin) [static]

References Dune::dgfid(), and Dune::dgf::makeupcase().

Referenced by readDuneGrid().

bool Dune::DuneGridFormatParser::readDuneGrid ( std::istream &  gridin,
int  dimG,
int  dimW 
)
bool Dune::DuneGridFormatParser::readDuneGrid ( std::istream &  input,
int  dimG = -1 
) [inline]
void Dune::DuneGridFormatParser::readTetgenTriangle ( const std::string &  name) [protected]
void Dune::DuneGridFormatParser::setOrientation ( int  use1,
int  use2,
orientation_t  orientation = counterclockwise 
) [protected]
void Dune::DuneGridFormatParser::setRefinement ( int  use1,
int  use2,
int  is1 = -1,
int  is2 = -1 
) [protected]
std::string Dune::DuneGridFormatParser::temporaryFileName ( ) [inline, static, protected]

Referenced by generateSimplexGrid().

double Dune::DuneGridFormatParser::testTriang ( int  snr) [protected]

References elements, and vtx.

Referenced by readDuneGrid().

void Dune::DuneGridFormatParser::writeTetgenPoly ( const std::string &  prefixname,
std::string &  extension,
std::string &  params 
)

method to write in Tetgen/Triangle Poly Format

Referenced by generateSimplexGrid().

void Dune::DuneGridFormatParser::writeTetgenPoly ( std::ostream &  out,
const bool  writeSegments = true 
)

Friends And Related Function Documentation

friend class DGFBaseFactory [friend]
friend class DGFGridFactory [friend]

Reimplemented in Dune::MacroGrid.


Member Data Documentation

std::vector< std::vector <int> > Dune::DuneGridFormatParser::bound [protected]

Referenced by readDuneGrid().

Referenced by readDuneGrid(), and setRefinement().

std :: vector< std :: vector< unsigned int > > Dune::DuneGridFormatParser::elements [protected]
std::vector<std::vector<double> > Dune::DuneGridFormatParser::elParams [protected]

Referenced by removeCopies().

Referenced by DuneGridFormatParser().

Referenced by readDuneGrid().

Referenced by DuneGridFormatParser().

std::vector< std::vector <double> > Dune::DuneGridFormatParser::vtx [protected]

Referenced by readDuneGrid().

std::vector<std::vector<double> > Dune::DuneGridFormatParser::vtxParams [protected]

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