ALP User Documentation  0.8.preview
Algebraic Programming User Documentation
Namespaces | Functions
gmres.hpp File Reference

Provides the GMRES algorithm. More...

Go to the source code of this file.

Namespaces

 grb
 The ALP/GraphBLAS namespace.
 
 grb::algorithms
 The namespace for ALP/GraphBLAS algorithms.
 

Functions

template<Descriptor descr = descriptors::no_operation, typename NonzeroType , typename ResidualType , class Ring = Semiring< grb::operators::add< NonzeroType >, grb::operators::mul< NonzeroType >, grb::identities::zero, grb::identities::one >, class Minus = operators::subtract< NonzeroType >, class Divide = operators::divide< NonzeroType >>
grb::RC gmres (grb::Vector< NonzeroType > &x, const grb::Matrix< NonzeroType > &A, const grb::Vector< NonzeroType > &b, const size_t n_restart, const size_t max_iterations, const ResidualType tol, size_t &iterations, size_t &iterations_gmres, size_t &iterations_arnoldi, ResidualType &residual, std::vector< grb::Vector< NonzeroType > > &Q, std::vector< NonzeroType > &Hmatrix, grb::Vector< NonzeroType > &temp, std::vector< NonzeroType > &temp3, const Ring &ring=Ring(), const Minus &minus=Minus(), const Divide &divide=Divide(), const std::function< ResidualType(ResidualType) > &sqrtX=std_sqrt< ResidualType, ResidualType >)
 Solves a linear system \( b = Ax \) with \( x \) unknown using the Generalised Minimal Residual (GMRES) method on general fields. More...
 
template<typename NonzeroType , typename DimensionType , typename ResidualType , class Ring = Semiring< grb::operators::add< NonzeroType >, grb::operators::mul< NonzeroType >, grb::identities::zero, grb::identities::one >, class Minus = operators::subtract< NonzeroType >, class Divide = operators::divide< NonzeroType >>
grb::RC hessolve (std::vector< NonzeroType > &H, const DimensionType n, const DimensionType &kspspacesize, const ResidualType tol, std::vector< NonzeroType > &vecx, const Ring &ring=Ring(), const Minus &minus=Minus(), const Divide &divide=Divide(), const std::function< ResidualType(ResidualType) > &sqrtX=std_sqrt< ResidualType, ResidualType >)
 Solves the least linear square problem of size n - 1, defined by the equation \( A x = b, \) where the \( A \) is an upper-Hessenberg matrix of size n x kspspacesize, and the vector \( b \), of length n, has only the first element nonzero. More...
 
template<Descriptor descr = descriptors::no_operation, typename NonzeroType , typename ResidualType , class Ring = Semiring< grb::operators::add< NonzeroType >, grb::operators::mul< NonzeroType >, grb::identities::zero, grb::identities::one >, class Minus = operators::subtract< NonzeroType >, class Divide = operators::divide< NonzeroType >>
grb::RC preconditioned_gmres (grb::Vector< NonzeroType > &x, const grb::Matrix< NonzeroType > &M, const grb::Matrix< NonzeroType > &A, const grb::Vector< NonzeroType > &b, const size_t n_restart, const size_t max_iterations, const ResidualType tol, size_t &iterations, size_t &iterations_gmres, size_t &iterations_arnoldi, ResidualType &residual, std::vector< grb::Vector< NonzeroType > > &Q, std::vector< NonzeroType > &Hmatrix, grb::Vector< NonzeroType > &temp, std::vector< NonzeroType > &temp3, const Ring &ring=Ring(), const Minus &minus=Minus(), const Divide &divide=Divide(), const std::function< ResidualType(ResidualType) > &sqrtX=std_sqrt< ResidualType, ResidualType >)
 Solves a linear system \( b = Ax \) with \( x \) unknown using the Generalised Minimal Residual (GMRES) method on general fields. More...
 

Detailed Description

Provides the GMRES algorithm.

Author
Denis Jelovina
Date
6th of December, 2022