Ginkgo  Generated from pipelines/2969282958 branch based on develop. Ginkgo version 2.0.0
A numerical linear algebra library targeting many-core architectures
Public Member Functions | List of all members
gko::solver::EnablePreconditionedIterativeSolver< ValueType, DerivedType > Class Template Reference

A LinOp implementing this interface stores a system matrix and stopping criterion factory. More...

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

Inheritance diagram for gko::solver::EnablePreconditionedIterativeSolver< ValueType, DerivedType >:
[legend]
Collaboration diagram for gko::solver::EnablePreconditionedIterativeSolver< ValueType, DerivedType >:
[legend]

Public Member Functions

 EnablePreconditionedIterativeSolver (std::shared_ptr< const LinOp > system_matrix, std::shared_ptr< const stop::CriterionFactory > stop_factory, std::shared_ptr< const LinOp > preconditioner)
 
template<typename FactoryParameters >
 EnablePreconditionedIterativeSolver (std::shared_ptr< const LinOp > system_matrix, const FactoryParameters &params)
 
 EnablePreconditionedIterativeSolver (const EnablePreconditionedIterativeSolver &)=default
 
 EnablePreconditionedIterativeSolver (EnablePreconditionedIterativeSolver &&)=default
 
EnablePreconditionedIterativeSolver & operator= (const EnablePreconditionedIterativeSolver &other)
 Copies the solver state, cloning the nullspaces onto this executor if the executors don't match.
 
EnablePreconditionedIterativeSolver & operator= (EnablePreconditionedIterativeSolver &&other)
 Moves the solver state, cloning the nullspaces onto this executor if the executors don't match. More...
 
std::shared_ptr< const Nullspace< ValueType > > get_nullspace () const
 
std::shared_ptr< const Nullspace< ValueType > > get_left_nullspace () const
 
void set_preconditioner (std::shared_ptr< const LinOp > new_precond) override
 Sets the preconditioner. More...
 
std::shared_ptr< const LinOp > get_unprojected_preconditioner () const
 
- Public Member Functions inherited from gko::solver::EnableSolverBase< DerivedType >
EnableSolverBase & operator= (const EnableSolverBase &other)
 Creates a shallow copy of the provided system matrix, clones it onto this executor if executors don't match.
 
EnableSolverBase & operator= (EnableSolverBase &&other)
 Moves the provided system matrix, clones it onto this executor if executors don't match. More...
 
 EnableSolverBase (std::shared_ptr< const LinOp > system_matrix)
 
 EnableSolverBase (const EnableSolverBase &other)
 Creates a shallow copy of the provided system matrix.
 
 EnableSolverBase (EnableSolverBase &&other)
 Moves the provided system matrix. More...
 
int get_num_workspace_ops () const override
 
std::vector< std::string > get_workspace_op_names () const override
 
std::vector< int > get_workspace_scalars () const override
 Returns the IDs of all scalars (workspace vectors with system dimension-independent size, usually 1 x num_rhs).
 
std::vector< int > get_workspace_vectors () const override
 Returns the IDs of all vectors (workspace vectors with system dimension-dependent size, usually system_matrix_size x num_rhs).
 
- Public Member Functions inherited from gko::solver::SolverBase< LinOp >
std::shared_ptr< const LinOp > get_system_matrix () const
 Returns the system matrix, with its concrete type, used by the solver. More...
 
- Public Member Functions inherited from gko::solver::EnableIterativeBase< DerivedType >
EnableIterativeBase & operator= (const EnableIterativeBase &other)
 Creates a shallow copy of the provided stopping criterion, clones it onto this executor if executors don't match.
 
EnableIterativeBase & operator= (EnableIterativeBase &&other)
 Moves the provided stopping criterion, clones it onto this executor if executors don't match. More...
 
 EnableIterativeBase (std::shared_ptr< const stop::CriterionFactory > stop_factory)
 
 EnableIterativeBase (const EnableIterativeBase &other)
 Creates a shallow copy of the provided stopping criterion.
 
 EnableIterativeBase (EnableIterativeBase &&other)
 Moves the provided stopping criterion. More...
 
void set_stop_criterion_factory (std::shared_ptr< const stop::CriterionFactory > new_stop_factory) override
 Sets the stopping criterion of the solver. More...
 
- Public Member Functions inherited from gko::solver::IterativeBase
std::shared_ptr< const stop::CriterionFactory > get_stop_criterion_factory () const
 Gets the stopping criterion factory of the solver. More...
 
- Public Member Functions inherited from gko::solver::EnablePreconditionable< DerivedType >
EnablePreconditionable & operator= (const EnablePreconditionable &other)
 Creates a shallow copy of the provided preconditioner, clones it onto this executor if executors don't match.
 
EnablePreconditionable & operator= (EnablePreconditionable &&other)
 Moves the provided preconditioner, clones it onto this executor if executors don't match. More...
 
 EnablePreconditionable (std::shared_ptr< const LinOp > preconditioner)
 
 EnablePreconditionable (const EnablePreconditionable &other)
 Creates a shallow copy of the provided preconditioner.
 
 EnablePreconditionable (EnablePreconditionable &&other)
 Moves the provided preconditioner. More...
 
- Public Member Functions inherited from gko::Preconditionable
virtual std::shared_ptr< const LinOp > get_preconditioner () const
 Returns the preconditioner operator used by the Preconditionable. More...
 

Detailed Description

template<typename ValueType, typename DerivedType>
class gko::solver::EnablePreconditionedIterativeSolver< ValueType, DerivedType >

A LinOp implementing this interface stores a system matrix and stopping criterion factory.

Template Parameters
ValueTypethe value type that iterative solver uses for its vectors
DerivedTypethe CRTP type that derives from this

Member Function Documentation

◆ get_left_nullspace()

template<typename ValueType, typename DerivedType>
std::shared_ptr<const Nullspace<ValueType> > gko::solver::EnablePreconditionedIterativeSolver< ValueType, DerivedType >::get_left_nullspace ( ) const
inline
Returns
the left nullspace \( N(A^H) \) (the complement of \( \mathrm{range}(A) \)), or nullptr if none was set.

◆ get_nullspace()

template<typename ValueType, typename DerivedType>
std::shared_ptr<const Nullspace<ValueType> > gko::solver::EnablePreconditionedIterativeSolver< ValueType, DerivedType >::get_nullspace ( ) const
inline
Returns
the right nullspace \( N(A) \), or nullptr if none was set.

◆ get_unprojected_preconditioner()

template<typename ValueType, typename DerivedType>
std::shared_ptr<const LinOp> gko::solver::EnablePreconditionedIterativeSolver< ValueType, DerivedType >::get_unprojected_preconditioner ( ) const
inline
Returns
the preconditioner without its nullspace projection: if a nullspace is set, the preconditioner wrapped by get_preconditioner(), which is a preconditioner::NullspaceProjection, otherwise get_preconditioner() itself.

◆ operator=()

template<typename ValueType, typename DerivedType>
EnablePreconditionedIterativeSolver& gko::solver::EnablePreconditionedIterativeSolver< ValueType, DerivedType >::operator= ( EnablePreconditionedIterativeSolver< ValueType, DerivedType > &&  other)
inline

Moves the solver state, cloning the nullspaces onto this executor if the executors don't match.

The moved-from object has no nullspaces.

◆ set_preconditioner()

template<typename ValueType, typename DerivedType>
void gko::solver::EnablePreconditionedIterativeSolver< ValueType, DerivedType >::set_preconditioner ( std::shared_ptr< const LinOp >  new_precond)
inlineoverridevirtual

Sets the preconditioner.

If a nullspace is set, the preconditioner is wrapped in a preconditioner::NullspaceProjection, unless it already is one that removes the nullspace (and, for solvers projecting on both sides, the left nullspace).

Reimplemented from gko::solver::EnablePreconditionable< DerivedType >.


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