diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-19 12:17:36 -0300 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-19 12:17:36 -0300 |
commit | 7c44546421ed1c4bc6e5135ec90bccac2a0ac436 (patch) | |
tree | 9ac0e633f7b7a9e356ae8e53a2801365bc55de35 /log-fourier.cpp | |
parent | 13bfd9e1cdfe3bc2cc109af67e0648516b5787ea (diff) | |
download | code-7c44546421ed1c4bc6e5135ec90bccac2a0ac436.tar.gz code-7c44546421ed1c4bc6e5135ec90bccac2a0ac436.tar.bz2 code-7c44546421ed1c4bc6e5135ec90bccac2a0ac436.zip |
Cleaned up header inclusions, and renamed some p-spin functions
Diffstat (limited to 'log-fourier.cpp')
-rw-r--r-- | log-fourier.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/log-fourier.cpp b/log-fourier.cpp index 07429f1..16a7f3f 100644 --- a/log-fourier.cpp +++ b/log-fourier.cpp @@ -1,8 +1,7 @@ #include "log-fourier.hpp" #include "p-spin.hpp" -#include <complex> + #include <fstream> -#include <types.hpp> Complex Γ(Complex z) { gsl_sf_result logΓ; @@ -186,8 +185,8 @@ std::tuple<std::vector<Complex>, std::vector<Complex>> ΣD(LogarithmicFourierTra std::vector<Real> Σ(C.size()); Real β² = std::pow(β, 2); for (unsigned n = 0; n < C.size(); n++) { - D[n] = β² * df(λ, p, s, C[n]); - Σ[n] = β² * R[n] * ddf(λ, p, s, C[n]); + D[n] = β² * ∂f(λ, p, s, C[n]); + Σ[n] = β² * R[n] * ∂∂f(λ, p, s, C[n]); } std::vector<Complex> Σhat = fft.fourier(Σ, false); std::vector<Complex> Dhat = fft.fourier(D, true); @@ -207,7 +206,7 @@ Real energy(const LogarithmicFourierTransform& fft, const std::vector<Real>& C, for (unsigned n = 0; n < C.size(); n++) { if (C[n] > 1 || R[n] > 1) n₀ = n % 2 == 0 ? n / 2 : (n + 1) / 2; } - Real E = fft.t(2*n₀) * df(λ, p, s, 1); + Real E = fft.t(2*n₀) * ∂f(λ, p, s, 1); for (unsigned n = n₀; n < C.size()/2-1; n++) { Real R₂ₙ = R[2*n]; Real R₂ₙ₊₁ = R[2*n+1]; @@ -220,9 +219,9 @@ Real energy(const LogarithmicFourierTransform& fft, const std::vector<Real>& C, Real h₂ₙ = fft.t(2*n+1) - fft.t(2*n); Real h₂ₙ₊₁ = fft.t(2*n+2) - fft.t(2*n+1); - Real f₂ₙ = R₂ₙ * df(λ, p, s, C₂ₙ); - Real f₂ₙ₊₁ = R₂ₙ₊₁ * df(λ, p, s, C₂ₙ₊₁); - Real f₂ₙ₊₂ = R₂ₙ₊₂ * df(λ, p, s, C₂ₙ₊₂); + Real f₂ₙ = R₂ₙ * ∂f(λ, p, s, C₂ₙ); + Real f₂ₙ₊₁ = R₂ₙ₊₁ * ∂f(λ, p, s, C₂ₙ₊₁); + Real f₂ₙ₊₂ = R₂ₙ₊₂ * ∂f(λ, p, s, C₂ₙ₊₂); E += (h₂ₙ + h₂ₙ₊₁) / 6 * ( (2 - h₂ₙ₊₁ / h₂ₙ) * f₂ₙ |