|
dune-grid
2.2.0
|
#include <dune/grid/io/file/dgfparser/macrogrid.hh>
Classes | |
| struct | Impl |
| container for the actual grid generation method | |
Public Types | |
| typedef MPIHelper::MPICommunicator | MPICommunicatorType |
Protected Types | |
| enum | element_t { Simplex, Cube, General } |
| enum | orientation_t { counterclockwise = 1, clockwise = -1 } |
| typedef DGFBoundaryParameter::type | BoundaryParameter |
| typedef std::pair< int, BoundaryParameter > | BndParam |
| typedef std::map< DGFEntityKey < unsigned int >, BndParam > | 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 &input, int dimG, int dimW) |
| parse dune grid format from stream | |
| 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 &input) |
| check whether a stream is in DUNE grid format | |
| static bool | isDuneGridFormat (const std::string &filename) |
| check whether a file is in dune grid format | |
| 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 |
| bool | haveBndParameters |
| 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 |
| std::vector< double > | emptyParam_ |
Friends | |
| class | DGFGridFactory |
typedef std::pair< int, BoundaryParameter > Dune::DuneGridFormatParser::BndParam [protected, inherited] |
typedef DGFBoundaryParameter::type Dune::DuneGridFormatParser::BoundaryParameter [protected, inherited] |
typedef std::map< DGFEntityKey< unsigned int >, BndParam > 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::contains(), Dune::DGFBoundaryParameter::defaultValue(), Dune::ElementFaceUtil::generateFace(), Dune::dgf::BoundarySegBlock::get(), Dune::dgf::BoundaryDomBlock::hasParameter(), Dune::dgf::DomainData::id(), Dune::dgf::BasicBlock::isactive(), and Dune::ElementFaceUtil::nofFaces().
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 & | input | ) | [static, inherited] |
check whether a stream is in DUNE grid format
Actually checks whether the stream starts with the keyword 'DGF'.
| input | std::istream to check |
References Dune::dgfid(), and Dune::dgf::makeupcase().
Referenced by Dune::DuneGridFormatParser::isDuneGridFormat(), and Dune::DuneGridFormatParser::readDuneGrid().
| bool Dune::DuneGridFormatParser::isDuneGridFormat | ( | const std::string & | filename | ) | [static, inherited] |
check whether a file is in dune grid format
This is just a convenience method. It calls isDuneGridFormat with a std::ifstream.
| filename | file to check |
References Dune::DuneGridFormatParser::isDuneGridFormat().
| bool Dune::DuneGridFormatParser::readDuneGrid | ( | std::istream & | input, |
| int | dimG, | ||
| int | dimW | ||
| ) | [inherited] |
parse dune grid format from stream
This method actually fills the vtx, element, and bound vectors.
| 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) |
References Dune::DGFPrintInfo::automatic(), Dune::DGFPrintInfo::block(), Dune::DuneGridFormatParser::Cube, Dune::DGFPrintInfo::cube2simplex(), Dune::DuneGridFormatParser::cube2simplex, Dune::dgfid(), Dune::DuneGridFormatParser::dimgrid, Dune::dgf::IntervalBlock::dimw(), Dune::DuneGridFormatParser::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::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] |
References Dune::simplex.
| 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::DGFGridFactory< HostGrid >::parameter(), Dune::DGFBaseFactory< ALUCubeGrid< 2, dimw > >::parameter(), Dune::DuneGridFormatParser::readDuneGrid(), Dune::DuneGridFormatParser::readTetgenTriangle(), and Dune::DuneGridFormatParser::writeTetgenPoly().
std::vector< double > Dune::DuneGridFormatParser::emptyParam_ [protected, inherited] |
facemap_t Dune::DuneGridFormatParser::facemap [protected, inherited] |
bool Dune::DuneGridFormatParser::haveBndParameters [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::DGFGridFactory< HostGrid >::numParameters(), Dune::DGFBaseFactory< ALUCubeGrid< 2, dimw > >::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::DGFGridFactory< HostGrid >::numParameters(), Dune::DGFBaseFactory< ALUCubeGrid< 2, dimw > >::numParameters(), Dune::DuneGridFormatParser::readDuneGrid(), Dune::DuneGridFormatParser::readTetgenTriangle(), and Dune::DuneGridFormatParser::writeTetgenPoly().
bool Dune::DuneGridFormatParser::simplexgrid [protected, inherited] |
Referenced by Dune::DuneGridFormatParser::readDuneGrid().
std::vector< std::vector < double > > Dune::DuneGridFormatParser::vtx [protected, inherited] |
Referenced by Dune::DGFGridFactory< HostGrid >::DGFGridFactory(), 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::DGFGridFactory< HostGrid >::parameter(), Dune::DGFBaseFactory< ALUCubeGrid< 2, dimw > >::parameter(), Dune::DuneGridFormatParser::readDuneGrid(), Dune::DuneGridFormatParser::readTetgenTriangle(), and Dune::DuneGridFormatParser::writeTetgenPoly().
1.7.6.1