Conversation
|
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. |
There was a problem hiding this comment.
Seeing that this is the first unit test we have for the linear solver, maybe this could be a separate issue with a dedicated plan in creating a usable template.
There was a problem hiding this comment.
I do not think this needs to be in a separate PR. I do think that it would be nice to have a bit of documentation of what the test is doing so that it can be more easily adopted as a template/example to build other tests on.
I would recommend to expand the test's Doxygen documentation for this (Doxygen has a @test command for this purpose, I believe).
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #647 +/- ##
==========================================
+ Coverage 73.08% 73.44% +0.35%
==========================================
Files 268 269 +1
Lines 40270 40338 +68
Branches 6738 6755 +17
==========================================
+ Hits 29433 29625 +192
+ Misses 10594 10469 -125
- Partials 243 244 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
michelebucelli
left a comment
There was a problem hiding this comment.
@zasexton I have no comments besides the one about detailing the test rationale a bit more.
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