summaryrefslogtreecommitdiff
path: root/log-fourier_integrator.cpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2025-05-08 18:11:35 -0300
committerJaron Kent-Dobias <jaron@kent-dobias.com>2025-05-08 18:11:35 -0300
commit73f4eaba3a08a5e1b85512868c3916c7fd4e4571 (patch)
tree999ceaa31419e37590309e3ccb4a8e9ec0a9c536 /log-fourier_integrator.cpp
parent21a99431f02e799de9a811f9f02ad006fe27df6d (diff)
downloadcode-73f4eaba3a08a5e1b85512868c3916c7fd4e4571.tar.gz
code-73f4eaba3a08a5e1b85512868c3916c7fd4e4571.tar.bz2
code-73f4eaba3a08a5e1b85512868c3916c7fd4e4571.zip
Updated to work with shift
Diffstat (limited to 'log-fourier_integrator.cpp')
-rw-r--r--log-fourier_integrator.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp
index 55f358a..44ccce1 100644
--- a/log-fourier_integrator.cpp
+++ b/log-fourier_integrator.cpp
@@ -12,22 +12,23 @@ int main(int argc, char* argv[]) {
/* Log-Fourier parameters */
unsigned log2n = 8;
Real Δτ = 0.1;
- Real k = 0.1;
+ Real k = -0.01;
+ Real shift = 0.4;
/* Iteration parameters */
- Real ε = 1e-14;
+ Real ε = 1e-15;
Real γ₀ = 1;
- Real x = 0.5;
+ Real x = 1;
Real β₀ = 0;
- Real βₘₐₓ = 0.7;
+ Real βₘₐₓ = 20;
Real Δβ = 0.01;
bool loadData = false;
- unsigned stepsToRespond = 1000;
- unsigned pad = 4;
+ unsigned stepsToRespond = 1e7;
+ unsigned pad = 2;
int opt;
- while ((opt = getopt(argc, argv, "p:s:2:T:t:b:d:g:k:D:e:0:lS:x:P:")) != -1) {
+ while ((opt = getopt(argc, argv, "p:s:2:T:t:b:d:g:k:D:e:0:lS:x:P:h:")) != -1) {
switch (opt) {
case 'p':
p = atoi(optarg);
@@ -56,6 +57,9 @@ int main(int argc, char* argv[]) {
case 'D':
Δτ = atof(optarg);
break;
+ case 'h':
+ shift = atof(optarg);
+ break;
case 'e':
ε = atof(optarg);
break;
@@ -81,7 +85,7 @@ int main(int argc, char* argv[]) {
unsigned N = pow(2, log2n);
- LogarithmicFourierTransform fft(N, k, Δτ, pad);
+ LogarithmicFourierTransform fft(N, k, Δτ, pad, shift);
Real Γ₀ = 1;
Real μₜ₋₁ = Γ₀;
@@ -186,7 +190,7 @@ int main(int argc, char* argv[]) {
std::cerr << "\x1b[2K" << "\r";
std::cerr << β << " " << μₜ << " " << Ĉₜ[0].real() << " " << E << " " << γ << std::endl;
- logFourierSave(Cₜ, Rₜ, Ĉₜ, Ȓₜ, p, s, λ, τ₀, β, log2n, Δτ, k);
+ logFourierSave(Cₜ, Rₜ, Ĉₜ, Ȓₜ, p, s, λ, τ₀, β, log2n, Δτ, shift);
β += Δβ;
Cₜ₋₁ = Cₜ;