LLNL / libROM

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

IncrementalSVDFastUpdate with faster updates + bug fix in IncrementalSVD #227

Closed swsuh28 closed 1 year ago

swsuh28 commented 1 year ago

A new classIncrementalSVDBrand : IncrementalSVD has been added which exactly follows Brand's fast algorithm. It mostly follows IncrementalSVDFastUpdate, but has some modifications:

An additional test case has been added to unit_test/test_IncrementalSVDBrand to verify the revised version of the incremental SVD. It appends unit vectors to the incremental SVD object then checks if the computed basis and the singular values are either 0 or 1.

Finally, a bug in IncrementalSVD::buildIncrementalSVD has been fixed. Computing the norm of the projection error as

k = sqrt(u.u - 2.0*l.l + basisl.basisl)

should be avoided since this results in the catastrophic cancellation. It will lead to the incorrect estimate of the linear dependence of the new snapshot vector. Instead, one should compute it as

k = sqrt((u-basisl).(u-basisl)),

which remains double-precision.