reformat and revise subspace drift#146
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #146 +/- ##
==========================================
- Coverage 88.37% 86.59% -1.78%
==========================================
Files 36 36
Lines 3956 3917 -39
==========================================
- Hits 3496 3392 -104
- Misses 460 525 +65 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I had forgotten about this PR. Feel free to send me reminders occasionally. I won't have time this week but will try to make time next week. |
|
Hi @Jutho , just a friendly reminder regarding my PR when you have a moment. Please let me know if there’s anything I should update or improve. Thanks! |
|
Second, I would like to explain why I did not use the relative change in the vector norm as the criterion for triggering reorthogonalization. There are two main considerations:
Admittedly, I do not yet have a definitive conclusion on what the mathematically optimal criterion should be. In the current implementation, I have tentatively adopted the condition I should clarify that this threshold is based on my practical experience and numerical intuition encountered during testing, rather than a rigorous theoretical derivation. My goal was to provide a robust safeguard for these edge cases while maintaining computational efficiency. |
|
Third, regarding the |
Upon further reflection, I must apologize as my previous test case for reorthogonalization was not sufficiently representative. After conducting more extensive numerical experiments, I found that while an additional |
|
Hi @Jutho , just a friendly reminder regarding my PR when you have a moment. Please let me know if there’s anything I should update or improve. Thanks! |
|
Hi @Jutho, just a friendly reminder regarding my PR when you have a moment. Please let me know if there’s anything I should update or improve. Thanks! |
Co-authored-by: Jutho <Jutho@users.noreply.github.com>

I have fixed the issue of subspace drift described in (#143). The cause of the problem, my solution, and the results can be found in (#143 (comment)). Specifically, I used DGKS reorthogonalization to improve the accuracy of
block_qr!, ensuring that the vectors within theQproduced byblock_qr!are strictly orthogonal (“Reorthogonalization and Stable Algorithms for Updating the Gram–Schmidt QR Factorization”, "Numerical Methods for Least Squares Problems"). Then, by projection, I removed components alongVfrom theQobtained inblock_qr!to guarantee thatQis orthogonal toV. Afterwards, I appliedblock_qr!again toQto ensure orthogonality among its vectors. It can be proven that this secondblock_qr!preserves the subspace at machine precision, resulting in a block that lies strictly in the orthogonal complement ofVand whose vectors are strictly mutually orthogonal.