dune-common
2.7.0
|
Files | |
file | indexset.hh |
Provides a map between global and local indices. | |
file | localindex.hh |
Provides classes for use as the local index in ParallelIndexSet. | |
file | plocalindex.hh |
Provides classes for use as the local index in ParallelIndexSet for distributed computing. | |
file | selection.hh |
Provides classes for selecting indices based on attribute flags. | |
Classes | |
class | Dune::IndexPair< TG, TL > |
A pair consisting of a global and local index. More... | |
struct | Dune::MPITraits< T > |
class | Dune::InvalidIndexSetState |
Exception indicating that the index set is not in the expected state. More... | |
class | Dune::GlobalLookupIndexSet< I > |
Decorates an index set with the possibility to find a global index that is mapped to a specific local. More... | |
class | Dune::ParallelIndexSet< TG, TL, N >::iterator |
The iterator over the pairs. More... | |
class | Dune::ParallelIndexSet< TG, TL, N > |
Manager class for the mapping between local indices and globally unique indices. More... | |
struct | Dune::LocalIndexComparator< T > |
struct | Dune::IndexSetSortFunctor< TG, TL > |
class | Dune::LocalIndex |
An index present on the local process. More... | |
class | Dune::ParallelLocalIndex< T > |
An index present on the local process with an additional attribute flag. More... | |
struct | Dune::LocalIndexComparator< ParallelLocalIndex< T > > |
class | Dune::SelectionIterator< TS, TG, TL, N > |
A const iterator over an uncached selection. More... | |
class | Dune::UncachedSelection< TS, TG, TL, N > |
An uncached selection of indices. More... | |
class | Dune::Selection< TS, TG, TL, N > |
A cached selection of indices. More... | |
Enumerations | |
enum | Dune::ParallelIndexSetState { Dune::GROUND, Dune::RESIZE } |
The states the index set can be in. More... | |
enum | { Dune::ParallelIndexSet< TG, TL, N >::arraySize = (N>0) ? N : 1 } |
enum | Dune::LocalIndexState { Dune::VALID, Dune::DELETED } |
The states avaiable for the local indices. More... | |
Functions | |
template<class TG , class TL > | |
std::ostream & | Dune::operator<< (std::ostream &os, const IndexPair< TG, TL > &pair) |
Print an index pair. More... | |
template<class TG , class TL > | |
bool | Dune::operator== (const IndexPair< TG, TL > &, const IndexPair< TG, TL > &) |
template<class TG , class TL > | |
bool | Dune::operator!= (const IndexPair< TG, TL > &, const IndexPair< TG, TL > &) |
template<class TG , class TL > | |
bool | Dune::operator< (const IndexPair< TG, TL > &, const IndexPair< TG, TL > &) |
template<class TG , class TL > | |
bool | Dune::operator> (const IndexPair< TG, TL > &, const IndexPair< TG, TL > &) |
template<class TG , class TL > | |
bool | Dune::operator<= (const IndexPair< TG, TL > &, const IndexPair< TG, TL > &) |
template<class TG , class TL > | |
bool | Dune::operator>= (const IndexPair< TG, TL > &, const IndexPair< TG, TL > &) |
template<class TG , class TL > | |
bool | Dune::operator== (const IndexPair< TG, TL > &, const TG &) |
template<class TG , class TL > | |
bool | Dune::operator!= (const IndexPair< TG, TL > &, const TG &) |
template<class TG , class TL > | |
bool | Dune::operator< (const IndexPair< TG, TL > &, const TG &) |
template<class TG , class TL > | |
bool | Dune::operator> (const IndexPair< TG, TL > &, const TG &) |
template<class TG , class TL > | |
bool | Dune::operator<= (const IndexPair< TG, TL > &, const TG &) |
template<class TG , class TL > | |
bool | Dune::operator>= (const IndexPair< TG, TL > &, const TG &) |
Dune::IndexPair< TG, TL >::IndexPair (const GlobalIndex &global, const LocalIndex &local) | |
Constructs a new Pair. More... | |
Dune::IndexPair< TG, TL >::IndexPair () | |
Construct a new Pair. More... | |
Dune::IndexPair< TG, TL >::IndexPair (const GlobalIndex &global) | |
Constructs a new Pair. More... | |
const GlobalIndex & | Dune::IndexPair< TG, TL >::global () const |
Get the global index. More... | |
LocalIndex & | Dune::IndexPair< TG, TL >::local () |
Get the local index. More... | |
const LocalIndex & | Dune::IndexPair< TG, TL >::local () const |
Get the local index. More... | |
void | Dune::IndexPair< TG, TL >::setLocal (int index) |
Set the local index. More... | |
Dune::ParallelIndexSet< TG, TL, N >::iterator::iterator (ParallelIndexSet< TG, TL, N > &indexSet, const Father &father) | |
Dune::ParallelIndexSet< TG, TL, N >::ParallelIndexSet () | |
Constructor. More... | |
const ParallelIndexSetState & | Dune::ParallelIndexSet< TG, TL, N >::state () |
Get the state the index set is in. More... | |
void | Dune::ParallelIndexSet< TG, TL, N >::beginResize () |
Indicate that the index set is to be resized. More... | |
void | Dune::ParallelIndexSet< TG, TL, N >::add (const GlobalIndex &global) |
Add an new index to the set. More... | |
void | Dune::ParallelIndexSet< TG, TL, N >::add (const GlobalIndex &global, const LocalIndex &local) |
Add an new index to the set. More... | |
void | Dune::ParallelIndexSet< TG, TL, N >::markAsDeleted (const iterator &position) |
Mark an index as deleted. More... | |
void | Dune::ParallelIndexSet< TG, TL, N >::endResize () |
Indicate that the resizing finishes. More... | |
IndexPair & | Dune::ParallelIndexSet< TG, TL, N >::operator[] (const GlobalIndex &global) |
Find the index pair with a specific global id. More... | |
IndexPair & | Dune::ParallelIndexSet< TG, TL, N >::at (const GlobalIndex &global) |
Find the index pair with a specific global id. More... | |
bool | Dune::ParallelIndexSet< TG, TL, N >::exists (const GlobalIndex &global) const |
Find the index pair with a specific global id. More... | |
const IndexPair & | Dune::ParallelIndexSet< TG, TL, N >::operator[] (const GlobalIndex &global) const |
Find the index pair with a specific global id. More... | |
const IndexPair & | Dune::ParallelIndexSet< TG, TL, N >::at (const GlobalIndex &global) const |
Find the index pair with a specific global id. More... | |
iterator | Dune::ParallelIndexSet< TG, TL, N >::begin () |
Get an iterator over the indices positioned at the first index. More... | |
iterator | Dune::ParallelIndexSet< TG, TL, N >::end () |
Get an iterator over the indices positioned after the last index. More... | |
const_iterator | Dune::ParallelIndexSet< TG, TL, N >::begin () const |
Get an iterator over the indices positioned at the first index. More... | |
const_iterator | Dune::ParallelIndexSet< TG, TL, N >::end () const |
Get an iterator over the indices positioned after the last index. More... | |
void | Dune::ParallelIndexSet< TG, TL, N >::renumberLocal () |
Renumbers the local index numbers. More... | |
int | Dune::ParallelIndexSet< TG, TL, N >::seqNo () const |
Get the internal sequence number. More... | |
size_t | Dune::ParallelIndexSet< TG, TL, N >::size () const |
Get the total number (public and nonpublic) indices. More... | |
template<class TG , class TL , int N> | |
std::ostream & | Dune::operator<< (std::ostream &os, const ParallelIndexSet< TG, TL, N > &indexSet) |
Print an index set. More... | |
Dune::GlobalLookupIndexSet< I >::GlobalLookupIndexSet (const ParallelIndexSet &indexset, std::size_t size) | |
Constructor. More... | |
Dune::GlobalLookupIndexSet< I >::GlobalLookupIndexSet (const ParallelIndexSet &indexset) | |
Constructor. More... | |
Dune::GlobalLookupIndexSet< I >::~GlobalLookupIndexSet () | |
Destructor. More... | |
const IndexPair & | Dune::GlobalLookupIndexSet< I >::operator[] (const GlobalIndex &global) const |
Find the index pair with a specific global id. More... | |
const IndexPair * | Dune::GlobalLookupIndexSet< I >::pair (const std::size_t &local) const |
Get the index pair corresponding to a local index. More... | |
const_iterator | Dune::GlobalLookupIndexSet< I >::begin () const |
Get an iterator over the indices positioned at the first index. More... | |
const_iterator | Dune::GlobalLookupIndexSet< I >::end () const |
Get an iterator over the indices positioned after the last index. More... | |
int | Dune::GlobalLookupIndexSet< I >::seqNo () const |
Get the internal sequence number. More... | |
size_t | Dune::GlobalLookupIndexSet< I >::size () const |
Get the total number (public and nonpublic) indices. More... | |
static bool | Dune::LocalIndexComparator< T >::compare (const T &t1, const T &t2) |
bool | Dune::IndexSetSortFunctor< TG, TL >::operator() (const IndexPair< TG, TL > &i1, const IndexPair< TG, TL > &i2) |
template<class T > | |
std::ostream & | Dune::operator<< (std::ostream &os, const ParallelLocalIndex< T > &index) |
Print the local index to a stream. More... | |
template<typename T > | |
bool | Dune::operator== (const ParallelLocalIndex< T > &p1, const ParallelLocalIndex< T > &p2) |
template<typename T > | |
bool | Dune::operator!= (const ParallelLocalIndex< T > &p1, const ParallelLocalIndex< T > &p2) |
const std::size_t & | Dune::LocalIndex::local () const |
get the local index. More... | |
Dune::LocalIndex::operator std::size_t () const | |
Convert to the local index represented by an int. More... | |
LocalIndex & | Dune::LocalIndex::operator= (std::size_t index) |
Assign a new local index. More... | |
LocalIndexState | Dune::LocalIndex::state () const |
Get the state. More... | |
void | Dune::LocalIndex::setState (LocalIndexState state) |
Set the state. More... | |
Dune::ParallelLocalIndex< T >::ParallelLocalIndex (const Attribute &attribute, bool isPublic) | |
Constructor. More... | |
Dune::ParallelLocalIndex< T >::ParallelLocalIndex (size_t localIndex, const Attribute &attribute, bool isPublic=true) | |
Constructor. More... | |
Dune::ParallelLocalIndex< T >::ParallelLocalIndex () | |
Parameterless constructor. More... | |
const Attribute | Dune::ParallelLocalIndex< T >::attribute () const |
Get the attribute of the index. More... | |
void | Dune::ParallelLocalIndex< T >::setAttribute (const Attribute &attribute) |
Set the attribute of the index. More... | |
size_t | Dune::ParallelLocalIndex< T >::local () const |
get the local index. More... | |
Dune::ParallelLocalIndex< T >::operator size_t () const | |
Convert to the local index represented by an int. More... | |
ParallelLocalIndex< Attribute > & | Dune::ParallelLocalIndex< T >::operator= (size_t index) |
Assign a new local index. More... | |
bool | Dune::ParallelLocalIndex< T >::isPublic () const |
Check whether the index might also be known other processes. More... | |
LocalIndexState | Dune::ParallelLocalIndex< T >::state () const |
Get the state. More... | |
void | Dune::ParallelLocalIndex< T >::setState (const LocalIndexState &state) |
Set the state. More... | |
void | Dune::Selection< TS, TG, TL, N >::setIndexSet (const ParallelIndexSet &indexset) |
Set the index set of the selection. More... | |
const_iterator | Dune::Selection< TS, TG, TL, N >::begin () const |
Get the index set we are a selection for. More... | |
const_iterator | Dune::Selection< TS, TG, TL, N >::end () const |
Get an iterator over the selected indices. More... | |
void | Dune::Selection< TS, TG, TL, N >::free () |
Free allocated memory. More... | |
Dune::Selection< TS, TG, TL, N >::~Selection () | |
const_iterator | Dune::UncachedSelection< TS, TG, TL, N >::begin () const |
Get the index set we are a selection for. More... | |
const_iterator | Dune::UncachedSelection< TS, TG, TL, N >::end () const |
Get an iterator over the selected indices. More... | |
void | Dune::UncachedSelection< TS, TG, TL, N >::setIndexSet (const ParallelIndexSet &indexset) |
Set the index set of the selection. More... | |
typedef ArrayList<IndexPair,N>::const_iterator Dune::ParallelIndexSet< TG, TL, N >::const_iterator |
The constant iterator over the pairs.
typedef ParallelIndexSet::const_iterator Dune::GlobalLookupIndexSet< I >::const_iterator |
The iterator over the index pairs.
typedef TG Dune::IndexPair< TG, TL >::GlobalIndex |
the type of the global index.
This type has to provide at least a operator< for sorting.
typedef TG Dune::ParallelIndexSet< TG, TL, N >::GlobalIndex |
the type of the global index. This type has to provide at least a operator< for sorting.
typedef ParallelIndexSet::GlobalIndex Dune::GlobalLookupIndexSet< I >::GlobalIndex |
The type of the global index.
typedef Dune::IndexPair<GlobalIndex,LocalIndex> Dune::ParallelIndexSet< TG, TL, N >::IndexPair |
The type of the pair stored.
typedef Dune::IndexPair<typename I::GlobalIndex, typename I::LocalIndex> Dune::GlobalLookupIndexSet< I >::IndexPair |
typedef TL Dune::IndexPair< TG, TL >::LocalIndex |
the type of the local index.
This class to provide the following functions:
typedef TL Dune::ParallelIndexSet< TG, TL, N >::LocalIndex |
The type of the local index, e.g. ParallelLocalIndex.
This class to provide the following functions:
typedef ParallelIndexSet::LocalIndex Dune::GlobalLookupIndexSet< I >::LocalIndex |
The type of the local index.
typedef I Dune::GlobalLookupIndexSet< I >::ParallelIndexSet |
The type of the index set.
anonymous enum |
Enumerator | |
---|---|
arraySize | The size of the individual arrays in the underlying ArrayList. The default value is 100.
|
The states the index set can be in.
|
inline |
Add an new index to the set.
The local index is created by the default constructor.
global | The globally unique id of the index. |
InvalidState | If index set is not in ParallelIndexSetState::RESIZE mode. |
|
inline |
Add an new index to the set.
global | The globally unique id of the index. |
local | The local index. |
InvalidState | If index set is not in ParallelIndexSetState::RESIZE mode. |
|
inline |
Find the index pair with a specific global id.
This starts a binary search for the entry and therefore has complexity log(N).
global | The globally unique id of the pair. |
RangeError | Thrown if the global id is not known. |
|
inline |
Find the index pair with a specific global id.
This starts a binary search for the entry and therefore has complexity log(N).
global | The globally unique id of the pair. |
RangeError | Thrown if the global id is not known. |
|
inline |
Get the attribute of the index.
|
inline |
Get an iterator over the indices positioned at the first index.
SelectionIterator< TS, TG, TL, N > Dune::UncachedSelection< TS, TG, TL, N >::begin |
Get the index set we are a selection for.
Get an iterator over the selected indices.
uint32_t * Dune::Selection< TS, TG, TL, N >::begin |
Get the index set we are a selection for.
Get an iterator over the selected indices.
|
inline |
Get an iterator over the indices positioned at the first index.
|
inline |
Get an iterator over the indices positioned at the first index.
void Dune::ParallelIndexSet< TG, TL, N >::beginResize | ( | ) |
Indicate that the index set is to be resized.
InvalidState | If index set was not in ParallelIndexSetState::GROUND mode. |
|
inlinestatic |
|
inline |
Get an iterator over the indices positioned after the last index.
SelectionIterator< TS, TG, TL, N > Dune::UncachedSelection< TS, TG, TL, N >::end |
Get an iterator over the selected indices.
uint32_t * Dune::Selection< TS, TG, TL, N >::end |
Get an iterator over the selected indices.
|
inline |
Get an iterator over the indices positioned after the last index.
|
inline |
Get an iterator over the indices positioned after the last index.
void Dune::ParallelIndexSet< TG, TL, N >::endResize | ( | ) |
Indicate that the resizing finishes.
InvalidState | If index set was not in ParallelIndexSetState::RESIZE mode. |
|
inline |
Find the index pair with a specific global id.
This starts a binary search for the entry and therefore has complexity log(N).
global | The globally unique id of the pair. |
RangeError | Thrown if the global id is not known. |
|
inline |
Free allocated memory.
|
inline |
Get the global index.
Dune::GlobalLookupIndexSet< I >::GlobalLookupIndexSet | ( | const ParallelIndexSet & | indexset | ) |
Constructor.
indexset | The index set we want to be able to lookup the corresponding global index of a local index. |
Dune::GlobalLookupIndexSet< I >::GlobalLookupIndexSet | ( | const ParallelIndexSet & | indexset, |
std::size_t | size | ||
) |
Constructor.
indexset | The index set we want to be able to lookup the corresponding global index of a local index. |
size | The number of indices present, i.e. one more than the maximum local index. |
Dune::IndexPair< TG, TL >::IndexPair | ( | ) |
Construct a new Pair.
Dune::IndexPair< TG, TL >::IndexPair | ( | const GlobalIndex & | global | ) |
Constructs a new Pair.
The local index will be 0.
global | The global index. |
Dune::IndexPair< TG, TL >::IndexPair | ( | const GlobalIndex & | global, |
const LocalIndex & | local | ||
) |
Constructs a new Pair.
global | The global index. |
local | The local index. |
|
inline |
Check whether the index might also be known other processes.
|
inline |
|
inline |
Get the local index.
|
inline |
get the local index.
|
inline |
get the local index.
|
inline |
Get the local index.
|
inline |
Mark an index as deleted.
The index will be deleted during endResize().
position | An iterator at the position we want to delete. |
InvalidState | If index set is not in ParallelIndexSetState::RESIZE mode. |
|
inline |
Convert to the local index represented by an int.
|
inline |
Convert to the local index represented by an int.
|
inline |
|
inline |
bool Dune::operator!= | ( | const ParallelLocalIndex< T > & | p1, |
const ParallelLocalIndex< T > & | p2 | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
Print an index pair.
os | The outputstream to print to. |
pair | The index pair to print. |
|
inline |
Print an index set.
os | The outputstream to print to. |
indexSet | The index set to print. |
std::ostream& Dune::operator<< | ( | std::ostream & | os, |
const ParallelLocalIndex< T > & | index | ||
) |
Print the local index to a stream.
os | The output stream to print to. |
index | The index to print. |
|
inline |
|
inline |
|
inline |
Assign a new local index.
index | The new local index. |
|
inline |
Assign a new local index.
index | The new local index. |
|
inline |
|
inline |
bool Dune::operator== | ( | const ParallelLocalIndex< T > & | p1, |
const ParallelLocalIndex< T > & | p2 | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Find the index pair with a specific global id.
This starts a binary search for the entry and therefore has complexity log(N).
global | The globally unique id of the pair. |
|
inline |
Find the index pair with a specific global id.
This starts a binary search for the entry and therefore has complexity log(N).
global | The globally unique id of the pair. |
|
inline |
Find the index pair with a specific global id.
This starts a binary search for the entry and therefore has complexity log(N). This method is forwarded to the underlying index set.
global | The globally unique id of the pair. |
RangeError | Thrown if the global id is not known. |
|
inline |
Get the index pair corresponding to a local index.
Dune::ParallelIndexSet< TG, TL, N >::ParallelIndexSet | ( | ) |
Constructor.
Dune::ParallelLocalIndex< T >::ParallelLocalIndex |
Parameterless constructor.
Needed for use in container classes.
Dune::ParallelLocalIndex< T >::ParallelLocalIndex | ( | const Attribute & | attribute, |
bool | isPublic | ||
) |
Constructor.
The local index will be initialized to 0.
attribute | The attribute of the index. |
isPublic | True if the index might also be known to other processes. |
Dune::ParallelLocalIndex< T >::ParallelLocalIndex | ( | size_t | localIndex, |
const Attribute & | attribute, | ||
bool | isPublic = true |
||
) |
Constructor.
localIndex | The local index. |
attribute | The attribute of the index. |
isPublic | True if the index might also be known to other processes. |
|
inline |
Renumbers the local index numbers.
After this function returns the indices are consecutively numbered beginning from 0. Let $(g_i,l_i)$, $(g_j,l_j)$ be two arbitrary index pairs with $g_i<g_j$ then after renumbering $l_i<l_j$ will hold.
|
inline |
Get the internal sequence number.
Is initially 0 is incremented for each resize.
|
inline |
Get the internal sequence number.
Is initially 0 is incremented for each resize.
|
inline |
Set the attribute of the index.
attribute | The associated attribute. |
void Dune::UncachedSelection< TS, TG, TL, N >::setIndexSet | ( | const ParallelIndexSet & | indexset | ) |
Set the index set of the selection.
indexset | The index set to use. |
|
inline |
Set the index set of the selection.
indexset | The index set to use. |
|
inline |
Set the local index.
index | The index to set it to. |
|
inline |
Set the state.
state | The state to set. |
|
inline |
Set the state.
state | The state to set. |
|
inline |
Get the total number (public and nonpublic) indices.
|
inline |
Get the total number (public and nonpublic) indices.
|
inline |
Get the state the index set is in.
|
inline |
Get the state.
|
inline |
Get the state.
Dune::GlobalLookupIndexSet< I >::~GlobalLookupIndexSet | ( | ) |
Destructor.
|
inline |