![]() |
KASKADE 7 development version
|
A class storing cell ranges of roughly equal size for multithreaded mesh traversal. More...
#include <gridmanager.hh>
Public Types | |
| typedef GridView::template Codim< 0 >::Iterator | CellIterator |
| The type of iterator to step through the cells of the given view. | |
Public Member Functions | |
| CellRanges ()=default | |
| Default constructor. This creates a pretty useless empty cell ranges object. | |
| CellRanges (CellRanges &&)=default | |
| Move constructor. | |
| CellRanges (int nmax, GridView const &gridView) | |
| Constructs cell ranges. | |
| CellRanges< GridView > & | operator= (CellRanges< GridView > &&)=default |
| Move assignment. | |
| boost::iterator_range< CellIterator > | range (int n, int k) const |
| Obtain cell range. | |
| int | maxRanges () const |
| Obtain the maximum number of ranges. Default constructed "empty" cell ranges return a negative value. | |
A class storing cell ranges of roughly equal size for multithreaded mesh traversal.
Traversing cells in a Dune grid can be quite expensive, depending on the grid manager. This prevents on the fly construction of cell ranges for parallel processing. We therefore provide a cell ranges class creating the cell ranges once and storing them for later multiple use.
Definition at line 90 of file gridmanager.hh.
| typedef GridView::template Codim<0>::Iterator Kaskade::CellRanges< GridView >::CellIterator |
The type of iterator to step through the cells of the given view.
Definition at line 96 of file gridmanager.hh.
|
default |
Default constructor. This creates a pretty useless empty cell ranges object.
Referenced by CellRanges(), and operator=().
|
default |
Move constructor.
|
inline |
Constructs cell ranges.
| nmax | Compute and store cell ranges for up to nmax groups |
| gridView | the grid view to use (usually a leaf view). The iterators returned by the grid view have to be valid for the lifetime of the CellRanges object - usually this means the grid shall not be modified/adapted. |
Definition at line 116 of file gridmanager.hh.
|
inline |
Obtain the maximum number of ranges. Default constructed "empty" cell ranges return a negative value.
Definition at line 175 of file gridmanager.hh.
|
default |
Move assignment.
|
inline |
Obtain cell range.
| n | the number of cell ranges (1<=n<=maxRanges()) |
| k | the k-th range will be returned (0<=k<n) |
Definition at line 164 of file gridmanager.hh.