pymor.solvers.generic
¶
This module contains some iterative linear solvers which only use the Operator
interface.
Module Contents¶
- class pymor.solvers.generic.LGMRESSolver(tol=1e-05, maxiter=1000, inner_m=39, outer_k=3, check_finite=True)[source]¶
Bases:
pymor.solvers.interface.Solver
Equation solver.
Solves operator equations of the form
\[A(U; \mu) = V\]The operator \(A\) can be linear or non-linear. When \(A\) is linear, a solver can also be used to solve the adjoint equation
\[A^H(V; \mu) = U\]for \(U\).
When
least_squares
isTrue
, the equations are solved in a least-squares sense:\[\operatorname{argmin}_{U} \|A(U; \mu) - V\|^2 \quad\text{or}\quad \operatorname{argmin}_{V} \|A^H(V; \mu) - U\|^2\]Solvers will typically only work for certain classes of
Operators
. In most cases, solvers are invoked by theapply_inverse
andapply_inverse_adjoint
methods ofOperators
. If anOperator
has no associated solver,DefaultSolver
is used.
- class pymor.solvers.generic.LSMRSolver(damp=0.0, atol=1e-06, btol=1e-06, conlim=100000000.0, maxiter=None, show=False, check_finite=True)[source]¶
Bases:
pymor.solvers.interface.Solver
Equation solver.
Solves operator equations of the form
\[A(U; \mu) = V\]The operator \(A\) can be linear or non-linear. When \(A\) is linear, a solver can also be used to solve the adjoint equation
\[A^H(V; \mu) = U\]for \(U\).
When
least_squares
isTrue
, the equations are solved in a least-squares sense:\[\operatorname{argmin}_{U} \|A(U; \mu) - V\|^2 \quad\text{or}\quad \operatorname{argmin}_{V} \|A^H(V; \mu) - U\|^2\]Solvers will typically only work for certain classes of
Operators
. In most cases, solvers are invoked by theapply_inverse
andapply_inverse_adjoint
methods ofOperators
. If anOperator
has no associated solver,DefaultSolver
is used.
- class pymor.solvers.generic.LSQRSolver(damp=0.0, atol=1e-06, btol=1e-06, conlim=100000000.0, iter_lim=None, show=False, check_finite=True)[source]¶
Bases:
pymor.solvers.interface.Solver
Equation solver.
Solves operator equations of the form
\[A(U; \mu) = V\]The operator \(A\) can be linear or non-linear. When \(A\) is linear, a solver can also be used to solve the adjoint equation
\[A^H(V; \mu) = U\]for \(U\).
When
least_squares
isTrue
, the equations are solved in a least-squares sense:\[\operatorname{argmin}_{U} \|A(U; \mu) - V\|^2 \quad\text{or}\quad \operatorname{argmin}_{V} \|A^H(V; \mu) - U\|^2\]Solvers will typically only work for certain classes of
Operators
. In most cases, solvers are invoked by theapply_inverse
andapply_inverse_adjoint
methods ofOperators
. If anOperator
has no associated solver,DefaultSolver
is used.
- pymor.solvers.generic.lgmres(A, b, x0=None, tol=1e-05, maxiter=1000, M=None, callback=None, inner_m=30, outer_k=3, outer_v=None, store_outer_Av=True)[source]¶