3#ifndef DUNE_AMG_RENUMBERER_HH
4#define DUNE_AMG_RENUMBERER_HH
13 class AggregateRenumberer
17 typedef typename G::VertexDescriptor Vertex;
23 AggregateRenumberer(AggregatesMap<Vertex>& aggregates);
26 operator Vertex()
const;
28 void operator()(
const typename G::ConstEdgeIterator& edge);
34 AggregatesMap<Vertex>& aggregates_;
38 AggregateRenumberer<G>::AggregateRenumberer(AggregatesMap<Vertex>& aggregates)
39 : number_(0), aggregates_(aggregates)
43 AggregateRenumberer<G>::operator Vertex()
const
49 void AggregateRenumberer<G>::operator()(
const typename G::ConstEdgeIterator& edge)
51 aggregates_[edge.target()]=number_;
55 void AggregateRenumberer<G>::operator++()
60 template<
class G,
class I,
class V>
61 void renumberAggregates(
const G& graph, I index, I endIndex, V& visitedMap,
62 AggregatesMap<typename G::VertexDescriptor>& aggregates)
64 AggregateRenumberer<G> renumberer(aggregates);
66 for(I index1=index; index1 != endIndex; ++index1)
67 if(aggregates[index1.index()]!=AggregatesMap<typename G::VertexDescriptor>::ISOLATED &&
68 !get(visitedMap, index1.index())) {
70 aggregates.template breadthFirstSearch<false>(index1.index(), aggregates[index1.index()],
71 graph, renumberer, visitedMap);
72 aggregates[index1.index()] = renumberer;
75 for(; index != endIndex; ++index)
76 put(visitedMap, index.index(),
false);
Provides classes for the Coloring process of AMG.
Dune namespace.
Definition: alignedallocator.hh:14