Block-Structured AMR Software Framework
Loading...
Searching...
No Matches
amrex::ChebyshevSmoother< T > Class Template Reference

Chebyshev polynomial smoother for AlgVector/SpMatrix systems. More...

#include <AMReX_Smoother_MV.H>

Public Member Functions

 ChebyshevSmoother (SpMatrix< T > const *a_A, bool a_l1=false)
void setDegree (int d)
 Polynomial degree (number of matrix-vector products per application, 2 by default).
void setEigRatio (T r)
int setNumIters (int a_niters)
 Number of polynomial applications per call (1 by default).
void setLambdaMax (T l)
 Set the largest eigenvalue of the scaled operator instead of the bound.
T lambdaMax ()
void operator() (AlgVector< T > &xvec, AlgVector< T > const &bvec, bool with_initial_guess=false)
 Apply the smoother to solve approximately for xvec.
void bound ()
 Gershgorin bound of the eigenvalues of D^{-1} A.

Detailed Description

template<typename T>
class amrex::ChebyshevSmoother< T >

Chebyshev polynomial smoother for AlgVector/SpMatrix systems.

Applies a Chebyshev polynomial of the diagonally (or l1) scaled operator D^{-1} A that damps the spectrum in [lambda_max / ratio, lambda_max] [Adams, Brezina, Hu, Tuminaro, J. Comput. Phys. 188 (2003), 593-610]. Each application costs degree matrix-vector products. lambda_max is the Gershgorin bound max_i sum_j |a_ij| / |d_i| of the scaled operator, which is one with l1 scaling.

Constructor & Destructor Documentation

◆ ChebyshevSmoother()

template<typename T>
amrex::ChebyshevSmoother< T >::ChebyshevSmoother ( SpMatrix< T > const * a_A,
bool a_l1 = false )
inlineexplicit
Parameters
a_ASparse matrix.
a_l1Use l1 scaling instead of the diagonal.

Member Function Documentation

◆ bound()

template<typename T>
void amrex::ChebyshevSmoother< T >::bound ( )
inline

Gershgorin bound of the eigenvalues of D^{-1} A.

◆ lambdaMax()

template<typename T>
T amrex::ChebyshevSmoother< T >::lambdaMax ( )
inline

Upper bound of the eigenvalues of the scaled operator, computed on first use. The first call is collective.

◆ operator()()

template<typename T>
void amrex::ChebyshevSmoother< T >::operator() ( AlgVector< T > & xvec,
AlgVector< T > const & bvec,
bool with_initial_guess = false )
inline

Apply the smoother to solve approximately for xvec.

Parameters
xvecSolution vector updated in place.
bvecRHS vector.
with_initial_guessTrue if xvec already holds an initial guess.

◆ setDegree()

template<typename T>
void amrex::ChebyshevSmoother< T >::setDegree ( int d)
inline

Polynomial degree (number of matrix-vector products per application, 2 by default).

◆ setEigRatio()

template<typename T>
void amrex::ChebyshevSmoother< T >::setEigRatio ( T r)
inline

Ratio between the largest eigenvalue and the lower end of the smoothing interval (20 by default).

◆ setLambdaMax()

template<typename T>
void amrex::ChebyshevSmoother< T >::setLambdaMax ( T l)
inline

Set the largest eigenvalue of the scaled operator instead of the bound.

◆ setNumIters()

template<typename T>
int amrex::ChebyshevSmoother< T >::setNumIters ( int a_niters)
inline

Number of polynomial applications per call (1 by default).


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