Linear Solve Operator Assumptions
LinearSolve.OperatorAssumptions
— TypeOperatorAssumptions(issquare = nothing; condition::OperatorCondition.T = IllConditioned)
Sets the operator A
assumptions used as part of the default algorithm
LinearSolve.OperatorCondition
— ModuleOperatorCondition
Specifies the assumption of matrix conditioning for the default linear solver choices. Condition number is defined as the ratio of eigenvalues. The numerical stability of many linear solver algorithms can be dependent on the condition number of the matrix. The condition number can be computed as:
using LinearAlgebra
cond(rand(100, 100))
However, in practice this computation is very expensive and thus not possible for most practical cases. Therefore, OperatorCondition lets one share to LinearSolve the expected conditioning. The higher the expected condition number, the safer the algorithm needs to be and thus there is a trade-off between numerical performance and stability. By default the method assumes the operator may be ill-conditioned for the standard linear solvers to converge (such as LU-factorization), though more extreme ill-conditioning or well-conditioning could be the case and specified through this assumption.
Condition Number Specifications
LinearSolve.OperatorCondition.IllConditioned
— ConstantOperatorCondition.IllConditioned
The default assumption of LinearSolve. Assumes that the operator can have minor ill-conditioning and thus needs to use safe algorithms.
LinearSolve.OperatorCondition.VeryIllConditioned
— ConstantOperatorCondition.VeryIllConditioned
Assumes that the operator can have fairly major ill-conditioning and thus the standard linear algebra algorithms cannot be used.
LinearSolve.OperatorCondition.SuperIllConditioned
— ConstantOperatorCondition.SuperIllConditioned
Assumes that the operator can have fairly extreme ill-conditioning and thus the most stable algorithm is used.
LinearSolve.OperatorCondition.WellConditioned
— ConstantOperatorCondition.WellConditioned
Assumes that the operator can have fairly contained conditioning and thus the fastest algorithm is used.