dune-grid
2.1.1
|
#include <dune/grid/io/file/dgfparser/dgfparser.hh>
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 |
DGFPrintInfo * | info |
int | rank_ |
int | size_ |
Friends | |
class | DGFGridFactory |
typedef std :: map< DGFEntityKey< unsigned int >, int > Dune::DuneGridFormatParser::facemap_t [protected, inherited] |
typedef MPIHelper::MPICommunicator Dune::MacroGrid::MPICommunicatorType |
enum Dune::DuneGridFormatParser::element_t [inherited] |
enum Dune::DuneGridFormatParser::orientation_t [inherited] |
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
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] |
References Dune::dgf::BoundaryDomBlock::defaultValue(), Dune::dgf::BoundaryDomBlock::defaultValueGiven(), Dune::ElementFaceUtil::generateFace(), Dune::dgf::BoundarySegBlock::get(), Dune::dgf::BoundaryDomBlock::id(), Dune::dgf::BoundaryDomBlock::inside(), Dune::dgf::BasicBlock::isactive(), Dune::dgf::BoundaryDomBlock::next(), Dune::ElementFaceUtil::nofFaces(), and Dune::dgf::BoundaryDomBlock::ok().
Referenced by Dune::DuneGridFormatParser::readDuneGrid().
void Dune::DuneGridFormatParser::generateSimplexGrid | ( | std::istream & | gridin | ) | [protected, inherited] |
References Dune::DGFPrintInfo::block(), Dune::dgf::SimplexGenerationBlock::dimension(), Dune::DuneGridFormatParser::dimw, Dune::dgf::SimplexGenerationBlock::display(), Dune::dgf::SimplexGenerationBlock::dumpFileName(), Dune::dgf::SimplexGenerationBlock::filename(), Dune::dgf::SimplexGenerationBlock::filetype(), Dune::dgf::SimplexGenerationBlock::hasfile(), Dune::dgf::SimplexGenerationBlock::haspath(), Dune::DuneGridFormatParser::info, Dune::dgf::SimplexGenerationBlock::maxArea(), Dune::dgf::SimplexGenerationBlock::minAngle(), Dune::dgf::SimplexGenerationBlock::parameter(), Dune::dgf::SimplexGenerationBlock::path(), Dune::DGFPrintInfo::print(), Dune::DuneGridFormatParser::readTetgenTriangle(), Dune::DuneGridFormatParser::temporaryFileName(), and Dune::DuneGridFormatParser::writeTetgenPoly().
Referenced by Dune::DuneGridFormatParser::readDuneGrid().
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] |
References Dune::dgfid(), and Dune::dgf::makeupcase().
Referenced by Dune::DuneGridFormatParser::readDuneGrid().
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] |
References Dune::DuneGridFormatParser::dimw, Dune::DuneGridFormatParser::elements, Dune::DuneGridFormatParser::elParams, Dune::DuneGridFormatParser::facemap, Dune::DuneGridFormatParser::nofelements, Dune::DuneGridFormatParser::nofelparams, Dune::DuneGridFormatParser::nofvtx, Dune::DuneGridFormatParser::nofvtxparams, Dune::DuneGridFormatParser::vtx, and Dune::DuneGridFormatParser::vtxParams.
Referenced by Dune::DuneGridFormatParser::generateSimplexGrid().
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] |
Referenced by Dune::DuneGridFormatParser::generateSimplexGrid().
double Dune::DuneGridFormatParser::testTriang | ( | int | snr | ) | [protected, inherited] |
References Dune::DuneGridFormatParser::elements, and Dune::DuneGridFormatParser::vtx.
Referenced by Dune::DuneGridFormatParser::readDuneGrid().
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] |
References Dune::DuneGridFormatParser::dimw, Dune::DuneGridFormatParser::elements, Dune::DuneGridFormatParser::elParams, Dune::DuneGridFormatParser::facemap, Dune::DuneGridFormatParser::nofelparams, Dune::DuneGridFormatParser::nofvtx, Dune::DuneGridFormatParser::nofvtxparams, Dune::DuneGridFormatParser::vtx, and Dune::DuneGridFormatParser::vtxParams.
friend class DGFGridFactory [friend] |
Reimplemented from Dune::DuneGridFormatParser.
std::vector< std::vector <int> > Dune::DuneGridFormatParser::bound [protected, inherited] |
bool Dune::DuneGridFormatParser::cube2simplex [protected, inherited] |
Referenced by Dune::DuneGridFormatParser::readDuneGrid().
int Dune::DuneGridFormatParser::dimgrid [protected, inherited] |
int Dune::DuneGridFormatParser::dimw [protected, inherited] |
Referenced by Dune::DuneGridFormatParser::generateSimplexGrid(), Dune::DuneGridFormatParser::getElParam(), Dune::DuneGridFormatParser::getVtxParam(), Dune::DuneGridFormatParser::readDuneGrid(), Dune::DuneGridFormatParser::readTetgenTriangle(), Dune::DuneGridFormatParser::removeCopies(), Dune::DuneGridFormatParser::setRefinement(), and Dune::DuneGridFormatParser::writeTetgenPoly().
element_t Dune::DuneGridFormatParser::element [protected, inherited] |
std :: vector< std :: vector< unsigned int > > Dune::DuneGridFormatParser::elements [protected, inherited] |
Referenced by Dune::DGFGridFactory< HostGrid >::DGFGridFactory(), Dune::DuneGridFormatParser::getElParam(), Dune::DuneGridFormatParser::readDuneGrid(), Dune::DuneGridFormatParser::readTetgenTriangle(), Dune::DuneGridFormatParser::removeCopies(), Dune::DuneGridFormatParser::setRefinement(), Dune::DuneGridFormatParser::testTriang(), and Dune::DuneGridFormatParser::writeTetgenPoly().
std::vector<std::vector<double> > Dune::DuneGridFormatParser::elParams [protected, inherited] |
Referenced by Dune::DuneGridFormatParser::getElParam(), Dune::DGFBaseFactory< ALUCubeGrid< 2, dimw > >::parameter(), Dune::DGFGridFactory< HostGrid >::parameter(), Dune::DuneGridFormatParser::readDuneGrid(), Dune::DuneGridFormatParser::readTetgenTriangle(), and Dune::DuneGridFormatParser::writeTetgenPoly().
facemap_t Dune::DuneGridFormatParser::facemap [protected, inherited] |
DGFPrintInfo* Dune::DuneGridFormatParser::info [protected, inherited] |
double Dune::DuneGridFormatParser::minVertexDistance [protected, inherited] |
Referenced by Dune::DuneGridFormatParser::removeCopies().
int Dune::DuneGridFormatParser::nofbound [protected, inherited] |
int Dune::DuneGridFormatParser::nofelements [protected, inherited] |
int Dune::DuneGridFormatParser::nofelparams [protected, inherited] |
Referenced by Dune::DGFGridFactory< HostGrid >::DGFGridFactory(), Dune::DGFBaseFactory< ALUCubeGrid< 2, dimw > >::numParameters(), Dune::DGFGridFactory< HostGrid >::numParameters(), Dune::DuneGridFormatParser::readDuneGrid(), Dune::DuneGridFormatParser::readTetgenTriangle(), and Dune::DuneGridFormatParser::writeTetgenPoly().
int Dune::DuneGridFormatParser::nofvtx [protected, inherited] |
int Dune::DuneGridFormatParser::nofvtxparams [protected, inherited] |
Referenced by Dune::DGFGridFactory< HostGrid >::DGFGridFactory(), Dune::DGFBaseFactory< ALUCubeGrid< 2, dimw > >::numParameters(), Dune::DGFGridFactory< HostGrid >::numParameters(), Dune::DuneGridFormatParser::readDuneGrid(), Dune::DuneGridFormatParser::readTetgenTriangle(), and Dune::DuneGridFormatParser::writeTetgenPoly().
int Dune::DuneGridFormatParser::rank_ [protected, inherited] |
Referenced by Dune::DuneGridFormatParser::DuneGridFormatParser().
bool Dune::DuneGridFormatParser::simplexgrid [protected, inherited] |
Referenced by Dune::DuneGridFormatParser::readDuneGrid().
int Dune::DuneGridFormatParser::size_ [protected, inherited] |
Referenced by Dune::DuneGridFormatParser::DuneGridFormatParser().
std::vector< std::vector <double> > Dune::DuneGridFormatParser::vtx [protected, inherited] |
Referenced by Dune::DGFGridFactory< HostGrid >::DGFGridFactory(), Dune::MacroGrid::Impl< OneDGrid >::generate(), Dune::DuneGridFormatParser::getElParam(), Dune::DuneGridFormatParser::getVtxParam(), Dune::DuneGridFormatParser::readDuneGrid(), Dune::DuneGridFormatParser::readTetgenTriangle(), Dune::DuneGridFormatParser::removeCopies(), Dune::DuneGridFormatParser::setRefinement(), Dune::DuneGridFormatParser::testTriang(), and Dune::DuneGridFormatParser::writeTetgenPoly().
int Dune::DuneGridFormatParser::vtxoffset [protected, inherited] |
Referenced by Dune::DuneGridFormatParser::readDuneGrid().
std::vector<std::vector<double> > Dune::DuneGridFormatParser::vtxParams [protected, inherited] |
Referenced by Dune::DuneGridFormatParser::getVtxParam(), Dune::DGFBaseFactory< ALUCubeGrid< 2, dimw > >::parameter(), Dune::DGFGridFactory< HostGrid >::parameter(), Dune::DuneGridFormatParser::readDuneGrid(), Dune::DuneGridFormatParser::readTetgenTriangle(), and Dune::DuneGridFormatParser::writeTetgenPoly().