pymor.solvers.default
¶
Module Contents¶
- class pymor.solvers.default.DefaultSolver(try_to_matrix=True)[source]¶
Bases:
pymor.solvers.interface.Solver
Default
Solver
.This
Solver
is used byapply_inverse
andapply_inverse_adjoint
when theOperator
has nosolver
and no solver is specified in the method call.DefaultSolver
uses the following strategy:Try to call
operator._apply_inverse
.Assemble
operator
. Tryassembled_operator._apply_inverse
.If
operator
is linear, try to convertassembled_operator
to aNumpyMatrixOperator
usingto_matrix
and callapply_inverse
on the converted operator.If
operator
is non-linear, useNewtonSolver
.
- Parameters:
try_to_matrix – If
False
, do not try to convert linear operators toNumpyMatrixOperator
. Fail instead.