dune-grid
2.2.0
|
Specialization of the generic GridFactory for ALUSimplexGrid<2,dimw> More...
#include <dune/grid/alugrid/2d/alu2dgridfactory.hh>
Public Types | |
typedef ALUSimplexGrid< 2, dimw > | Grid |
typedef DuneBoundaryProjection < dimensionworld > | DuneBoundaryProjectionType |
type of boundary projection class | |
typedef ALUGridTransformation < ctype, dimensionworld > | Transformation |
typedef Transformation::WorldVector | WorldVector |
type of vector for world coordinates | |
typedef Transformation::WorldMatrix | WorldMatrix |
type of matrix from world coordinates to world coordinates | |
Public Member Functions | |
GridFactory () | |
Default constructor. | |
GridFactory (const std::string &filename) | |
constructor taking filename | |
GridFactory (const bool verbose) | |
constructor setting verbosity flag | |
virtual void | insertVertex (const VertexType &pos) |
insert a vertex into the coarse grid | |
virtual void | insertVertex (const FieldVector< ctype, dimworld > &pos)=0 |
Insert a vertex into the coarse grid. | |
virtual void | insertElement (const GeometryType &geometry, const std::vector< unsigned int > &vertices) |
insert an element into the coarse grid | |
virtual void | insertElement (const GeometryType &type, const std::vector< unsigned int > &vertices, const shared_ptr< VirtualFunction< FieldVector< ctype, dimension >, FieldVector< ctype, dimworld > > > &elementParametrization) |
Insert a parametrized element into the coarse grid. | |
virtual void | insertBoundary (const GeometryType &geometry, const std::vector< unsigned int > &faceVertices, const int id) |
insert a boundary element into the coarse grid | |
virtual void | insertBoundary (const int element, const int face, const int id) |
mark a face as boundary (and assign a boundary id) | |
virtual void | insertBoundaryProjection (const GeometryType &type, const std::vector< unsigned int > &vertices, const DuneBoundaryProjectionType *projection) |
insert a boundary projection into the macro grid | |
virtual void | insertBoundaryProjection (const DuneBoundaryProjectionType &bndProjection) |
insert a boundary projection object, (a copy is made) | |
virtual void | insertBoundarySegment (const std::vector< unsigned int > &vertices) |
insert a boundary segment into the macro grid | |
virtual void | insertBoundarySegment (const std::vector< unsigned int > &vertices, const shared_ptr< BoundarySegment< 2, dimensionworld > > &boundarySegment) |
insert a shaped boundary segment into the macro grid | |
virtual void | insertBoundarySegment (const std::vector< unsigned int > &vertices, const shared_ptr< BoundarySegment< dimension, dimworld > > &boundarySegment) |
insert an arbitrarily shaped boundary segment | |
void | insertFaceTransformation (const WorldMatrix &matrix, const WorldVector &shift) |
add a face transformation (for periodic identification) | |
virtual unsigned int | insertionIndex (const typename Codim< 0 >::Entity &entity) const |
obtain an element's insertion index | |
virtual unsigned int | insertionIndex (const typename Codim< dimension >::Entity &entity) const |
obtain a vertex' insertion index | |
virtual unsigned int | insertionIndex (const typename Grid::LeafIntersection &intersection) const |
virtual unsigned int | insertionIndex (const typename ALUSimplexGrid< 2, dimw >::LeafIntersection &intersection) const |
obtain a boundary's insertion index | |
virtual bool | wasInserted (const typename Grid::LeafIntersection &intersection) const |
virtual bool | wasInserted (const typename ALUSimplexGrid< 2, dimw >::LeafIntersection &intersection) const |
determine whether an intersection was inserted | |
Grid * | createGrid () |
finalize the grid creation and hand over the grid | |
Grid * | createGrid (const bool addMissingBoundaries, const std::string dgfName="") |
Grid * | createGrid (const bool addMissingBoundaries, bool temporary, const std::string dgfName="") |
void | setTolerance (const ctype &epsilon) |
Static Public Attributes | |
static const int | dimension |
dimension of the grid | |
static const int | dimensionworld |
Protected Types | |
typedef GridFactory | ThisType |
typedef ALU2dGridFactory< Grid > | BaseType |
enum | |
The grid world dimension. More... | |
Protected Member Functions | |
virtual Grid * | createGridObj (const bool temporary, const std::string &filename, std::istream &inFile, BoundaryProjectionVector *bndProjections) |
virtual method for creating grid object (virtual to avoid compiling method into library) | |
void | setVerbosity (const bool verbose) |
set factory's verbosity |
Specialization of the generic GridFactory for ALUSimplexGrid<2,dimw>
typedef ALU2dGridFactory< Grid > Dune::GridFactory< ALUSimplexGrid< 2, dimw > >::BaseType [protected] |
Reimplemented from Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >.
typedef DuneBoundaryProjection< dimensionworld > Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::DuneBoundaryProjectionType [inherited] |
type of boundary projection class
typedef ALUSimplexGrid< 2, dimw > Dune::GridFactory< ALUSimplexGrid< 2, dimw > >::Grid |
Reimplemented from Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >.
typedef GridFactory Dune::GridFactory< ALUSimplexGrid< 2, dimw > >::ThisType [protected] |
Reimplemented from Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >.
typedef ALUGridTransformation< ctype, dimensionworld > Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::Transformation [inherited] |
typedef Transformation::WorldMatrix Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::WorldMatrix [inherited] |
type of matrix from world coordinates to world coordinates
typedef Transformation::WorldVector Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::WorldVector [inherited] |
type of vector for world coordinates
anonymous enum [protected, inherited] |
The grid world dimension.
Dune::GridFactory< ALUSimplexGrid< 2, dimw > >::GridFactory | ( | ) | [inline, explicit] |
Default constructor.
Dune::GridFactory< ALUSimplexGrid< 2, dimw > >::GridFactory | ( | const std::string & | filename | ) | [inline] |
constructor taking filename
Dune::GridFactory< ALUSimplexGrid< 2, dimw > >::GridFactory | ( | const bool | verbose | ) | [inline] |
constructor setting verbosity flag
[in] | verbose | verbosity (true/false) |
Grid* Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::createGrid | ( | ) | [virtual, inherited] |
finalize the grid creation and hand over the grid
The called takes responsibility for deleing the grid.
Implements Dune::GridFactoryInterface< ALUSimplexGrid< 2, dimw > >.
Grid* Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::createGrid | ( | const bool | addMissingBoundaries, |
const std::string | dgfName = "" |
||
) | [inherited] |
Grid* Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::createGrid | ( | const bool | addMissingBoundaries, |
bool | temporary, | ||
const std::string | dgfName = "" |
||
) | [inherited] |
virtual Grid* Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::createGridObj | ( | const bool | temporary, |
const std::string & | filename, | ||
std::istream & | inFile, | ||
BoundaryProjectionVector * | bndProjections | ||
) | [inline, protected, virtual, inherited] |
virtual method for creating grid object (virtual to avoid compiling method into library)
virtual void Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::insertBoundary | ( | const GeometryType & | geometry, |
const std::vector< unsigned int > & | faceVertices, | ||
const int | id | ||
) | [virtual, inherited] |
insert a boundary element into the coarse grid
[in] | geometry | GeometryType of the boundary element |
[in] | faceVertices | vertices of the boundary element |
[in] | id | boundary identifier of the boundary element, the default value is 0 (invalid boundary id) |
virtual void Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::insertBoundary | ( | const int | element, |
const int | face, | ||
const int | id | ||
) | [virtual, inherited] |
mark a face as boundary (and assign a boundary id)
[in] | element | index of the element, the face belongs to |
[in] | face | local number of the face within the element |
[in] | id | boundary id to assign to the face |
virtual void Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::insertBoundaryProjection | ( | const GeometryType & | type, |
const std::vector< unsigned int > & | vertices, | ||
const DuneBoundaryProjectionType * | projection | ||
) | [virtual, inherited] |
insert a boundary projection into the macro grid
[in] | type | geometry type of boundary face |
[in] | vertices | vertices of the boundary face |
[in] | projection | boundary projection |
virtual void Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::insertBoundaryProjection | ( | const DuneBoundaryProjectionType & | bndProjection | ) | [virtual, inherited] |
insert a boundary projection object, (a copy is made)
[in] | bndProjection | instance of an ALUGridBoundaryProjection projecting vertices to a |
virtual void Dune::GridFactoryInterface< ALUSimplexGrid< 2, dimw > >::insertBoundarySegment | ( | const std::vector< unsigned int > & | vertices, |
const shared_ptr< BoundarySegment< dimension, dimworld > > & | boundarySegment | ||
) | [inline, virtual, inherited] |
insert an arbitrarily shaped boundary segment
This method inserts a boundary segment into the coarse grid.
[in] | vertices | the indices of the vertices of the segment |
[in] | boundarySegment | user defined implementation of the boundary segment's geometry |
virtual void Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::insertBoundarySegment | ( | const std::vector< unsigned int > & | vertices | ) | [virtual, inherited] |
insert a boundary segment into the macro grid
[in] | vertices | vertex indices of boundary face |
Implements Dune::GridFactoryInterface< ALUSimplexGrid< 2, dimw > >.
virtual void Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::insertBoundarySegment | ( | const std::vector< unsigned int > & | vertices, |
const shared_ptr< BoundarySegment< 2, dimensionworld > > & | boundarySegment | ||
) | [virtual, inherited] |
insert a shaped boundary segment into the macro grid
[in] | vertices | vertex indices of boundary face |
[in] | boundarySegment | geometric realization of shaped boundary |
virtual void Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::insertElement | ( | const GeometryType & | geometry, |
const std::vector< unsigned int > & | vertices | ||
) | [virtual, inherited] |
insert an element into the coarse grid
[in] | geometry | GeometryType of the new element |
[in] | vertices | vertices of the new element |
Implements Dune::GridFactoryInterface< ALUSimplexGrid< 2, dimw > >.
virtual void Dune::GridFactoryInterface< ALUSimplexGrid< 2, dimw > >::insertElement | ( | const GeometryType & | type, |
const std::vector< unsigned int > & | vertices, | ||
const shared_ptr< VirtualFunction< FieldVector< ctype, dimension >, FieldVector< ctype, dimworld > > > & | elementParametrization | ||
) | [inline, virtual, inherited] |
Insert a parametrized element into the coarse grid.
type | The GeometryType of the new element |
vertices | The vertices of the new element, using the DUNE numbering |
elementParametrization | A function prescribing the shape of this element |
Make sure the inserted element is not inverted (this holds even for simplices). There are grids that can't handle inverted elements.
void Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::insertFaceTransformation | ( | const WorldMatrix & | matrix, |
const WorldVector & | shift | ||
) | [inherited] |
add a face transformation (for periodic identification)
A face transformation is an affine mapping T from world coordinates to world coordinates. The grid factory then glues two faces f and g if T( f ) = g or T( g ) = f.
[in] | matrix | matrix describing the linear part of T |
[in] | shift | vector describing T( 0 ) |
virtual unsigned int Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::insertionIndex | ( | const typename Codim< 0 >::Entity & | entity | ) | const [inline, virtual, inherited] |
Reimplemented from Dune::GridFactoryInterface< ALUSimplexGrid< 2, dimw > >.
virtual unsigned int Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::insertionIndex | ( | const typename Codim< dimension >::Entity & | entity | ) | const [inline, virtual, inherited] |
Reimplemented from Dune::GridFactoryInterface< ALUSimplexGrid< 2, dimw > >.
virtual unsigned int Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::insertionIndex | ( | const typename Grid::LeafIntersection & | intersection | ) | const [inline, virtual, inherited] |
virtual unsigned int Dune::GridFactoryInterface< ALUSimplexGrid< 2, dimw > >::insertionIndex | ( | const typename ALUSimplexGrid< 2, dimw > ::LeafIntersection & | intersection | ) | const [inline, virtual, inherited] |
obtain a boundary's insertion index
Data can be associated to the created macro grid using the insertion index of each entity that has been inserted during the grid creation process.
Between grid construction (createGrid) and the first grid modification, this method allows to obtain this insertion index from the grid factory. This way, data can be stored using the index maps provided by the grid.
[in] | intersection | intersection whose insertion index is requested |
virtual void Dune::GridFactoryInterface< ALUSimplexGrid< 2, dimw > >::insertVertex | ( | const FieldVector< ctype, dimworld > & | pos | ) | [pure virtual, inherited] |
Insert a vertex into the coarse grid.
virtual void Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::insertVertex | ( | const VertexType & | pos | ) | [virtual, inherited] |
insert a vertex into the coarse grid
[in] | pos | position of the vertex |
void Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::setTolerance | ( | const ctype & | epsilon | ) | [inline, inherited] |
void Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::setVerbosity | ( | const bool | verbose | ) | [inline, protected, inherited] |
set factory's verbosity
[in] | verbose | verbosity (true/flase) |
virtual bool Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::wasInserted | ( | const typename Grid::LeafIntersection & | intersection | ) | const [inline, virtual, inherited] |
virtual bool Dune::GridFactoryInterface< ALUSimplexGrid< 2, dimw > >::wasInserted | ( | const typename ALUSimplexGrid< 2, dimw > ::LeafIntersection & | intersection | ) | const [inline, virtual, inherited] |
determine whether an intersection was inserted
This method allows checking wheter an intersection was actually inserted into the grid factory.
[in] | intersection | intersection in question |
const int Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::dimension [static, inherited] |
dimension of the grid
Reimplemented from Dune::GridFactoryInterface< ALUSimplexGrid< 2, dimw > >.
const int Dune::ALU2dGridFactory< ALUSimplexGrid< 2, dimw > >::dimensionworld [static, inherited] |