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 is True, 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 the apply_inverse and apply_inverse_adjoint methods of Operators. If an Operator 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 is True, 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 the apply_inverse and apply_inverse_adjoint methods of Operators. If an Operator has no associated solver, DefaultSolver is used.

least_squares = True[source]
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 is True, 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 the apply_inverse and apply_inverse_adjoint methods of Operators. If an Operator has no associated solver, DefaultSolver is used.

least_squares = True[source]
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]
pymor.solvers.generic.lsmr(A, b, damp=0.0, atol=1e-06, btol=1e-06, conlim=100000000.0, maxiter=None, show=False)[source]
pymor.solvers.generic.lsqr(A, b, damp=0.0, atol=1e-08, btol=1e-08, conlim=100000000.0, iter_lim=None, show=False)[source]