KASKADE 7 development version
Public Types | Public Member Functions | List of all members
Kaskade::CellRanges< GridView > Class Template Reference

A class storing cell ranges of roughly equal size for multithreaded mesh traversal. More...

#include <gridmanager.hh>

Detailed Description

template<class GridView>
class Kaskade::CellRanges< GridView >

A class storing cell ranges of roughly equal size for multithreaded mesh traversal.

Definition at line 84 of file gridmanager.hh.

Public Types

typedef GridView::template Codim< 0 >::Iterator CellIterator
 The type of iterator to step through the cells of the given view. More...
 

Public Member Functions

 CellRanges ()=default
 Default constructor. This creates a pretty useless empty cell ranges object. More...
 
 CellRanges (CellRanges &&)=default
 Move constructor. More...
 
 CellRanges (int nmax, GridView const &gridView)
 Constructs cell ranges. More...
 
CellRanges< GridView > & operator= (CellRanges< GridView > &&)=default
 Move assignment. More...
 
boost::iterator_range< CellIteratorrange (int n, int k) const
 Obtain cell range. More...
 
int maxRanges () const
 Obtain the maximum number of ranges. Default constructed "empty" cell ranges return a negative value. More...
 

Member Typedef Documentation

◆ CellIterator

template<class GridView >
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 90 of file gridmanager.hh.

Constructor & Destructor Documentation

◆ CellRanges() [1/3]

template<class GridView >
Kaskade::CellRanges< GridView >::CellRanges ( )
default

Default constructor. This creates a pretty useless empty cell ranges object.

◆ CellRanges() [2/3]

template<class GridView >
Kaskade::CellRanges< GridView >::CellRanges ( CellRanges< GridView > &&  )
default

Move constructor.

◆ CellRanges() [3/3]

template<class GridView >
Kaskade::CellRanges< GridView >::CellRanges ( int  nmax,
GridView const &  gridView 
)
inline

Constructs cell ranges.

Parameters
nmaxCompute and store cell ranges for up to nmax groups
gridViewthe 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 110 of file gridmanager.hh.

Member Function Documentation

◆ maxRanges()

template<class GridView >
int Kaskade::CellRanges< GridView >::maxRanges ( ) const
inline

Obtain the maximum number of ranges. Default constructed "empty" cell ranges return a negative value.

Definition at line 166 of file gridmanager.hh.

◆ operator=()

template<class GridView >
CellRanges< GridView > & Kaskade::CellRanges< GridView >::operator= ( CellRanges< GridView > &&  )
default

Move assignment.

◆ range()

template<class GridView >
boost::iterator_range< CellIterator > Kaskade::CellRanges< GridView >::range ( int  n,
int  k 
) const
inline

Obtain cell range.

Parameters
nthe number of cell ranges (1<=n<=maxRanges())
kthe k-th range will be returned (0<=k<n)

Definition at line 155 of file gridmanager.hh.


The documentation for this class was generated from the following file: