LLNL / libROM

Model reduction library with an emphasis on large scale parallelism and linear subspace methods
https://www.librom.net
Other
201 stars 36 forks source link

Double pass Gram-Schmidt methods #255

Closed cval26 closed 8 months ago

cval26 commented 9 months ago

Adds the option of reorthogonalizing each column of the input matrix to the orthogonalize() and orthogonalize_last() methods of the Matrix class.

The option is added as an input argument which is false by default, thereby not affecting the methods' default behavior. The only change to the existing code is that the orthogonalizing part of the methods is run twice for each column, if the double pass option is true.

Both the classical and modified Gram-Schmidt numerical algorithms are prone to loss of orthogonality, which can result in output matrices that deviate significantly from being orthonormal. Orthogonalizing each column twice has been shown to mitigate this issue, see Giraud, Langou & Rozloznik (2005).

Adding the double-pass option is motivated by its use in LaghosROM, where it's been found to successfully address the loss of orthogonality issue, improving accuracy.

cval26 commented 9 months ago

The git diff tracker seems to be confused by the changes made in the iteration loops. By viewing the files in split mode, you can see that the only change is adding a loop over the orthogonalizing part of the code and an exit condition based on the double_pass flag.

This should make reviewing much more straightforward.

cval26 commented 9 months ago

@dylan-copeland @siuwuncheung Your review of this PR is still pending.