Skip to content

Commit 524b39b

Browse files
authored
Initial infrastructure for Krylov-based linear solvers (#56)
* Initial infrastructure for Krylov-based linear solvers * Add unit tests for krylov solvers * Add SQD solver * Add unit tests for SQD solvers * Update docs * Allow for user-specified tolerances * Add compat entry for Krylov * Krylov solver for symmetric indefinite systems * Update docs and unify naming conventions * Tighten default tolerances
1 parent 68a3b96 commit 524b39b

File tree

7 files changed

+501
-3
lines changed

7 files changed

+501
-3
lines changed

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ authors = ["Mathieu Tanneau <[email protected]>"]
44
version = "0.5.1"
55

66
[deps]
7+
Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
78
LDLFactorizations = "40e66cde-538c-5869-a4ad-c39174c6795b"
89
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
910
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
@@ -15,6 +16,7 @@ SuiteSparse = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
1516
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1617

1718
[compat]
19+
Krylov = "0.5.2"
1820
LDLFactorizations = "^0.5"
1921
MathOptInterface = "~0.9.5"
2022
QPSReader = "0.2"

docs/src/manual/linear_systems.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The augmented system above can be reduced to the positive-definite _normal equat
3838
\Delta x &= (Θ^{-1} + R_{p})^{-1} (A^{T} \Delta y - \xi_{d})
3939
\end{array}
4040
```
41-
When selected, this reduction is transparent to the interior-point algorithm.
41+
If available and when selected, this reduction is transparent to the interior-point algorithm.
4242

4343
To enable the use of fast external libraries and/or specialized routines, the resolution of linear systems is performed by an [`AbstractKKTSolver`] object.
4444

@@ -52,4 +52,11 @@ Here is a list of currently supported linear solvers:
5252
| [`Dense_SymPosDef`](@ref) | `Real` | Normal equations | Dense / LAPACK | Cholesky
5353
| [`Cholmod_SymQuasDef`](@ref) | `Float64` | Augmented system | CHOLMOD | LDLᵀ
5454
| [`Cholmod_SymPosDef`](@ref) | `Float64` | Normal equations | CHOLMOD | Cholesky
55-
| [`LDLFact_SymQuasDef`](@ref) | `Real` | Augmented system | [LDLFactorizations.jl](https://github.com/JuliaSmoothOptimizers/LDLFactorizations.jl) | LDLᵀ
55+
| [`LDLFact_SymQuasDef`](@ref) | `Real` | Augmented system | [LDLFactorizations.jl](https://github.com/JuliaSmoothOptimizers/LDLFactorizations.jl) | LDLᵀ
56+
| [`KrylovSPDSolver`](@ref) | `Real` | Normal equations | [Krylov.jl](https://github.com/JuliaSmoothOptimizers/Krylov.jl) | Krylov
57+
| [`KrylovSIDSolver`](@ref) | `Real` | Augmented system[^1] | [Krylov.jl](https://github.com/JuliaSmoothOptimizers/Krylov.jl) | Krylov
58+
| [`KrylovSQDSolver`](@ref) | `Real` | Augmented system[^1] | [Krylov.jl](https://github.com/JuliaSmoothOptimizers/Krylov.jl) | Krylov
59+
60+
[^1]: [`KrylovSIDSolver`](@ref)s view the augmented system as a symmetric indefinite system,
61+
while [`KrylovSQDSolver`](@ref)s exploit its 2x2 structure and quasi-definite property.
62+
See the reference documentation for more details.

docs/src/reference/kkt_solvers.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,23 @@ Cholmod_SymPosDef
6565

6666
```@docs
6767
LDLFact_SymQuasDef
68+
```
69+
70+
## Krylov
71+
72+
!!! warning
73+
Iterative methods are still an experimental feature.
74+
Some numerical and performance issues should be expected.
75+
76+
77+
```@docs
78+
KrylovSPDSolver
79+
```
80+
81+
```@docs
82+
KrylovSIDSolver
83+
```
84+
85+
```@docs
86+
KrylovSQDSolver
6887
```

src/KKTSolver/KKTSolver.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ include("test.jl")
107107
include("lapack.jl")
108108
include("cholmod.jl")
109109
include("ldlfact.jl")
110+
include("krylov.jl")
110111

111112
"""
112113
default_options(Tv)

0 commit comments

Comments
 (0)