|
| ChebyshevIteration ()=default |
| Allocate nothing, Call construct method before usage. More...
|
|
| ChebyshevIteration (const ContainerType ©able) |
| Allocate memory for the pcg method. More...
|
|
const ContainerType & | copyable () const |
| Return an object of same size as the object used for construction. More...
|
|
void | construct (const ContainerType ©able) |
| Allocate memory for the pcg method. More...
|
|
template<class MatrixType , class ContainerType0 , class ContainerType1 > |
void | solve (MatrixType &&A, ContainerType0 &x, const ContainerType1 &b, value_type min_ev, value_type max_ev, unsigned num_iter, bool x_is_zero=false) |
| Solve the system \( Ax = b\) using num_iter Chebyshev iteration. More...
|
|
template<class MatrixType0 , class MatrixType1 , class ContainerType0 , class ContainerType1 > |
void | solve (MatrixType0 &&A, ContainerType0 &x, const ContainerType1 &b, MatrixType1 &&P, value_type min_ev, value_type max_ev, unsigned num_iter, bool x_is_zero=false) |
| Solve the system \( PAx = Pb\) using num_iter Preconditioned Chebyshev iteration. More...
|
|
template<class ContainerType>
class dg::ChebyshevIteration< ContainerType >
Preconditioned Chebyshev iteration for solving \( PAx=Pb\).
Chebyshev iteration is not well-suited for solving matrix equations on its own. Rather, it is suited as a smoother for a multigrid algorithm and also as a Preconditioner for the Conjugate Gradient method. It does not contain scalar products, which makes it appaeling for both small and highly parallelized systems.
Given the minimum and maximum Eigenvalue of the matrix A we define
\[ \theta = (\lambda_\min+\lambda_\max)/2 \quad \delta = (\lambda_\max - \lambda_\min)/2 \\ \rho_0 := \frac{\delta}{\theta},\ x_0 := x, \ x_{1} = x_0+\frac{1}{\theta} P(b-Ax_0) \\ \rho_{k}:=\left(\frac{2\theta}{\delta}-\rho_{k-1}\right)^{-1} \\ x_{k+1} := x_k + \rho_k\left( \rho_{k-1}(x_k - x_{k-1}) + \frac{2}{\delta} P( b - Ax_k) \right) \]
The preconditioned version is obtained by applying the regular version to \( \bar A\bar x = \bar b\) with \( \bar A := {E^{-1}}^\mathrm{T} A E^{-1} \), \( \bar x := Ex\) and \( \bar b := {E^{-1}}^\mathrm{T}\), where \( P = {E^{-1}}^\mathrm{T} E^{-1}\) is the preconditioner. The bounds on the spectrum then need to be on the \(PA\) matrix.
- Note
- The maximum Eigenvalue of \( A\) and \( P A\) can be estimated using the
EVE
class.
- See also
- For more information see the book Iteratvie Methods for Sparse Linear Systems" 2nd edition by Yousef Saad
- Note
- If the initial vector is zero Chebyshev iteration will produce the Chebyshev polynomial \( C_k( A) b\) applied to the right hand side and the preconditioned version produces \( C_{k-1}(PA)Pb = E^{-1} C_{k-1}( {E^{-1}}^\mathrm{T} A E^{-1}){E^{-1}}^\mathrm{T}\)
- Attention
- Chebyshev iteration may diverge if the elliptical bound of the Eigenvalues is not accurate (in particular if \(\lambda_\max\) is underestimated) or if an ellipsis is not a good fit for the spectrum of the matrix
- Template Parameters
-
ContainerType | Any class for which a specialization of TensorTraits exists and which fulfills the requirements of the there defined data and execution policies derived from AnyVectorTag and AnyPolicyTag . Among others
dg::HVec (serial), dg::DVec (cuda / omp), dg::MHVec (mpi + serial) or dg::MDVec (mpi + cuda / omp)
std::vector<dg::DVec> (vector of shared device vectors), std::array<double, 4> (array of 4 doubles) or std::map < std::string, dg::DVec> ( a map of named vectors)
double (scalar) and other primitive types ...
If there are several ContainerTypes in the argument list, then TensorTraits must exist for all of them |
- See also
- See The dg dispatch system for a detailed explanation of our type dispatch system