app2scale / hdmr-opt

3 stars 2 forks source link

Implement Cosine basis #9

Closed hkayabilisim closed 1 year ago

hkayabilisim commented 1 year ago

In addition to the default Legendre basis, it would be nice to select Cosine basis for calculations. The orthonormal cosine basis is defined as follows:

$$ \varphi_k(x) = \sqrt{\frac{1}{b_k-a_k} \frac{8\pi k}{\sin 4\pi k + 4\pi k}}\cos(2\pi k \frac{x - a_k}{b_k-a_k}) $$

The user will now have two options for orthonormal basis: "Legendre" and "Cosine".

The validation of the new cosine basis is here.

YunusKaratepe commented 1 year ago

Cosine basis now is a choice with the Legendre. You can switch between them on both command line and UI.