|
dune-grid 2.10
|
specialization of the generic GridFactory for AlbertaGrid More...
#include <dune/grid/albertagrid/gridfactory.hh>

Classes | |
| struct | Codim |
| class | ProjectionFactory |
Public Types | |
| typedef AlbertaGrid< dim, dimworld > | Grid |
| type of grid this factory is for | |
| typedef Grid::ctype | ctype |
| type of (scalar) coordinates | |
| typedef FieldVector< ctype, dimensionworld > | WorldVector |
| type of vector for world coordinates | |
| typedef FieldMatrix< ctype, dimensionworld, dimensionworld > | WorldMatrix |
| type of matrix from world coordinates to world coordinates | |
| typedef DuneBoundaryProjection< dimensionworld > | DuneProjection |
| typedef std::shared_ptr< const DuneProjection > | DuneProjectionPtr |
| typedef Dune::BoundarySegment< dimension, dimensionworld > | BoundarySegment |
| using | Communication |
Public Member Functions | |
| GridFactory () | |
| virtual | ~GridFactory () |
| virtual void | insertVertex (const WorldVector &pos) |
| insert a vertex into the macro grid | |
| virtual void | insertElement (const GeometryType &type, const std::vector< unsigned int > &vertices) |
| insert an element into the macro grid | |
| virtual void | insertBoundary (int element, int face, 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 DuneProjection *projection) |
| insert a boundary projection into the macro grid | |
| virtual void | insertBoundaryProjection (const DuneProjection *projection) |
| insert a global (boundary) projection into the macro grid | |
| 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 std::shared_ptr< BoundarySegment > &boundarySegment) |
| insert a shaped boundary segment into the macro grid | |
| void | insertFaceTransformation (const WorldMatrix &matrix, const WorldVector &shift) |
| add a face transformation (for periodic identification) | |
| void | markLongestEdge () |
| mark the longest edge as refinemet edge | |
| std::unique_ptr< Grid > | createGrid () |
| finalize grid creation and hand over the grid | |
| bool | write (const std::string &filename) |
| write out the macro triangulation in native grid file format | |
| virtual unsigned int | insertionIndex (const typename Codim< 0 >::Entity &entity) const |
| virtual unsigned int | insertionIndex (const typename Codim< dimension >::Entity &entity) const |
| virtual unsigned int | insertionIndex (const typename Grid::LeafIntersection &intersection) const |
| virtual bool | wasInserted (const typename Grid::LeafIntersection &intersection) const |
| virtual void | insertBoundarySegment (const std::vector< unsigned int > &vertices, const std::shared_ptr< BoundarySegment< dimension, dimworld > > &boundarySegment) |
| insert an arbitrarily shaped boundary segment | |
| virtual void | insertElement (const GeometryType &type, const std::vector< unsigned int > &vertices, std::function< FieldVector< ctype, dimworld >(FieldVector< ctype, dimension >)> elementParametrization) |
| Insert a parametrized element into the coarse grid. | |
| 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 AlbertaGrid< dim, dimworld >::LeafIntersection &intersection) const |
| obtain a boundary's insertion index | |
| virtual bool | wasInserted (const typename AlbertaGrid< dim, dimworld >::LeafIntersection &intersection) const |
| determine whether an intersection was inserted | |
| Communication | comm () const |
| Return the Communication used by the grid factory. | |
| virtual void | insertVertex (const FieldVector< ctype, dimworld > &pos)=0 |
| Insert a vertex into the coarse grid. | |
| virtual unsigned int | insertionIndex (const typename Codim< 0 >::Entity &entity) const |
| obtain an element's insertion index | |
Static Public Member Functions | |
| static void | destroyGrid (Grid *grid) |
| destroy a grid previously obtain from this factory | |
Static Public Attributes | |
| static const int | dimension = Grid::dimension |
| dimension of the grid | |
| static const int | dimensionworld = Grid::dimensionworld |
| dimension of the world | |
| static const bool | supportsBoundaryIds = true |
| are boundary ids supported by this factory? | |
| static const bool | supportPeriodicity = MacroData::supportPeriodicity |
| is the factory able to create periodic meshes? | |
Static Protected Attributes | |
| static const int | dimension |
| dimension of the grid | |
specialization of the generic GridFactory for AlbertaGrid
The GridFactory for AlbertaGrid adds some extensions to the standard GridFactoryInterface. It provides the following additional features:
| typedef Dune::BoundarySegment< dimension, dimensionworld > Dune::GridFactory< AlbertaGrid< dim, dimworld > >::BoundarySegment |
| using Dune::GridFactoryInterface< AlbertaGrid< dim, dimworld > >::Communication |
| typedef Grid::ctype Dune::GridFactory< AlbertaGrid< dim, dimworld > >::ctype |
type of (scalar) coordinates
| typedef DuneBoundaryProjection< dimensionworld > Dune::GridFactory< AlbertaGrid< dim, dimworld > >::DuneProjection |
| typedef std::shared_ptr< const DuneProjection > Dune::GridFactory< AlbertaGrid< dim, dimworld > >::DuneProjectionPtr |
| typedef AlbertaGrid< dim, dimworld > Dune::GridFactory< AlbertaGrid< dim, dimworld > >::Grid |
type of grid this factory is for
| typedef FieldMatrix< ctype, dimensionworld, dimensionworld > Dune::GridFactory< AlbertaGrid< dim, dimworld > >::WorldMatrix |
type of matrix from world coordinates to world coordinates
| typedef FieldVector< ctype, dimensionworld > Dune::GridFactory< AlbertaGrid< dim, dimworld > >::WorldVector |
type of vector for world coordinates
|
inline |
default constructor
|
virtual |
|
inline |
Return the Communication used by the grid factory.
Defaults to the Communication induced by the process-local communicator.
|
inlinevirtual |
finalize grid creation and hand over the grid
This version of createGrid is original to the AlbertaGrid grid factroy, allowing to specity a grid name.
Implements Dune::GridFactoryInterface< AlbertaGrid< dim, dimworld > >.
|
inlinestatic |
destroy a grid previously obtain from this factory
| [in] | grid | pointer to the grid to destroy |
|
inlinevirtual |
mark a face as boundary (and assign a boundary id)
|
inlinevirtual |
insert a global (boundary) projection into the macro grid
|
inlinevirtual |
insert a boundary projection into the macro grid
|
inlinevirtual |
insert a boundary segment into the macro grid
Only influences the ordering of the boundary segments
| [in] | vertices | vertex indices of boundary face |
Implements Dune::GridFactoryInterface< AlbertaGrid< dim, dimworld > >.
|
inlinevirtual |
insert a shaped boundary segment into the macro grid
| [in] | vertices | vertex indices of boundary face |
| [in] | boundarySegment | geometric realization of shaped boundary |
| ( | const std::vector< unsigned int > & | vertices, | |
| const std::shared_ptr< BoundarySegment< dimension, dimworld > > & | boundarySegment ) |
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 |
|
inlinevirtual |
insert an element into the macro grid
| [in] | type | GeometryType of the new element |
| [in] | vertices | indices of the element vertices (in DUNE numbering) |
Implements Dune::GridFactoryInterface< AlbertaGrid< dim, dimworld > >.
|
inlinevirtual |
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.
|
inline |
add a face transformation (for periodic identification)
A face transformation is an affine mapping T from world coordinates to world coordinates. ALBERTA periodically identifies 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 ) |
|
inlinevirtual |
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 |
|
inlinevirtual |
|
inlinevirtual |
obtain an element'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] | entity | entity whose insertion index is requested |
|
inlinevirtual |
|
inlinevirtual |
obtain a vertex' 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] | entity | entity whose insertion index is requested |
|
inlinevirtual |
|
inlinevirtualinherited |
obtain an element'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] | entity | entity whose insertion index is requested |
|
inlinevirtual |
insert a vertex into the macro grid
| [in] | pos | position of the vertex (in world coordinates) |
|
pure virtualinherited |
Insert a vertex into the coarse grid.
|
inline |
mark the longest edge as refinemet edge
Marking the longest edge avoids cycles in the recursive bisection algorithm, if the longest edge of each element is unique. It also makes sure the angles degenerate least. It can, hoowever, produce more nonlocal refinements than necessary. Therefore this feature is disabled by default.
|
inlinevirtual |
determine whether an intersection was inserted
This method allows checking whether an intersection was actually inserted into the grid factory.
| [in] | intersection | intersection in question |
|
inlinevirtual |
|
inline |
write out the macro triangulation in native grid file format
| [in] | filename | name of the file to write to |
true on success
|
static |
dimension of the grid
|
staticprotected |
dimension of the grid
|
static |
dimension of the world
|
static |
is the factory able to create periodic meshes?
|
static |
are boundary ids supported by this factory?