5 #ifndef DUNE_COMMON_PARALLEL_SELECTION_HH 6 #define DUNE_COMMON_PARALLEL_SELECTION_HH 29 template<
typename TS,
typename TG,
typename TL,
int N>
57 : iter_(iter), end_(end)
67 for(++iter_; iter_!=end_; ++iter_)
75 return iter_->local().local();
80 return iter_ == other.iter_;
85 return iter_ != other.iter_;
97 template<
typename TS,
typename TG,
typename TL,
int N>
144 : indexSet_(&indexset)
178 template<
typename TS,
typename TG,
typename TL,
int N>
225 : selected_(), size_(0), built_(false)
268 template<
typename TS,
typename TG,
typename TL,
int N>
283 selected_ =
new uint32_t[entries];
289 selected_[entries++]= index->local().local();
295 template<
typename TS,
typename TG,
typename TL,
int N>
301 template<
typename TS,
typename TG,
typename TL,
int N>
304 return selected_+size_;
307 template<
typename TS,
typename TG,
typename TL,
int N>
315 template<
typename TS,
typename TG,
typename TL,
int N>
322 template<
typename TS,
typename TG,
typename TL,
int N>
329 template<
typename TS,
typename TG,
typename TL,
int N>
335 template<
typename TS,
typename TG,
typename TL,
int N>
338 indexSet_ = &indexset;
345 #endif // DUNE_COMMON_PARALLEL_SELECTION_HH void operator++()
Definition: selection.hh:64
constexpr std::bool_constant<((II==value)||...)> contains(std::integer_sequence< T, II... >, std::integral_constant< T, value >)
Checks whether or not a given sequence contains a value.
Definition: integersequence.hh:137
SelectionIterator(const ParallelIndexSetIterator &iter, const ParallelIndexSetIterator &end)
Constructor.
Definition: selection.hh:56
Dune::ParallelIndexSet< GlobalIndex, LocalIndex, N > ParallelIndexSet
The type of the underlying index set.
Definition: selection.hh:127
void setIndexSet(const ParallelIndexSet &indexset)
Set the index set of the selection.
Definition: selection.hh:336
const_iterator end() const
Get an iterator over the selected indices.
Definition: selection.hh:302
Provides a map between global and local indices.
uint32_t operator*() const
Definition: selection.hh:73
void setIndexSet(const ParallelIndexSet &indexset)
Set the index set of the selection.
Definition: selection.hh:269
const_iterator begin() const
Get the index set we are a selection for.
Definition: selection.hh:323
uint32_t * iterator
The type of the iterator of the selected indices.
Definition: selection.hh:213
This file implements iterator facade classes for writing stl conformant iterators.
bool operator!=(const SelectionIterator< TS, TG, TL, N > &other) const
Definition: selection.hh:83
Dune::ParallelIndexSet< TG, TL, N > ParallelIndexSet
The type of the underlying index set.
Definition: selection.hh:46
bool operator==(const SelectionIterator< TS, TG, TL, N > &other) const
Definition: selection.hh:78
iterator begin()
Get an iterator over the indices positioned at the first index.
TG GlobalIndex
The type of the global index of the underlying index set.
Definition: selection.hh:114
An uncached selection of indices.
Definition: selection.hh:98
UncachedSelection()
Definition: selection.hh:139
TL LocalIndex
The type of the local index of the underlying index set.
Definition: selection.hh:122
Dune namespace
Definition: alignedallocator.hh:12
iterator end()
Get an iterator over the indices positioned after the last index.
Selection()
Definition: selection.hh:220
TS AttributeSet
The type of the Set of attributes.
Definition: selection.hh:109
A constant random access iterator for the Dune::ArrayList class.
Definition: arraylist.hh:22
void free()
Free allocated memory.
Definition: selection.hh:308
ConstArrayListIterator< IndexPair< TG, TL >, N, std::allocator< Dune::IndexPair< TG, TL > > > ParallelIndexSetIterator
Definition: selection.hh:50
Selection(const ParallelIndexSet &indexset)
Definition: selection.hh:224
const_iterator begin() const
Get the index set we are a selection for.
Definition: selection.hh:296
TS AttributeSet
The type of the Set of attributes.
Definition: selection.hh:41
A const iterator over an uncached selection.
Definition: selection.hh:30
TG GlobalIndex
The type of the global index of the underlying index set.
Definition: selection.hh:195
const_iterator end() const
Get an iterator over the selected indices.
Definition: selection.hh:330
Dune::ParallelIndexSet< GlobalIndex, LocalIndex, N > ParallelIndexSet
The type of the underlying index set.
Definition: selection.hh:208
TL LocalIndex
The type of the local index of the underlying index set.
Definition: selection.hh:203
TS AttributeSet
The type of the set of attributes.
Definition: selection.hh:190
A cached selection of indices.
Definition: selection.hh:179
Manager class for the mapping between local indices and globally unique indices.
Definition: indexset.hh:217
iterator const_iterator
The type of the iterator of the selected indices.
Definition: selection.hh:137
SelectionIterator< TS, TG, TL, N > iterator
The type of the iterator of the selected indices.
Definition: selection.hh:132
uint32_t * const_iterator
The type of the iterator of the selected indices.
Definition: selection.hh:218
UncachedSelection(const ParallelIndexSet &indexset)
Definition: selection.hh:143
~Selection()
Definition: selection.hh:316