3#ifndef DUNE_GLOBALAGGREGATES_HH
4#define DUNE_GLOBALAGGREGATES_HH
18#include <dune/common/parallel/indexset.hh>
19#include <dune/common/unused.hh>
26 template<
typename T,
typename TI>
36 typedef typename ParallelIndexSet::LocalIndex
LocalIndex;
42 : aggregates_(aggregates), indexset_(
indexset)
47 const Vertex& aggregate = aggregates_[index];
50 return isolatedMarker;
54 return pair->global();
61 const Vertex& aggregate = aggregates_[index];
72 : indexset_(&
indexset), aggregate_(&aggregate)
81 *aggregate_ = indexset_->operator[](
global).
local();
92 return Proxy(indexset_, aggregates_[index]);
97 aggregates_[i]=indexset_[
global].local();
107 template<
typename T,
typename TI>
108 const typename TI::GlobalIndex GlobalAggregatesMap<T,TI>::isolatedMarker =
109 std::numeric_limits<typename TI::GlobalIndex>::max();
111 template<
typename T,
typename TI>
128 template<
typename T,
typename O,
typename I>
140 template<
class T1,
class T2>
157 template<
typename T,
typename O,
typename T1,
typename T2>
164 typedef typename ParallelInformation::ParallelIndexSet
IndexSet;
175 if (pinfo.getSolverCategory() ==
179 typedef typename ParallelInformation::RemoteIndices::const_iterator
Lists;
180 Lists lists = pinfo.remoteIndices().find(pinfo.communicator().rank());
181 if(
lists!=pinfo.remoteIndices().end()) {
188 for(Iter i=aggregates.begin(), end=aggregates.end(); i!=end; ++i)
195 typedef typename ParallelInformation::RemoteIndices::RemoteIndexList
196 ::const_iterator
RIter;
197 for(
RIter ri=
lists->second.first->begin(), rend =
lists->second.first->end();
199 if(O::contains(ri->localIndexPair().local().attribute()))
200 newMapping.insert(std::make_pair(aggregates[ri->localIndexPair().local()],
203 typedef typename std::map<Vertex,Vertex>::iterator
MIter;
209 for(
RIter ri=
lists->second.first->begin(), rend =
lists->second.first->end();
211 if(O::contains(ri->localIndexPair().local().attribute()))
212 aggregates[ri->localIndexPair().local()] =
213 newMapping[aggregates[ri->localIndexPair().local()]];
219 template<
typename T,
typename O>
240 template<
typename T,
typename TI>
Provides classes for the Coloring process of AMG.
ParallelInformation::GlobalLookupIndexSet GlobalLookupIndexSet
Definition globalaggregates.hh:163
const GlobalIndex & operator[](std::size_t index) const
Definition globalaggregates.hh:45
O OverlapFlags
Definition globalaggregates.hh:161
static int getSize(const Type &, int)
Definition globalaggregates.hh:246
Amg::GlobalAggregatesMap< T, TI >::IndexedType IndexedType
Definition globalaggregates.hh:244
GlobalIndex & get(std::size_t index)
Definition globalaggregates.hh:59
T Vertex
Definition globalaggregates.hh:160
static void publish(AggregatesMap< Vertex > &aggregates, ParallelInformation &pinfo, const GlobalLookupIndexSet &globalLookup)
Definition globalaggregates.hh:226
SequentialInformation ParallelInformation
Definition globalaggregates.hh:223
ParallelIndexSet::GlobalIndex GlobalIndex
Definition globalaggregates.hh:32
ParallelInformation::ParallelIndexSet IndexSet
Definition globalaggregates.hh:164
void put(const GlobalIndex &global, size_t i)
Definition globalaggregates.hh:95
T Vertex
Definition globalaggregates.hh:38
GlobalAggregatesMap(AggregatesMap< Vertex > &aggregates, const GlobalLookupIndexSet< ParallelIndexSet > &indexset)
Definition globalaggregates.hh:40
TI ParallelIndexSet
Definition globalaggregates.hh:30
Amg::AggregatesMap< T > Type
Definition globalaggregates.hh:243
static void scatter(GlobalAggregatesMap< T, TI > &ga, GlobalIndex global, size_t i)
Definition globalaggregates.hh:122
OwnerOverlapCopyCommunication< T1, T2 > ParallelInformation
Definition globalaggregates.hh:162
SizeOne IndexedTypeFlag
Definition globalaggregates.hh:245
Proxy(const GlobalLookupIndexSet< ParallelIndexSet > &indexset, Vertex &aggregate)
Definition globalaggregates.hh:71
static void publish(AggregatesMap< Vertex > &aggregates, ParallelInformation &pinfo, const GlobalLookupIndexSet &globalLookup)
Definition globalaggregates.hh:166
ParallelIndexSet::GlobalIndex GlobalIndex
Definition globalaggregates.hh:115
const AggregateDescriptor * const_iterator
Definition aggregates.hh:710
ParallelIndexSet::LocalIndex LocalIndex
Definition globalaggregates.hh:36
TI ParallelIndexSet
Definition globalaggregates.hh:114
T Vertex
Definition globalaggregates.hh:222
ParallelInformation::GlobalLookupIndexSet GlobalLookupIndexSet
Definition globalaggregates.hh:224
static const GlobalIndex & gather(const GlobalAggregatesMap< T, TI > &ga, size_t i)
Definition globalaggregates.hh:117
Proxy & operator=(const GlobalIndex &global)
Definition globalaggregates.hh:75
ParallelIndexSet::GlobalIndex IndexedType
Definition globalaggregates.hh:34
Proxy operator[](std::size_t index)
Definition globalaggregates.hh:90
Definition basearray.hh:19
Statistics about compression achieved in implicit mode.
Definition bcrsmatrix.hh:81
A class setting up standard communication for a two-valued attribute set with owner/overlap/copy sema...
Definition owneroverlapcopy.hh:173
Class providing information about the mapping of the vertices onto aggregates.
Definition aggregates.hh:543
Definition globalaggregates.hh:28
Definition globalaggregates.hh:69
Definition globalaggregates.hh:113
Definition globalaggregates.hh:130
@ nonoverlapping
Category for non-overlapping solvers.
Definition solvercategory.hh:23