Open pbrehmer opened 1 year ago
This is now mostly implemented in PR #34, however there is also one feature missing: There should be an object that does not contain the snapshots $\Psi_i$, nor the snapshot applications $H\Psi_i$, since these can become very memory intensive in realistic simulations. Then we could have a truncate(object, basis_trunc)
which would conveniently truncate all relevant quantities (aside from the problem-specific observables) in the online stage.
Another thing which should be added in the future is an example showcasing the truncation functionality in a somehow pedagogic way, i.e. something like a "Basis analysis during the online stage" example.
To check for the stability of a RB surrogate, it is essential to be able to remove snapshots from an
RBasis
and other offline quantities such asHamiltonianCache
andAffineDecomposition
s.With
AffineDecomposition
s we face the difficulty that currently only the $B^\dagger O_r B = V^\dagger \Upsilon^\dagger O_r \Upsilon V$ terms are computed. However, to truncate snapshot-wise, we need to access the $\Upsilon^\dagger O_r \Upsilon$ matrix elements.To solve this issue, we could include a keyword argument, such that
compress(ad::AffineDecomposition, basis::RBasis; return_matrix_elements=false)
. Ifreturn_matrix_elements=true
, the function would return also anAffineDecomposition
with untransformed matrix elements as terms.