Parallel Algebraic Multigrid

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

Files

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

Namespaces

namespace  Dune
 

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...
 

Typedefs

typedef M Dune::Amg::AMGCPR< M, X, S, PI, A >::Operator
 The matrix operator type. More...
 
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. More...
 
typedef MatrixHierarchy< M, ParallelInformation, A > Dune::Amg::AMGCPR< M, X, S, PI, A >::OperatorHierarchy
 The operator hierarchy type. More...
 
typedef OperatorHierarchy::ParallelInformationHierarchy Dune::Amg::AMGCPR< M, X, S, PI, A >::ParallelInformationHierarchy
 The parallal data distribution hierarchy type. More...
 
typedef X Dune::Amg::AMGCPR< M, X, S, PI, A >::Domain
 The domain type. More...
 
typedef X Dune::Amg::AMGCPR< M, X, S, PI, A >::Range
 The range type. More...
 
typedef InverseOperator< X, X > Dune::Amg::AMGCPR< M, X, S, PI, A >::CoarseSolver
 the type of the coarse solver. More...
 
typedef S Dune::Amg::AMGCPR< M, X, S, PI, A >::Smoother
 The type of the smoother. More...
 
typedef SmootherTraits< Smoother >::Arguments Dune::Amg::AMGCPR< M, X, S, PI, A >::SmootherArgs
 The argument type for the construction of the smoother. More...
 
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. More...
 
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. More...
 
 Dune::Amg::AMGCPR< M, X, S, PI, A >::AMGCPR (const AMGCPR &amg)
 Copy constructor. More...
 
 Dune::Amg::AMGCPR< M, X, S, PI, A >::~AMGCPR ()
 
void Dune::Amg::AMGCPR< M, X, S, PI, A >::pre (Domain &x, Range &b)
 
void Dune::Amg::AMGCPR< M, X, S, PI, A >::apply (Domain &v, const Range &d)
 
virtual SolverCategory::Category Dune::Amg::AMGCPR< M, X, S, PI, A >::category () const
 Category of the preconditioner (see SolverCategory::Category) More...
 
void Dune::Amg::AMGCPR< M, X, S, PI, A >::post (Domain &x)
 
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. More...
 
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. More...
 
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. More...
 
virtual void Dune::Amg::AMGCPR< M, X, S, PI, A >::update ()
 Update the coarse solver and the hierarchies. More...
 
bool Dune::Amg::AMGCPR< M, X, S, PI, A >::usesDirectCoarseLevelSolver () const
 Check whether the coarse solver used is a direct solver. More...
 

Variables

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

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

◆ CoarseSolver

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
typedef InverseOperator<X,X> Dune::Amg::AMGCPR< M, X, S, PI, A >::CoarseSolver

the type of the coarse solver.

◆ Domain

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
typedef X Dune::Amg::AMGCPR< M, X, S, PI, A >::Domain

The domain type.

◆ Operator

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
typedef M Dune::Amg::AMGCPR< M, X, S, PI, A >::Operator

The matrix operator type.

◆ OperatorHierarchy

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
typedef MatrixHierarchy<M, ParallelInformation, A> Dune::Amg::AMGCPR< M, X, S, PI, A >::OperatorHierarchy

The operator hierarchy type.

◆ 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.

◆ ParallelInformationHierarchy

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
typedef OperatorHierarchy::ParallelInformationHierarchy Dune::Amg::AMGCPR< M, X, S, PI, A >::ParallelInformationHierarchy

The parallal data distribution hierarchy type.

◆ Range

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
typedef X Dune::Amg::AMGCPR< M, X, S, PI, A >::Range

The range type.

◆ 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.

◆ SmootherArgs

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
typedef SmootherTraits<Smoother>::Arguments Dune::Amg::AMGCPR< M, X, S, PI, A >::SmootherArgs

The argument type for the construction of the smoother.

◆ SmootherType

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
typedef Smoother Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::SmootherType

Function Documentation

◆ AMGCPR() [1/3]

template<class M , class X , class S , class PI , class A >
Dune::Amg::AMGCPR< M, X, S, PI, A >::AMGCPR ( const AMGCPR< M, X, S, PI, A > &  amg)
inline

Copy constructor.

◆ AMGCPR() [2/3]

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
fineOperatorThe operator on the fine level.
criterionThe criterion describing the coarsening strategy. E. g. SymmetricCriterion or UnsymmetricCriterion, and providing the parameters.
smootherArgsThe arguments for constructing the smoothers.
pinfoThe information about the parallel distribution of the data.

◆ AMGCPR() [3/3]

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
matricesThe already set up matix hierarchy.
coarseSolverThe set up solver to use on the coarse grid, must match the coarse matrix in the matrix hierarchy.
smootherArgsThe arguments needed for thesmoother to use for pre and post smoothing.
parmsThe 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 
)

◆ category()

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
virtual SolverCategory::Category Dune::Amg::AMGCPR< M, X, S, PI, A >::category ( ) const
inlinevirtual

Category of the preconditioner (see SolverCategory::Category)

◆ 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
contThe random access container to store the numbers in.

◆ levels()

template<class M , class X , class S , class PI , class A >
std::size_t Dune::Amg::AMGCPR< M, X, S, PI, A >::levels

◆ maxlevels()

template<class M , class X , class S , class PI , class A >
std::size_t Dune::Amg::AMGCPR< M, X, S, PI, A >::maxlevels

◆ post()

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

◆ 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 
)

◆ 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.

References Dune::Amg::redistributeMatrixAmg().

◆ update()

template<class M , class X , class S , class PI , class A >
void Dune::Amg::AMGCPR< M, X, S, PI, A >::update
virtual

Update the coarse solver and the hierarchies.

Implements Dune::PreconditionerWithUpdate< X, X >.

◆ updateSolver()

template<class M , class X , class S , class PI , class A >
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.

◆ usesDirectCoarseLevelSolver()

template<class M , class X , class S , class PI , class A >
bool Dune::Amg::AMGCPR< M, X, S, PI, A >::usesDirectCoarseLevelSolver

Check whether the coarse solver used is a direct solver.

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

◆ ~AMGCPR()

template<class M , class X , class S , class PI , class A >
Dune::Amg::AMGCPR< M, X, S, PI, A >::~AMGCPR

Variable Documentation

◆ aggregates

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
OperatorHierarchy::AggregatesMapList::const_iterator Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::aggregates

The iterator over the aggregates maps.

◆ level

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
std::size_t Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::level

The level index.

◆ lhs

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
Hierarchy<Domain,A>::Iterator Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::lhs

The iterator over the left hand side.

◆ matrix

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
OperatorHierarchy::ParallelMatrixHierarchy::ConstIterator Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::matrix

The iterator over the matrices.

◆ pinfo

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
ParallelInformationHierarchy::Iterator Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::pinfo

The iterator over the parallel information.

◆ redist

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
OperatorHierarchy::RedistributeInfoList::const_iterator Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::redist

The iterator over the redistribution information.

◆ rhs

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
Hierarchy<Range,A>::Iterator Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::rhs

The iterator over the right hand sided.

◆ smoother

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
Hierarchy<Smoother,A>::Iterator Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::smoother

The iterator over the smoothers.

◆ update

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
Hierarchy<Domain,A>::Iterator Dune::Amg::AMGCPR< M, X, S, PI, A >::LevelContext::update

The iterator over the updates.

Friends

◆ KAMG

template<class M , class X , class S , class PI = SequentialInformation, class A = std::allocator<X>>
template<class M1 , class X1 , class S1 , class P1 , class K1 , class A1 >
friend class KAMG
friend

◆ KAmgTwoGrid< AMGCPR >

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