Skip to content

Use solve_kkt! instead of solve_kkt_system! - #577

Merged
amontoison merged 4 commits into
masterfrom
qm/solve_kkt
Feb 12, 2026
Merged

amontoison merged 4 commits into
masterfrom
qm/solve_kkt

Conversation

@amontoison

@amontoison amontoison commented Feb 9, 2026 •

Copy link
Copy Markdown
Member

We will be consistent with build_kkt! and factorize_kkt!.
I should check with François but I think that we forgot to rename some solve! in the documentation.

alexis@HP-Spectre:~/Bureau/git/MadNLP.jl$ grep -nr 'solve!' docs
docs/src/tutorials/warmstart.md:133:We first solve the problem using the function [`solve!`](@ref):
docs/src/tutorials/warmstart.md:135:results = MadNLP.solve!(solver)
docs/src/tutorials/warmstart.md:156:MadNLP.solve!(solver; mu_init=1e-7)
docs/src/tutorials/warmstart.md:167:    If we call the function [`solve!`](@ref) a second-time,
docs/src/tutorials/diag_kkt.jl:210:function MadNLP.solve!(kkt::DiagonalHessianKKTSystem, w::MadNLP.AbstractKKTVector)
docs/src/tutorials/diag_kkt.jl:212:    MadNLP.solve!(kkt.linear_solver, primal_dual(w))
docs/src/tutorials/diag_kkt.jl:213:    MadNLP.finish_aug_solve!(kkt, w)
docs/src/tutorials/kktsystem.md:143:The backsolve has to be implemented by the user in the function `solve!`.
docs/src/tutorials/kktsystem.md:411:the function `MadNLP.finish_aug_solve!`:
docs/src/tutorials/kktsystem.md:413:function MadNLP.solve!(kkt::DiagonalHessianKKTSystem, w::MadNLP.AbstractKKTVector)
docs/src/tutorials/kktsystem.md:415:    MadNLP.solve!(kkt.linear_solver, primal_dual(w))
docs/src/tutorials/kktsystem.md:416:    MadNLP.finish_aug_solve!(kkt, w)
docs/src/tutorials/kktsystem.md:422:    The function `solve!` takes as second argument a vector `w` being an
docs/src/tutorials/kktsystem.md:428:    When calling `solve!`, the values in the vector `w` are updated inplace.
docs/src/tutorials/kktsystem.md:430:    the function `solve!`. The function modifies the values directly in the vector `w`
docs/src/quickstart.md:198:results = MadNLP.solve!(solver)
docs/src/lib/ipm.md:17:`MadNLPSolver` instantiated, the function `solve!` is applied to solve the
docs/src/lib/ipm.md:22:solve!

I updated the documentation.

@github-actions

github-actions Bot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

Click here to view the suggested changes.
diff --git a/src/IPM/factorization.jl b/src/IPM/factorization.jl
index e8576aeb..c7124780 100644
--- a/src/IPM/factorization.jl
+++ b/src/IPM/factorization.jl
@@ -131,7 +131,7 @@ function solve_kkt!(
 end
 
 
-function solve_kkt!(kkt::SparseCondensedKKTSystem{T}, w::AbstractKKTVector)  where T
+function solve_kkt!(kkt::SparseCondensedKKTSystem{T}, w::AbstractKKTVector) where {T}
 
     (n,m) = size(kkt.jt_csc)
 

@codecov

codecov Bot commented Feb 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.19%. Comparing base (306a325) to head (cba801a).
⚠ïļ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/IPM/factorization.jl 62.50% 3 Missing ⚠ïļ
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #577   +/-   ##
=======================================
  Coverage   84.19%   84.19%           
=======================================
  Files          52       52           
  Lines        4675     4675           
=======================================
  Hits         3936     3936           
  Misses        739      739           

☔ View full report in Codecov by Sentry.
ðŸ“Ē Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄ïļ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amontoison
amontoison requested a review from frapac February 10, 2026 03:29
@amontoison
amontoison merged commit de45d2e into master Feb 12, 2026
11 of 12 checks passed
@amontoison
amontoison deleted the qm/solve_kkt branch February 12, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant