pymor.algorithms.genericsolvers
¶
This module contains some iterative linear solvers which only use the Operator
interface
Module Contents¶
- pymor.algorithms.genericsolvers.apply_inverse(op, V, initial_guess=None, options=None, least_squares=False, check_finite=True, default_solver='generic_lgmres', default_least_squares_solver='generic_least_squares_lsmr')[source]¶
Solve linear equation system.
Applies the inverse of
op
to the vectors inV
using a generic iterative solver.Parameters
- op
The linear, non-parametric
Operator
to invert.- V
VectorArray
of right-hand sides for the equation system.- initial_guess
VectorArray
with the same length asV
containing initial guesses for the solution. Some implementations ofapply_inverse
may ignore this parameter. IfNone
a solver-dependent default is used.- options
The
solver_options
to use (seesolver_options
).- least_squares
If
True
, return least squares solution.- check_finite
Test if solution only contains finite values.
- default_solver
Default solver to use (generic_lgmres, generic_least_squares_lsmr, generic_least_squares_lsqr).
- default_least_squares_solver
Default solver to use for least squares problems (generic_least_squares_lsmr, generic_least_squares_lsqr).
Returns
VectorArray
of the solution vectors.
- pymor.algorithms.genericsolvers.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.algorithms.genericsolvers.lsmr(A, b, damp=0.0, atol=1e-06, btol=1e-06, conlim=100000000.0, maxiter=None, show=False)[source]¶
- pymor.algorithms.genericsolvers.lsqr(A, b, damp=0.0, atol=1e-08, btol=1e-08, conlim=100000000.0, iter_lim=None, show=False)[source]¶
- pymor.algorithms.genericsolvers.solver_options(lgmres_tol=1e-05, lgmres_maxiter=1000, lgmres_inner_m=39, lgmres_outer_k=3, least_squares_lsmr_damp=0.0, least_squares_lsmr_atol=1e-06, least_squares_lsmr_btol=1e-06, least_squares_lsmr_conlim=100000000.0, least_squares_lsmr_maxiter=None, least_squares_lsmr_show=False, least_squares_lsqr_damp=0.0, least_squares_lsqr_atol=1e-06, least_squares_lsqr_btol=1e-06, least_squares_lsqr_conlim=100000000.0, least_squares_lsqr_iter_lim=None, least_squares_lsqr_show=False)[source]¶
Returns available solvers with default
solver_options
.Parameters
- lgmres_tol
- lgmres_maxiter
- lgmres_inner_m
- lgmres_outer_k
- least_squares_lsmr_damp
- least_squares_lsmr_atol
- least_squares_lsmr_btol
- least_squares_lsmr_conlim
- least_squares_lsmr_maxiter
- least_squares_lsmr_show
- least_squares_lsqr_damp
- least_squares_lsqr_atol
- least_squares_lsqr_btol
- least_squares_lsqr_conlim
- least_squares_lsqr_iter_lim
- least_squares_lsqr_show
Returns
A dict of available solvers with default
solver_options
.