dune-grid
2.3.1
|
grid wrapper replacing the geometriesGeometryGrid 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. More...
#include <dune/grid/geometrygrid/grid.hh>
Classes | |
struct | Codim |
struct | Partition |
Types for GridView. More... |
Public Member Functions | |
template<int codim> | |
Codim< codim >::LevelIterator | lbegin (int level) const |
template<int codim> | |
Codim< codim >::LevelIterator | lend (int level) const |
template<int codim, PartitionIteratorType pitype> | |
Codim< codim >::template Partition< pitype > ::LevelIterator | lbegin (int level) const |
template<int codim, PartitionIteratorType pitype> | |
Codim< codim >::template Partition< pitype > ::LevelIterator | lend (int level) const |
template<int codim> | |
Codim< codim >::LeafIterator | leafbegin () const |
template<int codim> | |
Codim< codim >::LeafIterator | leafend () const |
template<int codim, PartitionIteratorType pitype> | |
Codim< codim >::template Partition< pitype > ::LeafIterator | leafbegin () const |
template<int codim, PartitionIteratorType pitype> | |
Codim< codim >::template Partition< pitype > ::LeafIterator | leafend () const |
const GlobalIdSet & | globalIdSet () const |
const LocalIdSet & | localIdSet () const |
const LevelIndexSet & | levelIndexSet (int level) const |
const LeafIndexSet & | leafIndexSet () const |
void | globalRefine (int refCount) |
bool | mark (int refCount, const typename Codim< 0 >::Entity &entity) |
int | getMark (const typename Codim< 0 >::Entity &entity) const |
bool | preAdapt () |
bool | adapt () |
void | postAdapt () |
Protected Member Functions | |
const CoordFunction & | coordFunction () const |
void * | allocateStorage (std::size_t size) const |
void | deallocateStorage (void *p, std::size_t size) const |
Static Protected Member Functions | |
template<int codim> | |
static const HostGrid::template Codim < codim >::Entity & | getHostEntity (const typename Codim< codim >::Entity &entity) |
Friends | |
class | GeoGrid::HierarchicIterator< const Grid > |
class | GeoGrid::EntityBase |
class | GeoGrid::EntityPointer |
class | GeoGrid::EntityProxy |
class | GeoGrid::Geometry |
class | GeoGrid::GridView |
class | GeoGrid::Intersection |
class | GeoGrid::IntersectionIterator |
class | GeoGrid::IdSet |
class | GeoGrid::IndexSet |
struct | HostGridAccess |
class | GeoGrid::CommDataHandle |
Traits | |
typedef GridFamily::Traits | Traits |
type of the grid traits |
Iterator Types | |
typedef Traits::HierarchicIterator | HierarchicIterator |
iterator over the grid hierarchy | |
typedef Traits::LeafIntersectionIterator | LeafIntersectionIterator |
iterator over intersections with other entities on the leaf level | |
typedef Traits::LevelIntersectionIterator | LevelIntersectionIterator |
iterator over intersections with other entities on the same level |
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 | |
typedef Traits::LevelIndexSet | LevelIndexSet |
type of level index set | |
typedef Traits::GlobalIdSet | GlobalIdSet |
type of global id set | |
typedef Traits::LocalIdSet | LocalIdSet |
type of local id set |
Miscellaneous Types | |
typedef Traits::ctype | ctype |
type of vector coordinates (e.g., double) | |
typedef Traits::CollectiveCommunication | CollectiveCommunication |
communicator with all other processes having some part of the grid |
Construction and Destruction | |
GeometryGrid (HostGrid &hostGrid, CoordFunction &coordFunction, const Allocator &allocator=Allocator()) | |
constructor | |
GeometryGrid (HostGrid *hostGrid, CoordFunction *coordFunction, const Allocator &allocator=Allocator()) | |
constructor | |
~GeometryGrid () | |
destructor |
Size Methods | |
int | maxLevel () const |
obtain maximal grid level | |
int | size (int level, int codim) const |
obtain number of entites on a level | |
int | size (int codim) const |
obtain number of leaf entities | |
int | size (int level, GeometryType type) const |
obtain number of entites on a level | |
int | size (GeometryType type) const |
obtain number of leaf entities | |
size_t | numBoundarySegments () const |
returns the number of boundary segments within the macro grid |
Parallel Data Distribution and Communication Methods | |
int | overlapSize (int codim) const |
obtain size of overlap region for the leaf grid | |
int | ghostSize (int codim) const |
obtain size of ghost region for the leaf grid | |
int | overlapSize (int level, int codim) const |
obtain size of overlap region for a grid level | |
int | ghostSize (int level, int codim) const |
obtain size of ghost region for a grid level | |
template<class DataHandle , class Data > | |
void | communicate (CommDataHandleIF< DataHandle, Data > &dataHandle, InterfaceType interface, CommunicationDirection direction, int level) const |
communicate information on a grid level | |
template<class DataHandle , class Data > | |
void | communicate (CommDataHandleIF< DataHandle, Data > &dataHandle, InterfaceType interface, CommunicationDirection direction) const |
communicate information on leaf entities | |
const CollectiveCommunication & | comm () const |
obtain CollectiveCommunication object | |
template<class EntitySeed > | |
Traits::template Codim < EntitySeed::codimension > ::EntityPointer | entityPointer (const EntitySeed &seed) const |
obtain EntityPointer from EntitySeed. |
Grid Views | |
template<PartitionIteratorType pitype> | |
Partition< pitype >::LevelGridView | levelView (int level) const |
View for a grid level. | |
template<PartitionIteratorType pitype> | |
Partition< pitype >::LevelGridView | levelGridView (int level) const |
template<PartitionIteratorType pitype> | |
Partition< pitype >::LeafGridView | leafView () const |
View for the leaf grid. | |
template<PartitionIteratorType pitype> | |
Partition< pitype >::LeafGridView | leafGridView () const |
LevelGridView | levelView (int level) const |
View for a grid level for All_Partition. | |
LevelGridView | levelGridView (int level) const |
LeafGridView | leafView () const |
View for the leaf grid for All_Partition. | |
LeafGridView | leafGridView () const |
Miscellaneous Methods | |
const HostGrid & | hostGrid () const |
HostGrid & | hostGrid () |
void | update () |
update grid caches |
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:
HostGrid | DUNE grid to be wrapped (called host grid) |
CoordFunction | coordinate function |
typedef Traits::CollectiveCommunication Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::CollectiveCommunication |
communicator with all other processes having some part of the grid
typedef Traits::ctype Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::ctype |
type of vector coordinates (e.g., double)
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.
The global id set is a model of Dune::IdSet.
typedef Traits::HierarchicIterator Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::HierarchicIterator |
iterator over the grid hierarchy
typedef Partition< All_Partition >::LeafGridView Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::LeafGridView |
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.
typedef Traits::LeafIntersectionIterator Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::LeafIntersectionIterator |
iterator over intersections with other entities on the leaf level
typedef Partition< All_Partition >::LevelGridView Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::LevelGridView |
View types for All_Partition.
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.
typedef Traits::LevelIntersectionIterator Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::LevelIntersectionIterator |
iterator over intersections with other entities on the same level
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.
The global id set is a model of Dune::IdSet.
typedef GridFamily::Traits Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::Traits |
type of the grid traits
|
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.
[in] | hostGrid | reference to the grid to wrap |
[in] | coordFunction | reference to the coordinate function |
[in] | allocator | storage allocator |
|
inline |
constructor
The grid takes ownership of the pointers to host grid and coordinate function. They will be deleted when the grid is destroyed.
[in] | hostGrid | pointer to the grid to wrap |
[in] | coordFunction | pointer to the coordinate function |
[in] | allocator | storage allocator |
|
inline |
destructor
|
inline |
|
inlineprotected |
|
inline |
obtain CollectiveCommunication object
The CollectiveCommunication object should be used to globally communicate information between all processes sharing this grid.
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::hostGrid().
|
inline |
communicate information on a grid level
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 >::levelView().
|
inline |
communicate information on leaf entities
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 >::leafView().
|
inlineprotected |
|
inlineprotected |
|
inline |
obtain EntityPointer from EntitySeed.
|
inlinestaticprotected |
|
inline |
|
inline |
obtain size of ghost region for the leaf grid
[in] | codim | codimension for with the information is desired |
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafView().
|
inline |
obtain size of ghost region for a grid level
[in] | level | grid level (0, ..., maxLevel()) |
[in] | codim | codimension (0, ..., dimension) |
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelView().
|
inline |
|
inline |
|
inline |
Referenced by Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::adapt(), Dune::BackupRestoreFacility< GeometryGrid< HostGrid, CoordFunction, Allocator > >::backup(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::comm(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::getMark(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::globalIdSet(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::globalRefine(), Dune::HostGridAccess< GeometryGrid< HG, CoordFunction, Allocator > >::hostGrid(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafIndexSet(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafView(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelIndexSet(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelView(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::localIdSet(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::mark(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::maxLevel(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::numBoundarySegments(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::postAdapt(), and Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::preAdapt().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
View for the leaf grid.
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::hostGrid().
Referenced by Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::communicate(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::ghostSize(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafbegin(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafend(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafGridView(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafView(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::overlapSize(), and Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::size().
|
inline |
View for the leaf grid for All_Partition.
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::hostGrid(), and Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafView().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
View for a grid level.
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::hostGrid().
Referenced by Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::communicate(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::ghostSize(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::lbegin(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::lend(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelGridView(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelView(), Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::overlapSize(), and Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::size().
|
inline |
View for a grid level for All_Partition.
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::hostGrid(), and Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelView().
|
inline |
|
inline |
|
inline |
obtain maximal grid level
Grid levels are numbered 0, ..., L, where L is the value returned by this method.
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::hostGrid().
Referenced by Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelIndexSet(), and Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::update().
|
inline |
returns the number of boundary segments within the macro grid
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::hostGrid().
|
inline |
obtain size of overlap region for the leaf grid
[in] | codim | codimension for with the information is desired |
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafView().
|
inline |
obtain size of overlap region for a grid level
[in] | level | grid level (0, ..., maxLevel()) |
[in] | codim | codimension (0, ..., dimension) |
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelView().
|
inline |
|
inline |
|
inline |
obtain number of entites on a level
[in] | level | level to consider |
[in] | codim | codimension to consider |
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelView().
|
inline |
obtain number of leaf entities
[in] | codim | codimension to consider |
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafView().
|
inline |
obtain number of entites on a level
[in] | level | level to consider |
[in] | type | geometry type to consider |
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::levelView().
|
inline |
obtain number of leaf entities
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::leafView().
|
inline |
update grid caches
This method has to be called whenever the underlying host grid changes.
References Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::adapt(), and Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::maxLevel().
Referenced by Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::adapt(), and Dune::GeometryGrid< HostGrid, CoordFunction, Allocator >::globalRefine().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |