dune-grid 2.9.0
|
Provide a generic factory class for unstructured grids. More...
#include <dune/grid/common/gridfactory.hh>
Public Types | |
using | Communication = Dune::Communication< typename MPIHelper::MPICommunicator > |
Public Member Functions | |
GridFactory () | |
Default constructor. More... | |
virtual void | insertVertex (const FieldVector< ctype, dimworld > &pos) |
Insert a vertex into the coarse grid. More... | |
virtual void | insertElement (const GeometryType &type, const std::vector< unsigned int > &vertices) |
Insert an element into the coarse grid. More... | |
virtual void | insertBoundarySegment (const std::vector< unsigned int > &vertices) |
insert a boundary segment More... | |
virtual std::unique_ptr< GridType > | createGrid () |
Finalize grid creation and hand over the grid. More... | |
virtual void | insertBoundarySegment (const std::vector< unsigned int > &vertices)=0 |
insert a boundary segment More... | |
virtual void | insertBoundarySegment (const std::vector< unsigned int > &vertices, const std::shared_ptr< BoundarySegment< dimension, dimworld > > &boundarySegment) |
insert an arbitrarily shaped boundary segment More... | |
virtual DUNE_NO_DEPRECATED_BEGIN void | insertElement (const GeometryType &type, const std::vector< unsigned int > &vertices, const std::shared_ptr< VirtualFunction< FieldVector< ctype, dimension >, FieldVector< ctype, dimworld > > > &elementParametrization) |
Insert a parametrized element into the coarse grid. More... | |
virtual DUNE_NO_DEPRECATED_END 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. More... | |
virtual unsigned int | insertionIndex (const typename Codim< 0 >::Entity &entity) const |
obtain an element's insertion index More... | |
virtual unsigned int | insertionIndex (const typename Codim< dimension >::Entity &entity) const |
obtain a vertex' insertion index More... | |
virtual unsigned int | insertionIndex (const typename GridType::LeafIntersection &intersection) const |
obtain a boundary's insertion index More... | |
virtual bool | wasInserted (const typename GridType::LeafIntersection &intersection) const |
determine whether an intersection was inserted More... | |
Communication | comm () const |
Return the Communication used by the grid factory. More... | |
Static Protected Attributes | |
static const int | dimension = GridType::dimension |
dimension of the grid More... | |
Provide a generic factory class for unstructured grids.
This is the unspecialized class, which does nothing. All work is done in the specializations for the different grid types.
See GridFactoryInterface for an example how to use this class.
|
inherited |
|
inline |
Default constructor.
|
inlineinherited |
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.
The receiver takes responsibility of the memory allocated for the grid
Implements Dune::GridFactoryInterface< GridType >.
|
inlinevirtual |
insert a boundary segment
This method inserts a boundary segment into the coarse grid. Using this method has two advantages over not using it:
[in] | vertices | the indices of the vertices of the segment |
Implements Dune::GridFactoryInterface< GridType >.
|
virtual |
insert a boundary segment
This method inserts a boundary segment into the coarse grid. Using this method has two advantages over not using it:
[in] | vertices | the indices of the vertices of the segment |
Implements Dune::GridFactoryInterface< GridType >.
|
inlinevirtual |
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 |
Reimplemented from Dune::GridFactoryInterface< GridType >.
|
inlinevirtual |
Insert an element into the coarse grid.
type | The GeometryType of the new element |
vertices | The vertices of the new element, using the DUNE numbering |
Make sure the inserted element is not inverted (this holds even for simplices). There are grids that can't handle inverted tets.
Implements Dune::GridFactoryInterface< GridType >.
|
inlinevirtualinherited |
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.
|
inlinevirtualinherited |
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.
|
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 |
Reimplemented in Dune::GridFactory< AlbertaGrid< dim, dimworld > >, and Dune::GridFactory< UGGrid< dimworld > >.
|
inlinevirtualinherited |
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 |
Reimplemented in Dune::GridFactory< AlbertaGrid< dim, dimworld > >, and Dune::GridFactory< UGGrid< dimworld > >.
|
inlinevirtualinherited |
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 |
Insert a vertex into the coarse grid.
Implements Dune::GridFactoryInterface< GridType >.
|
inlinevirtualinherited |
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 |
|
staticprotectedinherited |
dimension of the grid