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

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

Inheritance diagram for Dune::MacroGrid:
Inheritance graph

List of all members.

Classes

struct  Impl
 container for the actual grid generation method
class  Impl< OneDGrid >

Public Types

typedef MPIHelper::MPICommunicator MPICommunicatorType

Protected Types

enum  element_t { Simplex, Cube, General }
enum  orientation_t { counterclockwise = 1, clockwise = -1 }
typedef std::map< DGFEntityKey
< unsigned int >, int > 
facemap_t

Protected Member Functions

 MacroGrid (const char *filename, MPICommunicatorType MPICOMM=MPIHelper::getCommunicator())
 constructor given the name of a DGF file
 MacroGrid (MPICommunicatorType MPICOMM=MPIHelper::getCommunicator())
 constructor given the name of a DGF file
template<class GridType >
GridType * createGrid ()
 returns pointer to a new instance of type GridType created from a DGF file
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)
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 bool isDuneGridFormat (std::istream &)
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

Member Typedef Documentation

typedef std :: map< DGFEntityKey< unsigned int >, int > Dune::DuneGridFormatParser::facemap_t [protected, inherited]
typedef MPIHelper::MPICommunicator Dune::MacroGrid::MPICommunicatorType

Member Enumeration Documentation

Enumerator:
Simplex 
Cube 
General 
Enumerator:
counterclockwise 
clockwise 

Constructor & Destructor Documentation

Dune::MacroGrid::MacroGrid ( const char *  filename,
MPICommunicatorType  MPICOMM = MPIHelper::getCommunicator() 
) [inline, protected]

constructor given the name of a DGF file

Dune::MacroGrid::MacroGrid ( MPICommunicatorType  MPICOMM = MPIHelper::getCommunicator()) [inline, protected]

constructor given the name of a DGF file


Member Function Documentation

template<class GridType >
GridType* Dune::MacroGrid::createGrid ( ) [inline, protected]

returns pointer to a new instance of type GridType created from a DGF file

void Dune::DuneGridFormatParser::generateBoundaries ( std::istream &  gridin,
bool  bndseg 
) [protected, inherited]
void Dune::DuneGridFormatParser::generateSimplexGrid ( std::istream &  gridin) [protected, inherited]
std::vector< double > & Dune::DuneGridFormatParser::getElParam ( int  i,
std::vector< double > &  coord 
) [protected, inherited]
std::vector< double > & Dune::DuneGridFormatParser::getVtxParam ( int  i,
std::vector< double > &  coord 
) [protected, inherited]
bool Dune::DuneGridFormatParser::isDuneGridFormat ( std::istream &  gridin) [static, inherited]
bool Dune::DuneGridFormatParser::readDuneGrid ( std::istream &  gridin,
int  dimG,
int  dimW 
) [inherited]

method which reads the dgf file

fills the vtx,element, and bound vectors returns true if reading succeded

References Dune::DGFPrintInfo::automatic(), Dune::DGFPrintInfo::block(), Dune::DuneGridFormatParser::Cube, Dune::DGFPrintInfo::cube2simplex(), Dune::DuneGridFormatParser::cube2simplex, Dune::dgfid(), Dune::DuneGridFormatParser::dimgrid, Dune::DuneGridFormatParser::dimw, Dune::dgf::IntervalBlock::dimw(), Dune::DuneGridFormatParser::element, Dune::DuneGridFormatParser::elements, Dune::DuneGridFormatParser::elParams, Dune::DGFPrintInfo::finish(), Dune::DuneGridFormatParser::General, Dune::DuneGridFormatParser::generateBoundaries(), Dune::DuneGridFormatParser::generateSimplexGrid(), Dune::dgf::VertexBlock::get(), Dune::dgf::SimplexBlock::get(), Dune::dgf::CubeBlock::get(), Dune::dgf::IntervalBlock::get(), Dune::DuneGridFormatParser::info, Dune::dgf::BasicBlock::isactive(), Dune::DuneGridFormatParser::isDuneGridFormat(), Dune::DuneGridFormatParser::nofelements, Dune::DuneGridFormatParser::nofelparams, Dune::DuneGridFormatParser::nofvtx, Dune::DuneGridFormatParser::nofvtxparams, Dune::dgf::IntervalBlock::numIntervals(), Dune::dgf::VertexBlock::offset(), Dune::DuneGridFormatParser::removeCopies(), Dune::DuneGridFormatParser::Simplex, Dune::DuneGridFormatParser::simplexgrid, Dune::DGFPrintInfo::step1(), Dune::DuneGridFormatParser::testTriang(), Dune::DuneGridFormatParser::vtx, Dune::DuneGridFormatParser::vtxoffset, and Dune::DuneGridFormatParser::vtxParams.

Referenced by Dune::MacroGrid::Impl< OneDGrid >::generate(), and Dune::DuneGridFormatParser::readDuneGrid().

bool Dune::DuneGridFormatParser::readDuneGrid ( std::istream &  input,
int  dimG = -1 
) [inline, inherited]
void Dune::DuneGridFormatParser::readTetgenTriangle ( const std::string &  name) [protected, inherited]
void Dune::DuneGridFormatParser::removeCopies ( ) [protected, inherited]
void Dune::DuneGridFormatParser::setOrientation ( int  use1,
int  use2,
orientation_t  orientation = counterclockwise 
) [protected, inherited]
void Dune::DuneGridFormatParser::setRefinement ( int  use1,
int  use2,
int  is1 = -1,
int  is2 = -1 
) [protected, inherited]
std::string Dune::DuneGridFormatParser::temporaryFileName ( ) [inline, static, protected, inherited]
double Dune::DuneGridFormatParser::testTriang ( int  snr) [protected, inherited]
void Dune::DuneGridFormatParser::writeTetgenPoly ( const std::string &  prefixname,
std::string &  extension,
std::string &  params 
) [inherited]

method to write in Tetgen/Triangle Poly Format

Referenced by Dune::DuneGridFormatParser::generateSimplexGrid().

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

Friends And Related Function Documentation

friend class DGFGridFactory [friend]

Reimplemented from Dune::DuneGridFormatParser.


Member Data Documentation

std::vector< std::vector <int> > Dune::DuneGridFormatParser::bound [protected, inherited]
bool Dune::DuneGridFormatParser::cube2simplex [protected, inherited]
int Dune::DuneGridFormatParser::dimgrid [protected, inherited]
int Dune::DuneGridFormatParser::dimw [protected, inherited]
std :: vector< std :: vector< unsigned int > > Dune::DuneGridFormatParser::elements [protected, inherited]
std::vector<std::vector<double> > Dune::DuneGridFormatParser::elParams [protected, inherited]
double Dune::DuneGridFormatParser::minVertexDistance [protected, inherited]
int Dune::DuneGridFormatParser::nofbound [protected, inherited]
int Dune::DuneGridFormatParser::nofelements [protected, inherited]
int Dune::DuneGridFormatParser::nofelparams [protected, inherited]
int Dune::DuneGridFormatParser::nofvtx [protected, inherited]
int Dune::DuneGridFormatParser::nofvtxparams [protected, inherited]
int Dune::DuneGridFormatParser::rank_ [protected, inherited]
bool Dune::DuneGridFormatParser::simplexgrid [protected, inherited]
int Dune::DuneGridFormatParser::size_ [protected, inherited]
std::vector< std::vector <double> > Dune::DuneGridFormatParser::vtx [protected, inherited]
int Dune::DuneGridFormatParser::vtxoffset [protected, inherited]
std::vector<std::vector<double> > Dune::DuneGridFormatParser::vtxParams [protected, inherited]

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