ApplyWithInitialGuess Class Reference

ApplyWithInitialGuess Class Reference#

Reference API: gko::solver::ApplyWithInitialGuess Class Reference
Reference API
gko::solver::ApplyWithInitialGuess Class Referenceabstract

#include <ginkgo/core/solver/solver_base.hpp>

Inheritance diagram for gko::solver::ApplyWithInitialGuess:
[legend]

Protected Member Functions

virtual void apply_with_initial_guess (const LinOp *b, LinOp *x, initial_guess_mode guess) const =0
 
void apply_with_initial_guess (ptr_param< const LinOp > b, ptr_param< LinOp > x, initial_guess_mode guess) const
 
virtual void apply_with_initial_guess (const LinOp *alpha, const LinOp *b, const LinOp *beta, LinOp *x, initial_guess_mode guess) const =0
 
void apply_with_initial_guess (ptr_param< const LinOp > alpha, ptr_param< const LinOp > b, ptr_param< const LinOp > beta, ptr_param< LinOp > x, initial_guess_mode guess) const
 
initial_guess_mode get_default_initial_guess () const
 
 ApplyWithInitialGuess (initial_guess_mode guess=initial_guess_mode::provided)
 
void set_default_initial_guess (initial_guess_mode guess)
 

Detailed Description

ApplyWithInitialGuess provides a way to give the input guess for apply function. All functionalities have the protected access specifier. It should only be used internally.

Constructor & Destructor Documentation

◆ ApplyWithInitialGuess()

gko::solver::ApplyWithInitialGuess::ApplyWithInitialGuess ( initial_guess_mode  guess = initial_guess_mode::provided)
inlineexplicitprotected

ApplyWithInitialGuess constructor.

Parameters
guessthe input guess whose default is initial_guess_mode::provided

Member Function Documentation

◆ apply_with_initial_guess() [1/2]

virtual void gko::solver::ApplyWithInitialGuess::apply_with_initial_guess ( const LinOp alpha,
const LinOp b,
const LinOp beta,
LinOp x,
initial_guess_mode  guess 
) const
protectedpure virtual

Performs the operation x = alpha * op(b) + beta * x with a initial guess statement, where op is this linear operator and the initial guess parameter will modify the input vector to the requested the initial guess mode (See initial_guess_mode) .

Parameters
alphascaling of the result of op(b)
bvector(s) on which the operator is applied
betascaling of the input x
xoutput vector(s)
guessthe input guess to handle the input vector(s)

Implemented in gko::solver::EnableApplyWithInitialGuess< DerivedType >, gko::solver::EnableApplyWithInitialGuess< Ir< default_precision > >, and gko::solver::EnableApplyWithInitialGuess< Multigrid >.

References apply_with_initial_guess(), and gko::ptr_param< T >::get().

◆ apply_with_initial_guess() [2/2]

virtual void gko::solver::ApplyWithInitialGuess::apply_with_initial_guess ( const LinOp b,
LinOp x,
initial_guess_mode  guess 
) const
protectedpure virtual

Applies a linear operator to a vector (or a sequence of vectors) with initial guess statement.

Performs the operation x = op(b) with a initial guess statement, where op is this linear operator and the initial guess parameter will modify the input vector to the requested the initial guess mode (See initial_guess_mode).

Parameters
bthe input vector(s) on which the operator is applied
xthe output vector(s) where the result is stored
guessthe input guess to handle the input vector(s)

Implemented in gko::solver::EnableApplyWithInitialGuess< DerivedType >, gko::solver::EnableApplyWithInitialGuess< Ir< default_precision > >, and gko::solver::EnableApplyWithInitialGuess< Multigrid >.

References apply_with_initial_guess(), and gko::ptr_param< T >::get().

Referenced by apply_with_initial_guess(), and apply_with_initial_guess().

◆ get_default_initial_guess()

initial_guess_mode gko::solver::ApplyWithInitialGuess::get_default_initial_guess ( ) const
inlineprotected

Get the default initial guess

Returns
default initial guess

Referenced by gko::solver::Ir< ValueType >::apply_uses_initial_guess(), and gko::solver::Multigrid::apply_uses_initial_guess().

◆ set_default_initial_guess()

void gko::solver::ApplyWithInitialGuess::set_default_initial_guess ( initial_guess_mode  guess)
inlineprotected

set the default initial guess

Parameters
guessthe initial guess

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