Solve a square linear system of equations
using the Generalized Minimum RESidual (GMRES) method.
References
call gmres(A, b, x, info [, rtol] [, atol] [, preconditioner] [, options] [, transpose])
A
: Linear operator derived from one of the abstract_linop
provided by the
AbstractLinops
module. It is an intent(in)
argument.
b
: Right-hand side vector derived from one the abstract_vector
types provided
by the AbstractVectors
module. It needs to have the same type and kind as A
.
It is an intent(in)
argument.
x
: On entry, initial guess for the solution. On exit, the solution computed by
gmres. It is a vector derived from one the abstract_vector
types provided by the
AbstractVectors
module. It needs to have the same type and kind as A
. It is
an intent(inout)
argument.
info
: integer
information flag.
rtol
(optional) : real
relative tolerance for the solver.
atol
(optional) : real
absolute tolerance for the solver.
preconditioner
(optional) : Right preconditioner used to solve the system. It needs
to be consistent with the abstract_preconditioner
interface. It is an intent(in)
argument.
options
(optional) : Container for the gmres options given by the gmres_opts
type.
It is an intent(in)
argument.
transpose
(optional) : logical
flag controlling whether or
is being solver.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_linop_rsp), | intent(in) | :: | A |
Linear operator to be inverted. |
||
class(abstract_vector_rsp), | intent(in) | :: | b |
Right-hand side vector. |
||
class(abstract_vector_rsp), | intent(inout) | :: | x |
Solution vector. |
||
integer, | intent(out) | :: | info |
Information flag. |
||
real(kind=sp), | intent(in), | optional | :: | rtol |
Relative solver tolerance |
|
real(kind=sp), | intent(in), | optional | :: | atol |
Absolute solver tolerance |
|
class(abstract_precond_rsp), | intent(in), | optional | :: | preconditioner |
Preconditioner (optional). |
|
class(abstract_opts), | intent(in), | optional | :: | options |
GMRES options. |
|
logical, | intent(in), | optional | :: | transpose |
Whether or is being used. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_linop_rdp), | intent(in) | :: | A |
Linear operator to be inverted. |
||
class(abstract_vector_rdp), | intent(in) | :: | b |
Right-hand side vector. |
||
class(abstract_vector_rdp), | intent(inout) | :: | x |
Solution vector. |
||
integer, | intent(out) | :: | info |
Information flag. |
||
real(kind=dp), | intent(in), | optional | :: | rtol |
Relative solver tolerance |
|
real(kind=dp), | intent(in), | optional | :: | atol |
Absolute solver tolerance |
|
class(abstract_precond_rdp), | intent(in), | optional | :: | preconditioner |
Preconditioner (optional). |
|
class(abstract_opts), | intent(in), | optional | :: | options |
GMRES options. |
|
logical, | intent(in), | optional | :: | transpose |
Whether or is being used. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_linop_csp), | intent(in) | :: | A |
Linear operator to be inverted. |
||
class(abstract_vector_csp), | intent(in) | :: | b |
Right-hand side vector. |
||
class(abstract_vector_csp), | intent(inout) | :: | x |
Solution vector. |
||
integer, | intent(out) | :: | info |
Information flag. |
||
real(kind=sp), | intent(in), | optional | :: | rtol |
Relative solver tolerance |
|
real(kind=sp), | intent(in), | optional | :: | atol |
Absolute solver tolerance |
|
class(abstract_precond_csp), | intent(in), | optional | :: | preconditioner |
Preconditioner (optional). |
|
class(abstract_opts), | intent(in), | optional | :: | options |
GMRES options. |
|
logical, | intent(in), | optional | :: | transpose |
Whether or is being used. |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_linop_cdp), | intent(in) | :: | A |
Linear operator to be inverted. |
||
class(abstract_vector_cdp), | intent(in) | :: | b |
Right-hand side vector. |
||
class(abstract_vector_cdp), | intent(inout) | :: | x |
Solution vector. |
||
integer, | intent(out) | :: | info |
Information flag. |
||
real(kind=dp), | intent(in), | optional | :: | rtol |
Relative solver tolerance |
|
real(kind=dp), | intent(in), | optional | :: | atol |
Absolute solver tolerance |
|
class(abstract_precond_cdp), | intent(in), | optional | :: | preconditioner |
Preconditioner (optional). |
|
class(abstract_opts), | intent(in), | optional | :: | options |
GMRES options. |
|
logical, | intent(in), | optional | :: | transpose |
Whether or is being used. |