Contains (sequential/threaded) iterative solvers. More...
#include <functional>
#include "StrumpackOptions.hpp"
#include "sparse/CompressedSparseMatrix.hpp"
#include "dense/DenseMatrix.hpp"
Go to the source code of this file.
Namespaces | |
strumpack | |
Typedefs | |
template<typename T > | |
using | strumpack::iterative::SPMV = std::function< void(const T *, T *)> |
template<typename T > | |
using | strumpack::iterative::PREC = std::function< void(T *)> |
Functions | |
template<typename scalar_t , typename real_t = typename RealType<scalar_t>::value_type> | |
real_t | strumpack::iterative::GMRes (const SPMV< scalar_t > &A, const PREC< scalar_t > &M, std::size_t n, scalar_t *x, const scalar_t *b, real_t rtol, real_t atol, int &totit, int maxit, int restart, GramSchmidtType GStype, bool non_zero_guess, bool verbose) |
template<typename scalar_t , typename real_t = typename RealType<scalar_t>::value_type> | |
real_t | strumpack::iterative::BiCGStab (const SPMV< scalar_t > &A, const PREC< scalar_t > &M, std::size_t n, scalar_t *x, const scalar_t *b, real_t rtol, real_t atol, int &totit, int maxit, bool non_zero_guess, bool verbose) |
template<typename scalar_t , typename integer_t , typename real_t = typename RealType<scalar_t>::value_type> | |
void | strumpack::iterative::IterativeRefinement (const CompressedSparseMatrix< scalar_t, integer_t > &A, const std::function< void(DenseMatrix< scalar_t > &)> &M, DenseMatrix< scalar_t > &x, const DenseMatrix< scalar_t > &b, real_t rtol, real_t atol, int &totit, int maxit, bool non_zero_guess, bool verbose) |
template<typename scalar_t , typename real_t = typename RealType<scalar_t>::value_type> | |
void | strumpack::iterative::IterativeRefinement (const DenseMatrix< scalar_t > &A, const std::function< void(DenseMatrix< scalar_t > &)> &M, DenseMatrix< scalar_t > &x, const DenseMatrix< scalar_t > &b, real_t rtol, real_t atol, int &totit, int maxit, bool non_zero_guess, bool verbose) |
Contains (sequential/threaded) iterative solvers.
real_t strumpack::iterative::BiCGStab | ( | const SPMV< scalar_t > & | A, |
const PREC< scalar_t > & | M, | ||
std::size_t | n, | ||
scalar_t * | x, | ||
const scalar_t * | b, | ||
real_t | rtol, | ||
real_t | atol, | ||
int & | totit, | ||
int | maxit, | ||
bool | non_zero_guess, | ||
bool | verbose | ||
) |
void strumpack::iterative::IterativeRefinement | ( | const CompressedSparseMatrix< scalar_t, integer_t > & | A, |
const std::function< void(DenseMatrix< scalar_t > &)> & | M, | ||
DenseMatrix< scalar_t > & | x, | ||
const DenseMatrix< scalar_t > & | b, | ||
real_t | rtol, | ||
real_t | atol, | ||
int & | totit, | ||
int | maxit, | ||
bool | non_zero_guess, | ||
bool | verbose | ||
) |
Iterative refinement, with a sparse matrix, to solve a linear system M^{-1}Ax=M^{-1}b.
scalar_t | scalar type |
integer_t | integer type used in A |
real_t | real type, can be derived from the scalar_t type |
A | dense matrix A |
M | routine to apply M^{-1} to a matrix |
x | on output this contains the solution, on input this can be the initial guess. This always has to be allocated to the correct size (A.rows() x b.cols()) |
b | the right hand side, should have A.rows() rows |
rtol | relative stopping tolerance |
atol | absolute stopping tolerance |
totit | on output this will contain the number of iterations that were performed |
maxit | maximum number of iterations |
non_zero_guess | x use x as an initial guess |
void strumpack::iterative::IterativeRefinement | ( | const DenseMatrix< scalar_t > & | A, |
const std::function< void(DenseMatrix< scalar_t > &)> & | M, | ||
DenseMatrix< scalar_t > & | x, | ||
const DenseMatrix< scalar_t > & | b, | ||
real_t | rtol, | ||
real_t | atol, | ||
int & | totit, | ||
int | maxit, | ||
bool | non_zero_guess, | ||
bool | verbose | ||
) |
Iterative refinement, with a dense matrix, to solve a linear system M^{-1}Ax=M^{-1}b.
scalar_t | scalar type |
real_t | real type, can be derived from the scalar_t type |
A | dense matrix A |
direct_solve | routine to apply M^{-1} to a matrix |
x | on output this contains the solution, on input this can be the initial guess. This always has to be allocated to the correct size (A.rows() x b.cols()) |
b | the right hand side, should have A.rows() rows |
rtol | relative stopping tolerance |
atol | absolute stopping tolerance |
totit | on output this will contain the number of iterations that were performed |
maxit | maximum number of iterations |
non_zero_guess | x use x as an initial guess |