diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-16 09:22:21 -0300 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-16 09:22:21 -0300 |
commit | 0dcab410621ff56ee3a51eb8cda00f9d2ba2609d (patch) | |
tree | 7798fd31673f000a5a9cbd8b58f403bfe8bbd583 /log-fourier_integrator.cpp | |
parent | 461e93ad25b61bc5e1ce8aaf9113fc4fd7c4b626 (diff) | |
download | code-0dcab410621ff56ee3a51eb8cda00f9d2ba2609d.tar.gz code-0dcab410621ff56ee3a51eb8cda00f9d2ba2609d.tar.bz2 code-0dcab410621ff56ee3a51eb8cda00f9d2ba2609d.zip |
Added option to shift time even more
Diffstat (limited to 'log-fourier_integrator.cpp')
-rw-r--r-- | log-fourier_integrator.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp index b819456..1402678 100644 --- a/log-fourier_integrator.cpp +++ b/log-fourier_integrator.cpp @@ -14,6 +14,7 @@ int main(int argc, char* argv[]) { Real Δτ = 0.1; Real k = -0.01; Real logShift = 0; + bool shiftSquare = false; /* Iteration parameters */ Real ε = 1e-15; @@ -27,7 +28,7 @@ int main(int argc, char* argv[]) { int opt; - while ((opt = getopt(argc, argv, "p:s:2:T:t:b:d:k:D:e:0:lg:x:P:h:")) != -1) { + while ((opt = getopt(argc, argv, "p:s:2:T:t:b:d:k:D:e:0:lg:x:P:h:S")) != -1) { switch (opt) { case 'p': p = atoi(optarg); @@ -74,6 +75,9 @@ int main(int argc, char* argv[]) { case 'l': loadData = true; break; + case 'S': + shiftSquare = true; + break; default: exit(1); } @@ -84,7 +88,9 @@ int main(int argc, char* argv[]) { Real Γ₀ = 1; Real μ₀ = τ₀ > 0 ? (sqrt(1+4*Γ₀*τ₀)-1)/(2*τ₀) : Γ₀; - LogarithmicFourierTransform fft(N, k, Δτ, pad, μ₀ * pow(10, logShift)); + Real shift = μ₀ * pow(10, logShift); + if (shiftSquare) shift *= μ₀; + LogarithmicFourierTransform fft(N, k, Δτ, pad, shift); std::cerr << "Starting, μ₀ = " << μ₀ << ", range " << fft.t(0) << " " << fft.t(N-1) << std::endl; |