Loading...
Searching...
No Matches
Parallel Algebraic Multigrid

A Parallel Algebraic Multigrid based on Agglomeration. More...

## Classes

class | Dune::Amg::KAMG< M, X, S, P, K, A >
class | Dune::Amg::KAmgTwoGrid< T >
class | Dune::Amg::AMGCPR< M, X, S, PI, A >
| Parallel algebraic multigrid based on agglomeration. More...

## Files

file | amgcpr.hh
| The AMG preconditioner.
file | twolevelmethodcpr.hh
| Algebraic twolevel methods.

## Typedefs

typedef M | Dune::Amg::AMGCPR< M, X, S, PI, A >::Operator
| The matrix operator type.
typedef PI | Dune::Amg::AMGCPR< M, X, S, PI, A >::ParallelInformation
| The type of the parallel information.
typedef MatrixHierarchy< M, ParallelInformation, A > | Dune::Amg::AMGCPR< M, X, S, PI, A >::OperatorHierarchy
| The operator hierarchy type.
typedef OperatorHierarchy::ParallelInformationHierarchy | Dune::Amg::AMGCPR< M, X, S, PI, A >::ParallelInformationHierarchy
| The parallal data distribution hierarchy type.
typedef X | Dune::Amg::AMGCPR< M, X, S, PI, A >::Domain
| The domain type.
typedef X | Dune::Amg::AMGCPR< M, X, S, PI, A >::Range
| The range type.
typedef InverseOperator< X, X > | Dune::Amg::AMGCPR< M, X, S, PI, A >::CoarseSolver
| the type of the coarse solver.
typedef S | Dune::Amg::AMGCPR< M, X, S, PI, A >::Smoother
| The type of the smoother.
typedef SmootherTraits< Smoother >::Arguments | Dune::Amg::AMGCPR< M, X, S, PI, A >::SmootherArgs
| The argument type for the construction of the smoother.
typedef Smoother | Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::SmootherType

## Functions

| Dune::Amg::AMGCPR< M, X, S, PI, A >::AMGCPR (const OperatorHierarchy &matrices, CoarseSolver &coarseSolver, const SmootherArgs &smootherArgs, const Parameters &parms)
| Construct a new amg with a specific coarse solver.
template<class C>
| Dune::Amg::AMGCPR< M, X, S, PI, A >::AMGCPR (const Operator &fineOperator, const C &criterion, const SmootherArgs &smootherArgs=SmootherArgs(), const ParallelInformation &pinfo=ParallelInformation())
| Construct an AMG with an inexact coarse solver based on the smoother.
| Dune::Amg::AMGCPR< M, X, S, PI, A >::AMGCPR (const AMGCPR &amg)
| Copy constructor.
void | Dune::Amg::AMGCPR< M, X, S, PI, A >::pre (Domain &x, Range &b) override
void | Dune::Amg::AMGCPR< M, X, S, PI, A >::apply (Domain &v, const Range &d) override
SolverCategory::Category | Dune::Amg::AMGCPR< M, X, S, PI, A >::category () const override
| Category of the preconditioner (see SolverCategory::Category).
bool | Dune::Amg::AMGCPR< M, X, S, PI, A >::hasPerfectUpdate () const override
void | Dune::Amg::AMGCPR< M, X, S, PI, A >::post (Domain &x) override
template<class A1>
void | Dune::Amg::AMGCPR< M, X, S, PI, A >::getCoarsestAggregateNumbers (std::vector< std::size_t, A1 > &cont)
| Get the aggregate number of each unknown on the coarsest level.
std::size_t | Dune::Amg::AMGCPR< M, X, S, PI, A >::levels ()
std::size_t | Dune::Amg::AMGCPR< M, X, S, PI, A >::maxlevels ()
void | Dune::Amg::AMGCPR< M, X, S, PI, A >::recalculateHierarchy ()
| Recalculate the matrix hierarchy.
template<class C>
void | Dune::Amg::AMGCPR< M, X, S, PI, A >::updateSolver (C &criterion, const Operator &, const PI &pinfo)
| Update the coarse solver and the hierarchies.
void | Dune::Amg::AMGCPR< M, X, S, PI, A >::update () override
| Update the coarse solver and the hierarchies.
bool | Dune::Amg::AMGCPR< M, X, S, PI, A >::usesDirectCoarseLevelSolver () const
| Check whether the coarse solver used is a direct solver.

## Variables

Hierarchy< Smoother, A >::Iterator | Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::smoother
| The iterator over the smoothers.
OperatorHierarchy::ParallelMatrixHierarchy::ConstIterator | Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::matrix
| The iterator over the matrices.
ParallelInformationHierarchy::Iterator | Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::pinfo
| The iterator over the parallel information.
OperatorHierarchy::RedistributeInfoList::const_iterator | Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::redist
| The iterator over the redistribution information.
OperatorHierarchy::AggregatesMapList::const_iterator | Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::aggregates
| The iterator over the aggregates maps.
Hierarchy< Domain, A >::Iterator | Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::lhs
| The iterator over the left hand side.
Hierarchy< Domain, A >::Iterator | Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::update
| The iterator over the updates.
Hierarchy< Range, A >::Iterator | Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::rhs
| The iterator over the right hand sided.
std::size_t | Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::level
| The level index.

## Friends

template<class M1, class X1, class S1, class P1, class K1, class A1>
class | Dune::Amg::AMGCPR< M, X, S, PI, A >::KAMG
class | Dune::Amg::AMGCPR< M, X, S, PI, A >::KAmgTwoGrid< AMGCPR >

## Detailed Description

A Parallel Algebraic Multigrid based on Agglomeration.

## Typedef Documentation

## ParallelInformation

template<class M, class X, class S, class PI = SequentialInformation, class A = std::allocator<X>>

typedef PI Dune::Amg::AMGCPR< M, X, S, PI, A >::ParallelInformation

The type of the parallel information.

Either OwnerOverlapCommunication or another type describing the parallel data distribution and providing communication methods.

## Smoother

template<class M, class X, class S, class PI = SequentialInformation, class A = std::allocator<X>>

typedef S Dune::Amg::AMGCPR< M, X, S, PI, A >::Smoother

The type of the smoother.

One of the preconditioners implementing the Preconditioner interface. Note that the smoother has to fit the ParallelInformation.

## Function Documentation

## AMGCPR() [1/2]

template<class M, class X, class S, class PI, class A>
template<class C>

Dune::Amg::AMGCPR< M, X, S, PI, A >::AMGCPR | ( | const Operator & | fineOperator,
|  | const C & | criterion,
|  | const SmootherArgs & | smootherArgs = SmootherArgs(),
|  | const ParallelInformation & | pinfo = ParallelInformation() )

Construct an AMG with an inexact coarse solver based on the smoother.

As coarse solver a preconditioned CG method with the smoother as preconditioner will be used. The matrix hierarchy is built automatically.

Parameters

  fineOperator | The operator on the fine level.
  criterion | The criterion describing the coarsening strategy. E. g. SymmetricCriterion or UnsymmetricCriterion, and providing the parameters.
  smootherArgs | The arguments for constructing the smoothers.
  pinfo | The information about the parallel distribution of the data.

## AMGCPR() [2/2]

template<class M, class X, class S, class PI, class A>

Dune::Amg::AMGCPR< M, X, S, PI, A >::AMGCPR | ( | const OperatorHierarchy & | matrices,
|  | CoarseSolver & | coarseSolver,
|  | const SmootherArgs & | smootherArgs,
|  | const Parameters & | parms )

Construct a new amg with a specific coarse solver.

Parameters

  matrices | The already set up matix hierarchy.
  coarseSolver | The set up solver to use on the coarse grid, must match the coarse matrix in the matrix hierarchy.
  smootherArgs | The arguments needed for thesmoother to use for pre and post smoothing.
  parms | The parameters for the AMG.

## apply()

template<class M, class X, class S, class PI, class A>

void Dune::Amg::AMGCPR< M, X, S, PI, A >::apply | ( | Domain & | v,
|  | const Range & | d )

override

## getCoarsestAggregateNumbers()

template<class M, class X, class S, class PI, class A>
template<class A1>

void Dune::Amg::AMGCPR< M, X, S, PI, A >::getCoarsestAggregateNumbers | ( | std::vector< std::size_t, A1 > & | cont | ) |

Get the aggregate number of each unknown on the coarsest level.

Parameters

  cont | The random access container to store the numbers in.

## hasPerfectUpdate()

template<class M, class X, class S, class PI = SequentialInformation, class A = std::allocator<X>>

bool Dune::Amg::AMGCPR< M, X, S, PI, A >::hasPerfectUpdate | ( |  | ) | const

inline override virtual

Implements Dune::PreconditionerWithUpdate< X, X >.

## post()

template<class M, class X, class S, class PI, class A>

void Dune::Amg::AMGCPR< M, X, S, PI, A >::post | ( | Domain & | x | ) |

override

## pre()

template<class M, class X, class S, class PI, class A>

void Dune::Amg::AMGCPR< M, X, S, PI, A >::pre | ( | Domain & | x,
|  | Range & | b )

override

## recalculateHierarchy()

template<class M, class X, class S, class PI = SequentialInformation, class A = std::allocator<X>>

void Dune::Amg::AMGCPR< M, X, S, PI, A >::recalculateHierarchy | ( |  | ) |

inline

Recalculate the matrix hierarchy.

It is assumed that the coarsening for the changed fine level matrix would yield the same aggregates. In this case it suffices to recalculate all the Galerkin products for the matrices of the coarser levels.

## update()

template<class M, class X, class S, class PI, class A>

void Dune::Amg::AMGCPR< M, X, S, PI, A >::update | ( |  | ) |

override virtual

Update the coarse solver and the hierarchies.

Implements Dune::PreconditionerWithUpdate< X, X >.

## usesDirectCoarseLevelSolver()

template<class M, class X, class S, class PI, class A>

bool Dune::Amg::AMGCPR< M, X, S, PI, A >::usesDirectCoarseLevelSolver | ( |  | ) | const

Check whether the coarse solver used is a direct solver.

Returns
  True if the coarse level solver is a direct solver.