mfherbst / ReducedBasis.jl

Reduced basis methods for parametrised eigenproblems
https://mfherbst.github.io/ReducedBasis.jl/stable/
MIT License
14 stars 0 forks source link

Generalize `coefficient_map` from `AffineDecomposition`s #40

Closed pbrehmer closed 1 year ago

pbrehmer commented 1 year ago

There are affine decompositions, such as the magnetization $2L^{-1} \sum_iS_i^z$, that don't have a parameter-dependent coefficients. In these cases it would be sensible to have a coefficient_map that is just a vector of coefficients instead of a function returning that vector.

Then it would be possible to dispatch compress on AffineDecomposition{T, <:AbstractArray{<:Number}} which would return the (constant) compressed matrix directly instead of another AffineDecomposition.

We would then also avoid the inconvenient m_reduced = m([]) definitions in the docs examples.