From d93dc5dba5d9e00298038c3dac3b51aa554d2ca8 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Sat, 10 May 2025 13:46:24 -0300 Subject: New time scaling --- log_get_energy.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'log_get_energy.cpp') diff --git a/log_get_energy.cpp b/log_get_energy.cpp index b01034c..a183861 100644 --- a/log_get_energy.cpp +++ b/log_get_energy.cpp @@ -16,7 +16,7 @@ int main(int argc, char* argv[]) { Real Δτ = 0.1; Real k = 0.1; unsigned pad = 2; - Real shift = 0.5; + Real logShift = 0; /* Iteration parameters */ Real β₀ = 0; @@ -25,7 +25,7 @@ int main(int argc, char* argv[]) { int opt; - while ((opt = getopt(argc, argv, "p:s:2:T:t:b:d:k:D:0:h:")) != -1) { + while ((opt = getopt(argc, argv, "p:s:2:T:t:b:d:k:h:D:0:")) != -1) { switch (opt) { case 'p': p = atoi(optarg); @@ -49,7 +49,7 @@ int main(int argc, char* argv[]) { k = atof(optarg); break; case 'h': - shift = atof(optarg); + logShift = atof(optarg); break; case 'D': Δτ = atof(optarg); @@ -63,8 +63,10 @@ int main(int argc, char* argv[]) { } unsigned N = pow(2, log2n); + Real Γ₀ = 1; + Real μ₀ = τ₀ > 0 ? (sqrt(1+4*Γ₀*τ₀)-1)/(2*τ₀) : Γ₀; - LogarithmicFourierTransform fft(N, k, Δτ, pad, shift); + LogarithmicFourierTransform fft(N, k, Δτ, pad, μ₀ * pow(10, logShift)); std::vector C(N); std::vector R(N); @@ -76,7 +78,7 @@ int main(int argc, char* argv[]) { std::cout << std::setprecision(16); while (β += Δβ, β <= βₘₐₓ) { - if (logFourierLoad(C, R, Ct, Rt, p, s, λ, τ₀, β, log2n, Δτ, shift)) { + if (logFourierLoad(C, R, Ct, Rt, p, s, λ, τ₀, β, log2n, Δτ, logShift)) { Real e = energy(fft, C, R, p, s, λ, β); -- cgit v1.2.3-70-g09d2