Dune Core Modules (2.4.2)
grid wrapper replacing the geometries More...
#include <dune/grid/geometrygrid/grid.hh>
Classes | |
struct | Codim |
traits structure containing types for a codimension More... | |
struct | Partition |
Types for GridView. More... | |
Static Public Member Functions | |
template<class InterfaceType > | |
static std::conditional< std::is_reference< InterfaceType >::value, typenamestd::add_lvalue_reference< typenameReturnImplementationType< typenamestd::remove_reference< InterfaceType >::type >::ImplementationType >::type, typenamestd::remove_const< typenameReturnImplementationType< typenamestd::remove_reference< InterfaceType >::type >::ImplementationType >::type >::type | getRealImplementation (InterfaceType &&i) |
return real implementation of interface class | |
Traits | |
typedef GridFamily::Traits | Traits |
type of the grid traits | |
Grid View Types | |
typedef Partition< All_Partition >::LevelGridView | LevelGridView |
View types for All_Partition. | |
typedef Partition< All_Partition >::LeafGridView | LeafGridView |
Index and Id Set Types | |
typedef Traits::LeafIndexSet | LeafIndexSet |
type of leaf index set More... | |
typedef Traits::LevelIndexSet | LevelIndexSet |
type of level index set More... | |
typedef Traits::GlobalIdSet | GlobalIdSet |
type of global id set More... | |
typedef Traits::LocalIdSet | LocalIdSet |
type of local id set More... | |
Construction and Destruction | |
GeometryGrid (HostGrid &hostGrid, CoordFunction &coordFunction, const Allocator &allocator=Allocator()) | |
constructor More... | |
GeometryGrid (HostGrid *hostGrid, CoordFunction *coordFunction, const Allocator &allocator=Allocator()) | |
constructor More... | |
~GeometryGrid () | |
destructor | |
Size Methods | |
int | maxLevel () const |
obtain maximal grid level More... | |
int | size (int level, int codim) const |
obtain number of entites on a level More... | |
int | size (int codim) const |
obtain number of leaf entities More... | |
int | size (int level, GeometryType type) const |
obtain number of entites on a level More... | |
int | size (GeometryType type) const |
obtain number of leaf entities More... | |
size_t | numBoundarySegments () const |
returns the number of boundary segments within the macro grid More... | |
Parallel Data Distribution and Communication Methods | |
int | overlapSize (int codim) const |
obtain size of overlap region for the leaf grid More... | |
int | ghostSize (int codim) const |
obtain size of ghost region for the leaf grid More... | |
int | overlapSize (int level, int codim) const |
obtain size of overlap region for a grid level More... | |
int | ghostSize (int level, int codim) const |
obtain size of ghost region for a grid level More... | |
template<class DataHandle , class Data > | |
void | communicate (CommDataHandleIF< DataHandle, Data > &dataHandle, InterfaceType interface, CommunicationDirection direction, int level) const |
communicate information on a grid level More... | |
template<class DataHandle , class Data > | |
void | communicate (CommDataHandleIF< DataHandle, Data > &dataHandle, InterfaceType interface, CommunicationDirection direction) const |
communicate information on leaf entities More... | |
const CollectiveCommunication & | comm () const |
obtain CollectiveCommunication object More... | |
template<class EntitySeed > | |
Traits::template Codim< EntitySeed::codimension >::EntityPointer | DUNE_DEPRECATED_MSG ("entityPointer() is deprecated and will be removed after the release of dune-grid 2.4. Use entity() instead to directly obtain an Entity object.") entityPointer(const EntitySeed &seed) const |
obtain EntityPointer from EntitySeed. | |
template<class EntitySeed > | |
Traits::template Codim< EntitySeed::codimension >::Entity | entity (const EntitySeed &seed) const |
obtain Entity from EntitySeed. | |
Grid Views | |
template<PartitionIteratorType pitype> | |
Partition< pitype >::LevelGridView | levelGridView (int level) const |
View for a grid level. | |
template<PartitionIteratorType pitype> | |
Partition< pitype >::LeafGridView | leafGridView () const |
View for the leaf grid. | |
LevelGridView | levelGridView (int level) const |
View for a grid level for All_Partition. | |
LeafGridView | leafGridView () const |
View for the leaf grid for All_Partition. | |
Miscellaneous Methods | |
const HostGrid & | hostGrid () const |
HostGrid & | hostGrid () |
void | update () |
update grid caches More... | |
Detailed Description
class Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >
grid wrapper replacing the geometries
GeometryGrid wraps another DUNE grid and replaces its geometry by the generic geometries from dune-grid. These are linear (respectively n-linear) DUNE geometries interpolating some given corners. These corners are obtained by mapping the corners of the host grid's geometry (also called host geometry) by a coordinate function.
An example of a coordinate function is given by the following code:
- Note
- A dune-fem Function can be used as a coordinate function. The evaluation of discrete functions would be very expensive, though.
- Template Parameters
-
HostGrid DUNE grid to be wrapped (called host grid) CoordFunction coordinate function
Member Typedef Documentation
◆ GlobalIdSet
typedef Traits::GlobalIdSet Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::GlobalIdSet |
type of global id set
The id set assigns a unique identifier to each entity within the grid. This identifier is unique over all processes sharing this grid.
- Note
- Id's are neither consecutive nor necessarily of an integral type.
The global id set is a model of Dune::IdSet.
◆ LeafIndexSet
typedef Traits::LeafIndexSet Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::LeafIndexSet |
type of leaf index set
The index set assigns consecutive indices to the entities of the leaf grid. The indices are of integral type and can be used to access arrays.
The leaf index set is a model of Dune::IndexSet.
◆ LevelIndexSet
typedef Traits::LevelIndexSet Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::LevelIndexSet |
type of level index set
The index set assigns consecutive indices to the entities of a grid level. The indices are of integral type and can be used to access arrays.
The level index set is a model of Dune::IndexSet.
◆ LocalIdSet
typedef Traits::LocalIdSet Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::LocalIdSet |
type of local id set
The id set assigns a unique identifier to each entity within the grid. This identifier needs only to be unique over this process.
Though the local id set may be identical to the global id set, it is often implemented more efficiently.
- Note
- Ids are neither consecutive nor necessarily of an integral type.
- Local ids need not be compatible with global ids. Also, no mapping from local ids to global ones needs to exist.
The global id set is a model of Dune::IdSet.
Constructor & Destructor Documentation
◆ GeometryGrid() [1/2]
|
inline |
constructor
The references to host grid and coordinate function are stored in the grid. Therefore, they must remain valid until the grid is destroyed.
- Parameters
-
[in] hostGrid reference to the grid to wrap [in] coordFunction reference to the coordinate function [in] allocator storage allocator
◆ GeometryGrid() [2/2]
|
inline |
constructor
The grid takes ownership of the pointers to host grid and coordinate function. They will be deleted when the grid is destroyed.
- Parameters
-
[in] hostGrid pointer to the grid to wrap [in] coordFunction pointer to the coordinate function [in] allocator storage allocator
Member Function Documentation
◆ comm()
|
inline |
obtain CollectiveCommunication object
The CollectiveCommunication object should be used to globally communicate information between all processes sharing this grid.
- Note
- The CollectiveCommunication object returned is identical to the one returned by the host grid.
◆ communicate() [1/2]
|
inline |
communicate information on leaf entities
- Parameters
-
dataHandle communication data handle (user defined) [in] interface communication interface (one of InteriorBorder_InteriorBorder_Interface, InteriorBorder_All_Interface, Overlap_OverlapFront_Interface, Overlap_All_Interface, All_All_Interface) [in] direction communication direction (one of ForwardCommunication, BackwardCommunication)
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafGridView().
◆ communicate() [2/2]
|
inline |
communicate information on a grid level
- Parameters
-
dataHandle communication data handle (user defined) [in] interface communication interface (one of InteriorBorder_InteriorBorder_Interface, InteriorBorder_All_Interface, Overlap_OverlapFront_Interface, Overlap_All_Interface, All_All_Interface) [in] direction communication direction (one of ForwardCommunication or BackwardCommunication) [in] level grid level to communicate
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelGridView().
◆ ghostSize() [1/2]
|
inline |
obtain size of ghost region for the leaf grid
- Parameters
-
[in] codim codimension for with the information is desired
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafGridView().
◆ ghostSize() [2/2]
|
inline |
obtain size of ghost region for a grid level
- Parameters
-
[in] level grid level (0, ..., maxLevel()) [in] codim codimension (0, ..., dimension)
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelGridView().
◆ maxLevel()
|
inline |
obtain maximal grid level
Grid levels are numbered 0, ..., L, where L is the value returned by this method.
- Returns
- maximal grid level
Referenced by Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::update().
◆ numBoundarySegments()
|
inline |
returns the number of boundary segments within the macro grid
- Returns
- number of boundary segments within the macro grid
◆ overlapSize() [1/2]
|
inline |
obtain size of overlap region for the leaf grid
- Parameters
-
[in] codim codimension for with the information is desired
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafGridView().
◆ overlapSize() [2/2]
|
inline |
obtain size of overlap region for a grid level
- Parameters
-
[in] level grid level (0, ..., maxLevel()) [in] codim codimension (0, ..., dimension)
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelGridView().
◆ size() [1/4]
|
inline |
obtain number of leaf entities
- Returns
- number of leaf entities with a geometry of type type
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafGridView().
◆ size() [2/4]
|
inline |
obtain number of leaf entities
- Parameters
-
[in] codim codimension to consider
- Returns
- number of leaf entities of codimension codim
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafGridView().
◆ size() [3/4]
|
inline |
obtain number of entites on a level
- Parameters
-
[in] level level to consider [in] type geometry type to consider
- Returns
- number of entities with a geometry of type type on grid level level.
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelGridView().
◆ size() [4/4]
|
inline |
obtain number of entites on a level
- Parameters
-
[in] level level to consider [in] codim codimension to consider
- Returns
- number of entities of codimension codim on grid level level.
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelGridView().
◆ update()
|
inline |
update grid caches
This method has to be called whenever the underlying host grid changes.
- Note
- If you adapt the host grid through this geometry grid's adaptation or load balancing methods, update is automatically called.
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::maxLevel().
The documentation for this class was generated from the following files:
- dune/grid/geometrygrid/declaration.hh
- dune/grid/geometrygrid/grid.hh