diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-04-19 21:24:04 -0300 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-04-19 21:24:04 -0300 |
commit | 11344d18210b582c547c697f86bfac97c360d6ca (patch) | |
tree | 66a71492750cb1d9739e31bfb39b900017b0a45c /fourier.cpp | |
parent | 0af6d40ac9de7214458222e22c5566f95aa98ce4 (diff) | |
download | code-11344d18210b582c547c697f86bfac97c360d6ca.tar.gz code-11344d18210b582c547c697f86bfac97c360d6ca.tar.bz2 code-11344d18210b582c547c697f86bfac97c360d6ca.zip |
Fixed energy
Diffstat (limited to 'fourier.cpp')
-rw-r--r-- | fourier.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fourier.cpp b/fourier.cpp index d637985..3821623 100644 --- a/fourier.cpp +++ b/fourier.cpp @@ -85,8 +85,8 @@ Real energy(const std::vector<Real>& C, const std::vector<Real>& R, unsigned p, Real e = 0; for (unsigned n = 0; n < C.size() / 4 -1; n++) { - Real h₂ₙ = Δτ; - Real h₂ₙ₊₁ = Δτ; + Real h₂ₙ = M_PI * Δτ; + Real h₂ₙ₊₁ = M_PI * Δτ; Real f₂ₙ = R[2*n] * df(λ, p, s, C[2*n]); Real f₂ₙ₊₁ = R[2*n+1] * df(λ, p, s, C[2*n+1]); Real f₂ₙ₊₂ = R[2*n+2] * df(λ, p, s, C[2*n+2]); |