Fix FSILS RCS diagonal cancellation and general block scaling - #647
Merged
Merged
Conversation
Collaborator
Author
|
adding @kko27 and @michelebucelli to review this PR since RCS preconditioning is occasionally used with CEP physics. Mostly want to know if we should add the unit test for regression assessments or instead remove that file and just have the bug fix only in this PR. |
kko27
approved these changes
Sep 15, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #647 +/- ##
==========================================
+ Coverage 73.08% 73.41% +0.32%
==========================================
Files 268 269 +1
Lines 40270 40337 +67
Branches 6738 6755 +17
==========================================
+ Hits 29433 29612 +179
+ Misses 10594 10482 -112
Partials 243 243 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
michelebucelli
left a comment
Collaborator
There was a problem hiding this comment.
@zasexton I have no comments besides the one about detailing the test rationale a bit more.
michelebucelli
approved these changes
Sep 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current situation
Fixes #646.
The FSILS row and column scaling (RCS) preconditioner evaluates
(a - 1.0) + 1.0for unconstrained matrix diagonals while applying Dirichlet conditions. In double precision, this perturbs small coefficients and can erase them before scaling begins. The resulting operator no longer represents the assembled system, which can degrade convergence and solution accuracy across physics using this shared preconditioner.For block sizes greater than four, column scaling also skips the last row of each block, and the row-maximum calculation omits the first entry. The latter can produce infinite scaling weights when a constrained diagonal is the only nonzero entry in its row.
Release Notes
Documentation
The numerical cancellation guard is documented inline in
Code/Source/linear_solver/precond.cpp. The regression test documents its sparse matrix stencil and scale-normalized error checks.Testing
1,1e-11,1e-15,1e-17, and1e-20, and excluded, partially constrained, and fully constrained boundary faces.spiral_BO_2d; and the StokesP1P1/N004manufactured solution.Code of Conduct & Contributing Guidelines