Discontinuous Galerkin Library
#include "dg/algorithm.h"
dg::ChebyshevPreconditioner< Matrix, ContainerType > Struct Template Reference

Chebyshev Polynomial Preconditioner \( C( A)\). More...

Public Types

using container_type = ContainerType
 
using value_type = get_value_type< ContainerType >
 value type of the ContainerType class More...
 

Public Member Functions

 ChebyshevPreconditioner (Matrix op, const ContainerType &copyable, value_type ev_min, value_type ev_max, unsigned degree)
 Construct the k-th Chebyshev Polynomial. More...
 
template<class ContainerType0 , class ContainerType1 >
void symv (const ContainerType0 &x, ContainerType1 &y)
 

Detailed Description

template<class Matrix, class ContainerType>
struct dg::ChebyshevPreconditioner< Matrix, ContainerType >

Chebyshev Polynomial Preconditioner \( C( A)\).

Note
This class can be used as a Preconditioner in the CG algorithm. The CG algorithm forms an approximation to the solution in the form \( x_{k+1} = x_0 + P_k(A) r_0\) where \( P_k\) is a polynomial of degree k, which is optimal in minimizing the A-norm. Thus a polynomial preconditioner cannot decrease the number of matrix-vector multiplications needed to achieve a certain accuracy. However, since polynomial preconditioners do not use scalar products they may offset the increased overhead if the dot product becomes a bottleneck for performance or scalability.
See also
ChebyshevIteration
Template Parameters
MatrixPreferably a reference type
ContainerType

Member Typedef Documentation

◆ container_type

template<class Matrix , class ContainerType >
using dg::ChebyshevPreconditioner< Matrix, ContainerType >::container_type = ContainerType

◆ value_type

template<class Matrix , class ContainerType >
using dg::ChebyshevPreconditioner< Matrix, ContainerType >::value_type = get_value_type<ContainerType>

value type of the ContainerType class

Constructor & Destructor Documentation

◆ ChebyshevPreconditioner()

template<class Matrix , class ContainerType >
dg::ChebyshevPreconditioner< Matrix, ContainerType >::ChebyshevPreconditioner ( Matrix  op,
const ContainerType &  copyable,
value_type  ev_min,
value_type  ev_max,
unsigned  degree 
)
inline

Construct the k-th Chebyshev Polynomial.

Parameters
opThe Matrix (copied, so maybe choose a reference type for shallow copying) will be called as dg::blas2::symv( op, x, y)
copyableA ContainerType must be copy-constructible from this
ev_minan estimate of the minimum Eigenvalue (It is important to get a good value here. Unfortunately, we currently have no perfect way of getting this value, as a suggestion use 0.01*max_ev)
ev_maxan estimate of the maximum Eigenvalue of \( A\) (must be larger than min_ev) Use EVE to get this value
degreedegree k of the Polynomial (5 should be a good number)

Member Function Documentation

◆ symv()

template<class Matrix , class ContainerType >
template<class ContainerType0 , class ContainerType1 >
void dg::ChebyshevPreconditioner< Matrix, ContainerType >::symv ( const ContainerType0 &  x,
ContainerType1 &  y 
)
inline

The documentation for this struct was generated from the following file: