MyraMath
Classes
gmres.h File Reference

Linear system solution via gmres (for invertible action A) More...

#include <myramath/MYRAMATH_EXPORT.h>
#include <myramath/utility/Number.h>
#include <vector>
Include dependency graph for gmres.h:

Go to the source code of this file.

Classes

class  myra::Action< Number >
 Applies the "Action" of a linear operator, b := A*x. More...
 
class  myra::CVectorRange< Number >
 Represents a const VectorRange. More...
 
class  myra::VectorRange< Number >
 Represents a mutable VectorRange. More...
 
class  myra::CMatrixRange< Number >
 Represents a const MatrixRange. More...
 
class  myra::MatrixRange< Number >
 Represents a mutable MatrixRange. More...
 
class  myra::gmres_output< Number >
 Return type of gmres() More...
 

Functions

gmres_output< NumberS > myra::gmres (const Action< NumberS > &M1, const Action< NumberS > &A, const Action< NumberS > &M2, const CVectorRange< NumberS > &b, const VectorRange< NumberS > &x, NumberS tolerance=1.0e-4, int restart=100, int iterations=1)
 Solves A*x = b for x using restarted gmres. Overwrites x, returns residual history.
 
gmres_output< NumberD > myra::gmres (const Action< NumberD > &M1, const Action< NumberD > &A, const Action< NumberD > &M2, const CVectorRange< NumberD > &b, const VectorRange< NumberD > &x, NumberD tolerance, int restart, int iterations)
 Solves A*x = b for x using restarted gmres. Overwrites x, returns residual history.
 
gmres_output< NumberC > myra::gmres (const Action< NumberC > &M1, const Action< NumberC > &A, const Action< NumberC > &M2, const CVectorRange< NumberC > &b, const VectorRange< NumberC > &x, NumberS tolerance, int restart, int iterations)
 Solves A*x = b for x using restarted gmres. Overwrites x, returns residual history.
 
gmres_output< NumberZ > myra::gmres (const Action< NumberZ > &M1, const Action< NumberZ > &A, const Action< NumberZ > &M2, const CVectorRange< NumberZ > &b, const VectorRange< NumberZ > &x, NumberD tolerance, int restart, int iterations)
 Solves A*x = b for x using restarted gmres. Overwrites x, returns residual history.
 
gmres_output< NumberS > myra::gmres (const Action< NumberS > &M1, const Action< NumberS > &A, const CVectorRange< NumberS > &b, const VectorRange< NumberS > &x, NumberS tolerance=1.0e-4, int restart=100, int iterations=1)
 Solves A*x = b for x using restarted gmres. Overwrites x, returns residual history.
 
gmres_output< NumberD > myra::gmres (const Action< NumberD > &M1, const Action< NumberD > &A, const CVectorRange< NumberD > &b, const VectorRange< NumberD > &x, NumberD tolerance, int restart, int iterations)
 Solves A*x = b for x using restarted gmres. Overwrites x, returns residual history.
 
gmres_output< NumberC > myra::gmres (const Action< NumberC > &M1, const Action< NumberC > &A, const CVectorRange< NumberC > &b, const VectorRange< NumberC > &x, NumberS tolerance, int restart, int iterations)
 Solves A*x = b for x using restarted gmres. Overwrites x, returns residual history.
 
gmres_output< NumberZ > myra::gmres (const Action< NumberZ > &M1, const Action< NumberZ > &A, const CVectorRange< NumberZ > &b, const VectorRange< NumberZ > &x, NumberD tolerance, int restart, int iterations)
 Solves A*x = b for x using restarted gmres. Overwrites x, returns residual history.
 
gmres_output< NumberS > myra::gmres (const Action< NumberS > &M1, const Action< NumberS > &A, const Action< NumberS > &M2, const CMatrixRange< NumberS > &B, const MatrixRange< NumberS > &X, NumberS tolerance=1.0e-4, int restart=100, int iterations=1)
 Solves A*X = B for X using restarted gmres. Overwrites X, returns residual history.
 
gmres_output< NumberD > myra::gmres (const Action< NumberD > &M1, const Action< NumberD > &A, const Action< NumberD > &M2, const CMatrixRange< NumberD > &B, const MatrixRange< NumberD > &X, NumberD tolerance, int restart, int iterations)
 Solves A*X = B for X using restarted gmres. Overwrites X, returns residual history.
 
gmres_output< NumberC > myra::gmres (const Action< NumberC > &M1, const Action< NumberC > &A, const Action< NumberC > &M2, const CMatrixRange< NumberC > &B, const MatrixRange< NumberC > &X, NumberS tolerance, int restart, int iterations)
 Solves A*X = B for X using restarted gmres. Overwrites X, returns residual history.
 
gmres_output< NumberZ > myra::gmres (const Action< NumberZ > &M1, const Action< NumberZ > &A, const Action< NumberZ > &M2, const CMatrixRange< NumberZ > &B, const MatrixRange< NumberZ > &X, NumberD tolerance, int restart, int iterations)
 Solves A*X = B for X using restarted gmres. Overwrites X, returns residual history.
 
gmres_output< NumberS > myra::gmres (const Action< NumberS > &M1, const Action< NumberS > &A, const CMatrixRange< NumberS > &B, const MatrixRange< NumberS > &X, NumberS tolerance=1.0e-4, int restart=100, int iterations=1)
 Solves A*X = B for X using restarted gmres. Overwrites X, returns residual history.
 
gmres_output< NumberD > myra::gmres (const Action< NumberD > &M1, const Action< NumberD > &A, const CMatrixRange< NumberD > &B, const MatrixRange< NumberD > &X, NumberD tolerance, int restart, int iterations)
 Solves A*X = B for X using restarted gmres. Overwrites X, returns residual history.
 
gmres_output< NumberC > myra::gmres (const Action< NumberC > &M1, const Action< NumberC > &A, const CMatrixRange< NumberC > &B, const MatrixRange< NumberC > &X, NumberS tolerance, int restart, int iterations)
 Solves A*X = B for X using restarted gmres. Overwrites X, returns residual history.
 
gmres_output< NumberZ > myra::gmres (const Action< NumberZ > &M1, const Action< NumberZ > &A, const CMatrixRange< NumberZ > &B, const MatrixRange< NumberZ > &X, NumberD tolerance, int restart, int iterations)
 Solves A*X = B for X using restarted gmres. Overwrites X, returns residual history.
 

Detailed Description

Linear system solution via gmres (for invertible action A)

Arguments:

M1 (input): Action of (left) preconditioner. A (input): Action of forward operator. M2 (input): Action of (right) preconditioner. Optional. b (input): Right hand side. x (input/output): Initial guess / final answer. tolerance(input): termination criteria, desired tolerance. restart(input): restart every so often, to bound storage demands iterations(input): termination criteria, maximum iterations allowed