Dune::RemoteIndexListModifier< T, mode > Class Template Reference
#include <remoteindices.hh>
Detailed Description
template<class T, bool mode>
class Dune::RemoteIndexListModifier< T, mode >
Modifier for adding and/or deleting remote indices from the remote index list.
In some cases all the information about the indices also present on remote process might already be known. In this case this information can be provided to the RemoteIndices via this modifier. This prevents the global communication needed by a call to RemoteIndices::rebuild.
In some cases it might advisable to run IndicesSyncer::sync afterwards.
- Warning:
- Use with care. If the indices are not consistant afterwards communication attempts might deadlock!
Public Types | |
enum | { MODIFYINDEXSET = mode } |
typedef T | ParallelIndexSet |
Type of the index set we use. | |
typedef ParallelIndexSet::GlobalIndex | GlobalIndex |
The type of the global index. | |
typedef ParallelIndexSet::LocalIndex | LocalIndex |
The type of the local index. | |
typedef LocalIndex::Attribute | Attribute |
The type of the attribute. | |
typedef RemoteIndex< GlobalIndex, Attribute > | RemoteIndex |
Type of the remote indices we manage. | |
typedef PoolAllocator< RemoteIndex, 1 > | Allocator |
The type of the allocator for the remote index list. | |
typedef SLList< RemoteIndex, Allocator > | RemoteIndexList |
The type of the remote index list. | |
typedef SLListModifyIterator< RemoteIndex, Allocator > | ModifyIterator |
The type of the modifying iterator of the remote index list. | |
typedef RemoteIndexList::const_iterator | ConstIterator |
The type of the remote index list iterator. | |
Public Member Functions | |
void | insert (const RemoteIndex &index) throw (InvalidPosition) |
Insert an index to the list. | |
void | insert (const RemoteIndex &index, const GlobalIndex &global) throw (InvalidPosition) |
Insert an index to the list. | |
bool | remove (const GlobalIndex &global) throw (InvalidPosition) |
Remove a remote index. | |
RemoteIndexListModifier (const ParallelIndexSet &indexSet, RemoteIndexList &rList) | |
Create a modifier for a remote index list. | |
void | repairLocalIndexPointers () throw (InvalidIndexSetState) |
Repair the pointers to the local index pairs. |
Member Enumeration Documentation
anonymous enum |
- Enumerator:
-
MODIFYINDEXSET If true the index set corresponding to the remote indices might get modified. If for example new indices are added to an index set all pointers of the remote indices to the local indices become invalid after ParallelIndexSet::endResize() was called.
Constructor & Destructor Documentation
Dune::RemoteIndexListModifier< T, mode >::RemoteIndexListModifier | ( | const ParallelIndexSet & | indexSet, | |
RemoteIndexList & | rList | |||
) |
Create a modifier for a remote index list.
- Parameters:
-
indexSet The set of indices the process knows. rList The list of remote indices to modify.
Member Function Documentation
void Dune::RemoteIndexListModifier< T, mode >::insert | ( | const RemoteIndex & | index | ) | throw (InvalidPosition) [inline] |
Insert an index to the list.
Moves to the position where the index fits and inserts it. After the insertion only indices with an bigger global index than the inserted can be inserted.
This method is only available if MODIFYINDEXSET is false.
- Parameters:
-
index The index to insert.
- Exceptions:
-
InvalidPosition Thrown if the index at the current position or the one before has bigger global index than the one to be inserted.
void Dune::RemoteIndexListModifier< T, mode >::insert | ( | const RemoteIndex & | index, | |
const GlobalIndex & | global | |||
) | throw (InvalidPosition) [inline] |
Insert an index to the list.
Moves to the position where the index fits and inserts it. After the insertion only indices with an bigger global index than the inserted can be inserted.
This method is only available if MODIFYINDEXSET is true.
- Parameters:
-
index The index to insert. global The global index of the remote index.
- Exceptions:
-
InvalidPosition Thrown if the index at the current position or the one before has bigger global index than the one to be inserted.
bool Dune::RemoteIndexListModifier< T, mode >::remove | ( | const GlobalIndex & | global | ) | throw (InvalidPosition) |
Remove a remote index.
- Parameters:
-
global The global index corresponding to the remote index.
- Returns:
- True If there was a corresponding remote index.
- Exceptions:
-
InvalidPostion If there was an insertion or deletion of a remote index corresponding to a bigger global index before.
void Dune::RemoteIndexListModifier< T, mode >::repairLocalIndexPointers | ( | ) | throw (InvalidIndexSetState) [inline] |
Repair the pointers to the local index pairs.
Due to adding new indices or/and deleting indices in the index set all pointers to the local index pair might become invalid during ParallelIndexSet::endResize(). This method repairs them.
- Exceptions:
-
InvalidIndexSetState Thrown if the underlying index set is not in ParallelIndexSetState::GROUND mode (only when compiled with DUNE_ISTL_WITH_CHECKING!).
The documentation for this class was generated from the following file: