|
dune-istl 2.8.0
|
Loading...
Searching...
No Matches
aggregates.hh
Go to the documentation of this file.
206 maxValue_ = min(- std::numeric_limits<real_type>::max(), std::numeric_limits<real_type>::min());
228 inline void SymmetricMatrixDependency<M,N>::examine(G&, const typename G::EdgeIterator& edge, const ColIter&)
465 };
482 };
498 };
1070 AggregateVisitor(const AggregatesMap<Vertex>& aggregates, const AggregateDescriptor& aggregate,
1339 int aggregateNeighbours(const Vertex& vertex, const AggregateDescriptor& aggregate, const AggregatesMap<Vertex>& aggregates) const;
1348 bool admissible(const Vertex& vertex, const AggregateDescriptor& aggregate, const AggregatesMap<Vertex>& aggregates) const;
1391 void growIsolatedAggregate(const Vertex& vertex, const AggregatesMap<Vertex>& aggregates, const C& c);
1409 inline void SymmetricDependency<M,N>::initRow(const Row& row, int index, const std::false_type&)
1415 inline void SymmetricDependency<M,N>::initRow([[maybe_unused]] const Row& row, int index, const std::true_type&)
1418 maxValue_ = min(- std::numeric_limits<typename Matrix::field_type>::max(), std::numeric_limits<typename Matrix::field_type>::min());
1446 inline void SymmetricDependency<M,N>::examine(G& graph, const typename G::EdgeIterator& edge, const ColIter& col)
1487 maxValue_ = min(- std::numeric_limits<real_type>::max(), std::numeric_limits<real_type>::min());
1501 inline void Dependency<M,N>::examine(G& graph, const typename G::EdgeIterator& edge, const ColIter& col)
1739 return breadthFirstSearch<true,reset>(start, aggregate, graph, vlist, aggregateVisitor, dummy, visitedMap);
1880 inline Aggregator<G>::AggregateVisitor<V>::AggregateVisitor(const AggregatesMap<Vertex>& aggregates,
1887 inline void Aggregator<G>::AggregateVisitor<V>::operator()(const typename MatrixGraph::ConstEdgeIterator& edge)
1929 inline void Aggregator<G>::TwoWayCounter::operator()(const typename MatrixGraph::ConstEdgeIterator& edge)
1936 int Aggregator<G>::twoWayConnections(const Vertex& vertex, const AggregateDescriptor& aggregate,
1945 int Aggregator<G>::oneWayConnections(const Vertex& vertex, const AggregateDescriptor& aggregate,
1954 inline void Aggregator<G>::OneWayCounter::operator()(const typename MatrixGraph::ConstEdgeIterator& edge)
1968 inline void Aggregator<G>::ConnectivityCounter::operator()(const typename MatrixGraph::ConstEdgeIterator& edge)
1970 if(connected_.find(aggregates_[edge.target()]) == connected_.end() || aggregates_[edge.target()]==AggregatesMap<Vertex>::UNAGGREGATED)
1980 inline double Aggregator<G>::connectivity(const Vertex& vertex, const AggregatesMap<Vertex>& aggregates) const
1993 inline void Aggregator<G>::DependencyCounter::operator()(const typename MatrixGraph::ConstEdgeIterator& edge)
2002 int Aggregator<G>::unusedNeighbours(const Vertex& vertex, const AggregatesMap<Vertex>& aggregates) const
2015 CombinedFunctor<CounterTuple> visitors(CounterTuple(CounterT(aggregates, AggregatesMap<Vertex>::UNAGGREGATED, unused), CounterT(aggregates, aggregate, aggregated)));
2022 int Aggregator<G>::aggregateNeighbours(const Vertex& vertex, const AggregateDescriptor& aggregate, const AggregatesMap<Vertex>& aggregates) const
2030 std::size_t Aggregator<G>::distance(const Vertex& vertex, const AggregatesMap<Vertex>& aggregates)
2033 typename PropertyMapTypeSelector<VertexVisitedTag,G>::Type visitedMap = get(VertexVisitedTag(), *graph_);
2047 inline void Aggregator<G>::FrontMarker::operator()(const typename MatrixGraph::ConstEdgeIterator& edge)
2058 inline bool Aggregator<G>::admissible(const Vertex& vertex, const AggregateDescriptor& aggregate, const AggregatesMap<Vertex>& aggregates) const
2161 if(aggregates[edge.target()]!=AggregatesMap<Vertex>::UNAGGREGATED && graph_->getVertexProperties(edge.target()).isolated())
2167 inline typename G::VertexDescriptor Aggregator<G>::mergeNeighbour(const Vertex& vertex, const AggregatesMap<Vertex>& aggregates) const
2174 graph_->getVertexProperties(edge.target()).isolated() == graph_->getVertexProperties(edge.source()).isolated()) {
2190 void Aggregator<G>::FrontNeighbourCounter::operator()(const typename MatrixGraph::ConstEdgeIterator& edge)
2229 void Aggregator<G>::growIsolatedAggregate(const Vertex& seed, const AggregatesMap<Vertex>& aggregates, const C& c)
2234 while(aggregate_->size()< c.minAggregateSize() && aggregate_->connectSize() < c.maxConnectivity()) {
2279 void Aggregator<G>::growAggregate(const Vertex& seed, const AggregatesMap<Vertex>& aggregates, const C& c)
2388 std::tuple<int,int,int,int> AggregatesMap<V>::buildAggregates(const M& matrix, G& graph, const C& criterion,
2397 std::tuple<int,int,int,int> Aggregator<G>::build(const M& m, G& graph, AggregatesMap<Vertex>& aggregates, const C& c,
2456 while(!(graph.getVertexProperties(seed).isolated()) && aggregate_->size() < c.maxAggregateSize()) {
2476 //if(aggregateNeighbours(*vertex, aggregate_->id(), aggregates) <= unusedNeighbours(*vertex, aggregates))
2548 : graph_(graph), aggregatesBuilder_(aggregatesBuilder), aggregates_(aggregates), begin_(graph.begin()), end_(graph.end())
Provides classes for building the matrix graph.
Parameter classes for customizing AMG.
Provides classes for handling internal properties in a graph.
Matrix::ConstColIterator ColIter
Constant column iterator of the matrix.
Definition aggregates.hh:271
std::vector< real_type >::iterator valIter_
Definition aggregates.hh:187
Matrix::ConstColIterator ColIter
Constant column iterator of the matrix.
Definition aggregates.hh:152
std::size_t breadthFirstSearch(const VertexDescriptor &start, const AggregateDescriptor &aggregate, const G &graph, L &visited, F1 &aggregateVisitor, F2 &nonAggregateVisitor, VM &visitedMap) const
Breadth first search within an aggregate.
PoolAllocator< VertexDescriptor, 100 > Allocator
The allocator we use for our lists and the set.
Definition aggregates.hh:584
Norm norm_
The functor for calculating the norm.
Definition aggregates.hh:300
MatrixGraph::VertexDescriptor Vertex
The vertex identifier.
Definition aggregates.hh:918
AggregationCriterion()
Constructor.
Definition aggregates.hh:64
const Matrix * matrix_
The matrix we work on.
Definition aggregates.hh:355
auto operator()(const M &m, typename std::enable_if_t< Dune::IsNumber< M >::value > *sfinae=nullptr) const
Compute the norm of a scalar.
Definition aggregates.hh:404
void initRow(const Row &row, int index)
SymmetricMatrixDependency(const Parameters &parms)
Definition aggregates.hh:166
M Matrix
The matrix type we build the dependency of.
Definition aggregates.hh:256
G MatrixGraph
The matrix graph type used.
Definition aggregates.hh:913
Norm norm_
The functor for calculating the norm.
Definition aggregates.hh:361
void operator()(const EdgeIterator &edge) const
Definition aggregates.hh:599
void examine(const ColIter &col)
M Matrix
The matrix type we build the dependency of.
Definition aggregates.hh:317
real_type diagonal_
The norm of the current diagonal.
Definition aggregates.hh:185
N Norm
The norm to use for examining the matrix entries.
Definition aggregates.hh:261
UnSymmetricCriterion(const Parameters &parms)
Definition aggregates.hh:539
void operator()(const typename MatrixGraph::ConstEdgeIterator &edge)
void initRow(const Row &row, int index)
Definition aggregates.hh:199
bool isIsolated()
void examine(const ColIter &col)
Definition aggregates.hh:212
int row_
index of the currently evaluated row.
Definition aggregates.hh:183
void operator()(const typename MatrixGraph::ConstEdgeIterator &edge)
std::tuple< int, int, int, int > build(const M &m, G &graph, AggregatesMap< Vertex > &aggregates, const C &c, bool finestLevel)
Build the aggregates.
FrontNeighbourCounter(const MatrixGraph &front)
Constructor.
Matrix::row_type Row
Constant Row iterator of the matrix.
Definition aggregates.hh:327
const Matrix * matrix_
The matrix we work on.
Definition aggregates.hh:294
const AggregateDescriptor & operator[](const VertexDescriptor &v) const
Get the aggregate a vertex belongs to.
void examine(G &graph, const typename G::EdgeIterator &edge, const ColIter &col)
AggregateVisitor(const AggregatesMap< Vertex > &aggregates, const AggregateDescriptor &aggregate, Visitor &visitor)
Constructor.
Matrix::ConstColIterator ColIter
Constant column iterator of the matrix.
Definition aggregates.hh:332
Matrix::field_type field_type
The current max value.
Definition aggregates.hh:177
Aggregate(MatrixGraph &graph, AggregatesMap< Vertex > &aggregates, VertexSet &connectivity, std::vector< Vertex > &front_)
Constructor.
V Visitor
The type of the adapted visitor.
Definition aggregates.hh:1062
std::size_t * SphereMap
Type of the mapping of aggregate members onto distance spheres.
Definition aggregates.hh:807
AggregationCriterion(const Parameters &parms)
Definition aggregates.hh:68
Matrix::row_type Row
Constant Row iterator of the matrix.
Definition aggregates.hh:266
VertexSet::size_type connectSize()
Get tne number of connections to other aggregates.
std::vector< real_type > vals_
Definition aggregates.hh:186
N Norm
The norm to use for examining the matrix entries.
Definition aggregates.hh:322
void printAggregates2d(const AggregatesMap< V > &aggregates, int n, int m, std::ostream &os)
Definition aggregates.hh:2581
Norm norm_
The functor for calculating the norm.
Definition aggregates.hh:181
void operator()(const typename MatrixGraph::ConstEdgeIterator &edge)
VertexSet::const_iterator const_iterator
Const iterator over a vertex list.
Definition aggregates.hh:802
SymmetricCriterion(const Parameters &parms)
Definition aggregates.hh:519
MatrixGraph::VertexDescriptor AggregateDescriptor
The type of the aggregate descriptor.
Definition aggregates.hh:921
void init(const Matrix *matrix)
Definition aggregates.hh:193
real_type diagonal_
The norm of the current diagonal.
Definition aggregates.hh:365
SymmetricDependency(const Parameters &parms)
Definition aggregates.hh:346
FieldTraits< field_type >::real_type real_type
Definition aggregates.hh:358
void examine(G &graph, const typename G::EdgeIterator &edge, const ColIter &col)
T DependencyPolicy
The policy for calculating the dependency graph.
Definition aggregates.hh:53
void add(std::vector< Vertex > &vertex)
void examine(const ColIter &col)
void operator()(const typename MatrixGraph::ConstEdgeIterator &edge)
Examine an edge.
FrontMarker(std::vector< Vertex > &front, MatrixGraph &graph)
Constructor.
FieldTraits< typenameM::field_type >::real_type operator()(const M &m) const
compute the norm of a matrix.
Definition aggregates.hh:504
void init(const Matrix *matrix)
int visitNeighbours(const G &graph, const typename G::VertexDescriptor &vertex, V &visitor)
Visit all neighbour vertices of a vertex in a graph.
void setDefaultValuesIsotropic(std::size_t dim, std::size_t diameter=2)
Sets reasonable default values for an isotropic problem.
Definition aggregates.hh:80
V AggregateDescriptor
The aggregate descriptor type.
Definition aggregates.hh:578
static const V ISOLATED
Identifier of isolated vertices.
Definition aggregates.hh:569
int row_
index of the currently evaluated row.
Definition aggregates.hh:363
SymmetricMatrixDependency()
Definition aggregates.hh:169
Vertex pop()
real_type diagonal_
The norm of the current diagonal.
Definition aggregates.hh:304
void setDefaultValuesAnisotropic(std::size_t dim, std::size_t diameter=2)
Sets reasonable default values for an aisotropic problem.
Definition aggregates.hh:103
AggregatesMap(std::size_t noVertices)
Constructs with allocating memory.
Matrix::field_type field_type
The current max value.
Definition aggregates.hh:357
AggregateDescriptor & operator[](const VertexDescriptor &v)
Get the aggregate a vertex belongs to.
SLList< VertexDescriptor, Allocator > VertexList
The type of a single linked list of vertex descriptors.
Definition aggregates.hh:590
ConnectivityCounter(const VertexSet &connected, const AggregatesMap< Vertex > &aggregates)
Constructor.
const_iterator end() const
get an iterator over the vertices of the aggregate.
void init(const Matrix *matrix)
UnSymmetricCriterion()
Definition aggregates.hh:542
void operator()(const typename MatrixGraph::ConstEdgeIterator &edge)
const AggregateDescriptor * const_iterator
Definition aggregates.hh:721
int row_
index of the currently evaluated row.
Definition aggregates.hh:302
Stack(const MatrixGraph &graph, const Aggregator< G > &aggregatesBuilder, const AggregatesMap< Vertex > &aggregates)
FieldTraits< field_type >::real_type real_type
Definition aggregates.hh:178
void initRow(const Row &row, int index)
M Matrix
The matrix type we build the dependency of.
Definition aggregates.hh:137
FieldTraits< field_type >::real_type real_type
Definition aggregates.hh:297
const Matrix * matrix_
The matrix we work on.
Definition aggregates.hh:175
S VertexSet
The type of a single linked list of vertex descriptors.
Definition aggregates.hh:799
FieldTraits< typenameM::field_type >::real_type operator()(const M &m) const
compute the norm of a matrix.
Definition aggregates.hh:488
static const V UNAGGREGATED
Identifier of not yet aggregated vertices.
Definition aggregates.hh:564
std::size_t breadthFirstSearch(const VertexDescriptor &start, const AggregateDescriptor &aggregate, const G &graph, F &aggregateVisitor, VM &visitedMap) const
Breadth first search within an aggregate.
Matrix::field_type field_type
The current max value.
Definition aggregates.hh:296
void operator()(const typename MatrixGraph::ConstEdgeIterator &edge)
std::ostream & operator<<(std::ostream &os, const AggregationCriterion< T > &criterion)
Definition aggregates.hh:111
void allocate(std::size_t noVertices)
Allocate memory for holding the information.
N Norm
The norm to use for examining the matrix entries.
Definition aggregates.hh:142
FieldTraits< typenameM::field_type >::real_type operator()(const M &m) const
compute the norm of a matrix.
Definition aggregates.hh:471
void reconstruct(const Vertex &vertex)
Reconstruct the aggregat from an seed node.
const_iterator begin() const
get an iterator over the vertices of the aggregate.
FieldTraits< typenameM::field_type >::real_type operator()(const M &m, typename std::enable_if_t<!Dune::IsNumber< M >::value > *sfinae=nullptr) const
compute the norm of a matrix.
Definition aggregates.hh:388
MatrixGraph::VertexDescriptor Vertex
The vertex descriptor type.
Definition aggregates.hh:787
bool isIsolated()
SymmetricDependency()
Definition aggregates.hh:349
void buildDependency(G &graph, const typename C::Matrix &matrix, C criterion, bool finestLevel)
Build the dependency of the matrix graph.
V VertexDescriptor
The vertex descriptor type.
Definition aggregates.hh:573
std::tuple< int, int, int, int > buildAggregates(const M &matrix, G &graph, const C &criterion, bool finestLevel)
Build the aggregates.
Matrix::row_type Row
Constant Row iterator of the matrix.
Definition aggregates.hh:147
PoolAllocator< Vertex, 100 > Allocator
The allocator we use for our lists and the set.
Definition aggregates.hh:793
void operator()(const typename MatrixGraph::ConstEdgeIterator &edge)
int size() const
iterator end()
SLListConstIterator< T, A > const_iterator
void remove()
iterator begin()
void * allocate()
size_type dim() const
static constexpr size_type M()
static constexpr size_type N()
std::ptrdiff_t index() const
#define DUNE_THROW(E, m)
void add(const GlobalIndex &global)
iterator(ParallelIndexSet< TG, TL, N > &indexSet, const Father &father)
DVVerbType dvverb
DVerbType dverb
DInfoType dinfo
void put(const RAPropertyMapHelper< Reference, PropertyMap > &pmap, const Key &key, const Value &value)
Reference get(const RAPropertyMapHelper< Reference, PropertyMap > &pmap, const Key &key)
T real_type
typename Imp::BlockTraits< T >::field_type field_type
Export the type representing the underlying field.
Definition matrix.hh:563
row_type::const_iterator ConstColIterator
Const iterator for the entries of each row.
Definition matrix.hh:587
MatrixImp::DenseMatrixBase< T, A >::window_type row_type
The type implementing a matrix row.
Definition matrix.hh:572
Dependency policy for symmetric matrices.
Definition aggregates.hh:132
Norm that uses only the [N][N] entry of the block to determine couplings.
Definition aggregates.hh:377
Norm that uses only the [0][0] entry of the block to determine couplings.
Definition aggregates.hh:453
Functor using the row sum (infinity) norm to determine strong couplings.
Definition aggregates.hh:461
Definition aggregates.hh:478
Definition aggregates.hh:494
Criterion taking advantage of symmetric matrices.
Definition aggregates.hh:517
Criterion suitable for unsymmetric matrices.
Definition aggregates.hh:537
Class providing information about the mapping of the vertices onto aggregates.
Definition aggregates.hh:558
A Dummy visitor that does nothing for each visited edge.
Definition aggregates.hh:596
A class for temporarily storing the vertices of an aggregate in.
Definition aggregates.hh:776
M::size_type VertexDescriptor
The vertex descriptor.
Definition graph.hh:71
EdgeIteratorT< const MatrixGraph< Matrix > > ConstEdgeIterator
The constant edge iterator type.
Definition graph.hh:296
Iterator over all edges starting from a vertex.
Definition graph.hh:93
The vertex iterator type of the graph.
Definition graph.hh:207
T assign(T... args)
T back_inserter(T... args)
T begin(T... args)
T beta(T... args)
T capacity(T... args)
T clear(T... args)
T end(T... args)
T endl(T... args)
T erase(T... args)
T find(T... args)
T flags(T... args)
T imag(T... args)
T insert(T... args)
T lower_bound(T... args)
T make_pair(T... args)
T make_tuple(T... args)
T max(T... args)
T min(T... args)
T push_back(T... args)
T real(T... args)
T reserve(T... args)
T resize(T... args)
T set_difference(T... args)
T setf(T... args)
T size(T... args)
T sort(T... args)
T width(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8