gko::solver::Chebyshev#
Chebyshev iteration. A non-Krylov stationary method that uses a two-term recurrence with parameters derived from an estimate of the spectrum of the (preconditioned) operator. No inner products — useful as a smoother in multigrid and as an outer iteration when global reductions are expensive.
-
template<typename ValueType = default_precision>
class Chebyshev # Inherits from
public gko::EnableLinOp<Chebyshev<default_precision>>
public gko::solver::EnablePreconditionedIterativeSolver<default_precision, Chebyshev<default_precision>>
public gko::solver::EnableApplyWithInitialGuess<Chebyshev<default_precision>>
public gko::Transposable
Chebyshev iteration is an iterative method for solving nonsymmetric problems based on some knowledge of the spectrum of the (preconditioned) system matrix. It avoids the computation of inner products, which may be a performance bottleneck for distributed system. Chebyshev iteration is developed based on Chebyshev polynomials of the first kind.
Given a preconditioner \( M \approx A^{-1} \), the iterate is updated with the three-term recurrence
\[ x_{k+1} = x_k + \alpha_k \, M (b - A x_k) + \beta_k \, (x_k - x_{k-1}), \]where the scalars \( \alpha_k, \beta_k \) are derived from an estimate of the spectrum of \( M A \). In pseudo-code:solution = initial_guess while not converged: residual = b - A solution error = preconditioner(A) * residual solution = solution + alpha_i * error + beta_i * (solution_i - solution_{i-1})
- References
Barrett, R., Berry, M., Chan, T. F., et al. Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods. 2nd ed. SIAM, 1994. https://doi.org/10.1137/1.9781611971538
- Template Parameters:
ValueType – precision of matrix elements
Public Functions
-
virtual std::unique_ptr<LinOp> transpose() const override#
Returns a LinOp representing the transpose of the Transposable object.
- Returns:
a pointer to the new transposed object
-
virtual std::unique_ptr<LinOp> conj_transpose() const override#
Returns a LinOp representing the conjugate transpose of the Transposable object.
- Returns:
a pointer to the new conjugate transposed object
-
inline bool apply_uses_initial_guess() const override#
Return true as iterative solvers use the data in x as an initial guess.
- Returns:
true as iterative solvers use the data in x as an initial guess.
-
Chebyshev &operator=(const Chebyshev&)#
Copy-assigns a Chebyshev solver. Preserves the executor, shallow-copies inner solver, stopping criterion and system matrix. If the executors mismatch, clones inner solver, stopping criterion and system matrix onto this executor.
-
Chebyshev &operator=(Chebyshev&&)#
Move-assigns a Chebyshev solver. Preserves the executor, moves inner solver, stopping criterion and system matrix. If the executors mismatch, clones inner solver, stopping criterion and system matrix onto this executor. The moved-from object is empty (0x0 and nullptr inner solver, stopping criterion and system matrix)
Public Static Functions
- static parameters_type parse(
- const config::pnode &config,
- const config::registry &context,
- const config::type_descriptor &td_for_child = config::make_type_descriptor<ValueType>(),
Create the parameters from the property_tree. Because this is directly tied to the specific type, the value/index type settings within config are ignored and type_descriptor is only used for children configs.
- Parameters:
config – the property tree for setting
context – the registry
td_for_child – the type descriptor for children configs. The default uses the value type of this class.
- Returns:
parameters
-
struct parameters_type #
Inherits from
public gko::solver::enable_preconditioned_iterative_solver_factory_parameters<parameters_type, Factory>
Public Members
-
initial_guess_mode default_initial_guess#
Default initial guess mode. The available options are under initial_guess_mode.