MyraMath
Classes
fgmres.h File Reference

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

#include <myramath/MYRAMATH_EXPORT.h>
#include <myramath/utility/Number.h>
#include <vector>
Include dependency graph for fgmres.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::fgmres_output< Number >
 Return type of gmres() More...
 

Functions

fgmres_output< NumberS > myra::fgmres (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 fgmres. Overwrites x, returns residual history.
 
fgmres_output< NumberD > myra::fgmres (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 fgmres. Overwrites x, returns residual history.
 
fgmres_output< NumberC > myra::fgmres (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 fgmres. Overwrites x, returns residual history.
 
fgmres_output< NumberZ > myra::fgmres (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 fgmres. Overwrites x, returns residual history.
 

Detailed Description

Linear system solution via (flexible) fgmres (for invertible action A)

Arguments: M1 (input): Action of (left) preconditioner, must be linear. A (input): Action of forward operator. M2 (input): Action of (right) preconditioner, can be variable/nonlinear. 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