Dune Core Modules (2.3.1)
Grid abstract base class. More...
#include <dune/grid/common/grid.hh>
Classes | |
struct | Codim |
A Traits struct that collects all associated types of one implementation. More... | |
struct | Partition |
Types for GridView. More... | |
Exported constants | |
enum | { dimension =dim } |
A constant that exports the template parameter dim. More... | |
enum | { dimensionworld =dimworld } |
A constant that exports the template parameter dimworld. More... | |
Exported types | |
typedef Partition< All_Partition >::LevelGridView | LevelGridView |
View types for All_Partition. | |
typedef Partition< All_Partition >::LeafGridView | LeafGridView |
typedef GridFamily::Traits::LeafIntersection | LeafIntersection |
A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimension 0 entities in the leaf view. | |
typedef GridFamily::Traits::LevelIntersection | LevelIntersection |
A type that is a model of Dune::Intersection, an intersections of two codimension 1 of two codimension 0 entities in a level view. | |
typedef GridFamily::Traits::LeafIntersectionIterator | LeafIntersectionIterator |
A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine, but not to modify, the intersections of codimension 1 of an leaf element (entity of codimension 0) with other leaf elements. | |
typedef GridFamily::Traits::LevelIntersectionIterator | LevelIntersectionIterator |
A type that is a model of Dune::IntersectionIterator which is an iterator that allows to examine, but not to modify, the intersections of codimension 1 of an element (entity of codimension 0) with other elements on the same level. | |
typedef GridFamily::Traits::HierarchicIterator | HierarchicIterator |
A type that is a model of Dune::HierarchicIterator A type of iterator that allows to examine, but not to modify, entities of codimension 0 that result from refinement of an entity of codimension 0. | |
typedef GridFamily::Traits::LevelIndexSet | LevelIndexSet |
A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities on a grid level. | |
typedef GridFamily::Traits::LeafIndexSet | LeafIndexSet |
A type that is a model of Dune::IndexSet which provides a consecutive, but non persistent, numbering for entities in the leaf grid. | |
typedef GridFamily::Traits::GlobalIdSet | GlobalIdSet |
A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entities in the grid. The numbering is unique over all processes over which the grid is partitioned. The numbering is not necessarily consecutive. | |
typedef GridFamily::Traits::LocalIdSet | LocalIdSet |
A type that is a model of Dune::IdSet which provides a unique and persistent numbering for all entities in the grid. The numbering is only unique in a single process and it is not necessarily consecutive. | |
typedef GridFamily::Traits::CollectiveCommunication | CollectiveCommunication |
A type that is a model of Dune::CollectiveCommunication. It provides a portable way for collective communication on the set of processes used by the grid. | |
typedef ct | ctype |
Define type used for coordinates in grid module. | |
Size methods | |
int | maxLevel () const |
Return maximum level defined in this grid. Levels are numbered 0 ... maxLevel with 0 the coarsest level. | |
int | size (int level, int codim) const |
Return number of grid entities of a given codim on a given level in this process. | |
int | size (int codim) const |
Return number of leaf entities of a given codim in this process. | |
int | size (int level, GeometryType type) const |
Return number of entities per level and geometry type in this process. | |
int | size (GeometryType type) const |
Return number of leaf entities per geometry type in this process. | |
size_t | numBoundarySegments () const |
returns the number of boundary segments within the macro grid More... | |
Views | |
template<PartitionIteratorType pitype> | |
Partition< pitype >::LevelGridView | DUNE_DEPRECATED_MSG ("The method levelView has been renamed to levelGridView.") levelView(int level) const |
View for a grid level. | |
template<PartitionIteratorType pitype> | |
Partition< pitype >::LeafGridView | DUNE_DEPRECATED_MSG ("The method levelView has been renamed to leafGridView.") leafView() const |
View for the leaf grid. | |
LevelGridView | levelView (int level) const DUNE_DEPRECATED_MSG("The method levelView has been renamed to levelGridView.") |
View for a grid level for All_Partition. | |
LeafGridView | leafView () const DUNE_DEPRECATED_MSG("The method leafView has been renamed to leafGridView.") |
View for the leaf grid for All_Partition. | |
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. | |
Iterators | |
template<int cd, PartitionIteratorType pitype> | |
Codim< cd >::template Partition< pitype >::LevelIterator | lbegin (int level) const |
Iterator to first entity of given codim on level. | |
template<int cd, PartitionIteratorType pitype> | |
Codim< cd >::template Partition< pitype >::LevelIterator | lend (int level) const |
one past the end on this level | |
template<int cd> | |
Codim< cd >::template Partition< All_Partition >::LevelIterator | lbegin (int level) const |
Iterator to first entity of given codim on level for PartitionType All_Partition. | |
template<int cd> | |
Codim< cd >::template Partition< All_Partition >::LevelIterator | lend (int level) const |
one past the end on this level for PartitionType All_Partition | |
template<int cd, PartitionIteratorType pitype> | |
Codim< cd >::template Partition< pitype >::LeafIterator | leafbegin () const |
Iterator to first entity of given codim on leaf grid. | |
template<int cd, PartitionIteratorType pitype> | |
Codim< cd >::template Partition< pitype >::LeafIterator | leafend () const |
one past the end on the leaf level grid | |
template<int cd> | |
Codim< cd >::template Partition< All_Partition >::LeafIterator | leafbegin () const |
Iterator to first entity of given codim on leaf grid for PartitionType All_Partition. | |
template<int cd> | |
Codim< cd >::template Partition< All_Partition >::LeafIterator | leafend () const |
one past the end on the leaf grid for PartitionType All_Partition | |
Access to index and id sets | |
const GlobalIdSet & | globalIdSet () const |
return const reference to the grids global id set | |
const LocalIdSet & | localIdSet () const |
return const reference to the grids local id set | |
const LevelIndexSet & | levelIndexSet (int level) const |
return const reference to the grids level index set for level level | |
const LeafIndexSet & | leafIndexSet () const |
return const reference to the grids leaf index set | |
Adaptivity and grid refinement | |
void | globalRefine (int refCount) |
Refine the grid refCount times using the default refinement rule. More... | |
bool | mark (int refCount, const typename Codim< 0 >::Entity &e) |
Marks an entity to be refined/coarsened in a subsequent adapt. More... | |
int | getMark (const typename Codim< 0 >::Entity &e) const |
returns adaptation mark for given entity More... | |
bool | preAdapt () |
To be called after entities have been marked and before adapt() is called. More... | |
bool | adapt () |
Refine all positive marked leaf entities, coarsen all negative marked entities if possible. More... | |
void | postAdapt () |
To be called after grid has been adapted and information left over by the adaptation has been processed. More... | |
Parallel data distribution and communication | |
int | overlapSize (int level, int codim) const |
Return size of overlap for a given codim on a given level. | |
int | overlapSize (int codim) const |
Return size of overlap region for a given codim on the leaf grid. | |
int | ghostSize (int level, int codim) const |
Return size of ghost region for a given codim on a given level. | |
int | ghostSize (int codim) const |
Return size of ghost region for a given codim on the leaf grid. | |
template<class DataHandleImp , class DataTypeImp > | |
void | communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir, int level) const |
Communicate information on distributed entities on a given level Template parameter is a model of Dune::CommDataHandleIF. More... | |
template<class DataHandleImp , class DataTypeImp > | |
void | communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir) const |
Communicate information on distributed entities on the leaf grid Template parameter is a model of Dune::CommDataHandleIF. More... | |
const CollectiveCommunication & | comm () const |
return const reference to a collective communication object. The return type is a model of Dune::CollectiveCommunication. | |
bool | loadBalance () |
Re-balances the load each process has to handle for a parallel grid,. More... | |
template<class DataHandle > | |
bool | loadBalance (DataHandle &data) |
Re-balances the load each process has to handle for a parallel grid and moves the data. More... | |
template<class EntitySeed > | |
Codim< EntitySeed::codimension >::EntityPointer | entityPointer (const EntitySeed &seed) const |
obtain EntityPointer from EntitySeed. | |
GridImp & | asImp () |
Barton-Nackman trick. | |
const GridImp & | asImp () const |
Barton-Nackman trick. | |
Detailed Description
class Dune::Grid< dim, dimworld, ct, GridFamily >
Grid abstract base class.
This class is the base class for all grid implementations. Although no virtual functions are used we call it abstract since its methods do not contain an implementation but forward to the methods of the derived class via the Barton-Nackman trick.
- Template Parameters
-
dim specifies the dimension of the grid. dimworld specifies the dimension of the surrounding space, this can be different from dim, if the grid is defined on a manifold . ct field type of the world vector space. GridFamily traits class providing all types associated with the grid implementation.
Member Enumeration Documentation
◆ anonymous enum
anonymous enum |
◆ anonymous enum
anonymous enum |
Member Function Documentation
◆ adapt()
|
inline |
Refine all positive marked leaf entities, coarsen all negative marked entities if possible.
\return true if a least one entity was refined The complete adaptation process works as follows: - mark entities with the mark() method - call preAdapt() - if preAdapt() returned true: possibly save current solution - call adapt() - if adapt() returned true: possibly interpolate the (saved) solution - call postAdapt()
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().
◆ communicate() [1/2]
|
inline |
Communicate information on distributed entities on the leaf grid Template parameter is a model of Dune::CommDataHandleIF.
- Parameters
-
data A data handle telling the method what data is communicated and how this should be done. interface The communication interface to use. dir The direction of the communication along the interface (forward or backward).
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp(), and CHECK_AND_CALL_INTERFACE_IMPLEMENTATION.
◆ communicate() [2/2]
|
inline |
Communicate information on distributed entities on a given level Template parameter is a model of Dune::CommDataHandleIF.
- Parameters
-
data A data handle telling the method what data is communicated and how this should be done. interface The communication interface to use. dir The direction of the communication along the interface (forward or backward. level The index of the grid level where the communication should happen.
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp(), and CHECK_AND_CALL_INTERFACE_IMPLEMENTATION.
◆ getMark()
|
inline |
returns adaptation mark for given entity
- Parameters
-
[in] e Entity for which adaptation mark should be determined
- Returns
- int adaptation mark currently set for given Entity e
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().
◆ globalRefine()
|
inline |
Refine the grid refCount times using the default refinement rule.
This behaves like marking all elements for refinement and then calling preAdapt, adapt and postAdapt. The state after globalRefine is comparable to the state after postAdapt.
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp(), CHECK_AND_CALL_INTERFACE_IMPLEMENTATION, and Dune::Grid< dim, dimworld, ct, GridFamily >::globalRefine().
Referenced by Dune::Grid< dim, dimworld, ct, GridFamily >::globalRefine().
◆ loadBalance() [1/2]
|
inline |
Re-balances the load each process has to handle for a parallel grid,.
- Returns
- True if the grid has changed.
◆ loadBalance() [2/2]
|
inline |
Re-balances the load each process has to handle for a parallel grid and moves the data.
- Parameters
-
data A data handle telling the method which data should be communicated and how. Has to adhere to the interface describe by CommDataHandleIf just like the data handle for the communicate methods.
- Returns
- True if the grid has changed.
◆ mark()
|
inline |
Marks an entity to be refined/coarsened in a subsequent adapt.
- Parameters
-
[in] refCount Number of subdivisions that should be applied. Negative value means coarsening. [in] e Entity that should be marked
- Returns
- true if Entity was marked, false otherwise.
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().
◆ numBoundarySegments()
|
inline |
returns the number of boundary segments within the macro grid
- Returns
- number of boundary segments within the macro grid
◆ postAdapt()
|
inline |
To be called after grid has been adapted and information left over by the adaptation has been processed.
This removes the isNew flags of the elements from the last adapt call.
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().
◆ preAdapt()
|
inline |
To be called after entities have been marked and before adapt() is called.
This sets the mightVanish flags of the elements for the next adapt call.
- Returns
- true if an entity may be coarsened during a subsequent adapt(), false otherwise.
References Dune::Grid< dim, dimworld, ct, GridFamily >::asImp().
The documentation for this class was generated from the following file:
- dune/grid/common/grid.hh
