From 9ce5e8b399f29d932d52fd53ac903a106a267259 Mon Sep 17 00:00:00 2001
From: Jaron Kent-Dobias <jaron@kent-dobias.com>
Date: Wed, 30 Apr 2025 11:35:26 -0300
Subject: Set pad from the command line

---
 log-fourier.hpp            | 2 +-
 log-fourier_integrator.cpp | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/log-fourier.hpp b/log-fourier.hpp
index 97c0e15..f0b53ef 100644
--- a/log-fourier.hpp
+++ b/log-fourier.hpp
@@ -42,4 +42,4 @@ std::tuple<std::vector<Complex>, std::vector<Complex>> RddfCtdfCt(LogarithmicFou
 
 Real estimateZ(LogarithmicFourierTransform& fft, const std::vector<Real>& C, const std::vector<Complex>& Ct, const std::vector<Real>& R, const std::vector<Complex>& Rt, unsigned p, unsigned s, Real λ, Real τ₀, Real β);
 
-Real energy(const LogarithmicFourierTransform& fft, std::vector<Real>&  C, const std::vector<Real>& R, unsigned p, unsigned s, Real λ, Real β);
+Real energy(const LogarithmicFourierTransform& fft, std::vector<Real>& C, const std::vector<Real>& R, unsigned p, unsigned s, Real λ, Real β);
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp
index 7ac76b5..55f358a 100644
--- a/log-fourier_integrator.cpp
+++ b/log-fourier_integrator.cpp
@@ -23,10 +23,11 @@ int main(int argc, char* argv[]) {
   Real Δβ = 0.01;
   bool loadData = false;
   unsigned stepsToRespond = 1000;
+  unsigned pad = 4;
 
   int opt;
 
-  while ((opt = getopt(argc, argv, "p:s:2:T:t:b:d:g:k:D:e:0:lS:x:")) != -1) {
+  while ((opt = getopt(argc, argv, "p:s:2:T:t:b:d:g:k:D:e:0:lS:x:P:")) != -1) {
     switch (opt) {
     case 'p':
       p = atoi(optarg);
@@ -64,6 +65,9 @@ int main(int argc, char* argv[]) {
     case 'x':
       x = atof(optarg);
       break;
+    case 'P':
+      pad = atoi(optarg);
+      break;
     case 'l':
       loadData = true;
       break;
@@ -77,7 +81,7 @@ int main(int argc, char* argv[]) {
 
   unsigned N = pow(2, log2n);
 
-  LogarithmicFourierTransform fft(N, k, Δτ, 4);
+  LogarithmicFourierTransform fft(N, k, Δτ, pad);
 
   Real Γ₀ = 1;
   Real μₜ₋₁ = Γ₀;
-- 
cgit v1.2.3-70-g09d2