diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-04-20 20:36:56 -0300 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-04-20 20:36:56 -0300 |
commit | 9b17d16b5e1a6920adc9d08ac0123bdc257b3998 (patch) | |
tree | f4b3899aadc7c099d43892cf283e1b8f44e17eb6 | |
parent | 88d5c33164724434a41b9c5064aa786a3cb51029 (diff) | |
download | code-9b17d16b5e1a6920adc9d08ac0123bdc257b3998.tar.gz code-9b17d16b5e1a6920adc9d08ac0123bdc257b3998.tar.bz2 code-9b17d16b5e1a6920adc9d08ac0123bdc257b3998.zip |
-rw-r--r-- | log-fourier_integrator.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp index 412b4d9..5544f18 100644 --- a/log-fourier_integrator.cpp +++ b/log-fourier_integrator.cpp @@ -86,7 +86,11 @@ int main(int argc, char* argv[]) { /* Start from the exact solution for β = 0 */ for (unsigned n = 0; n < N; n++) { if (τ₀ > 0) { - Cₜ₋₁[n] = Γ₀ * (exp(-μₜ₋₁ * fft.t(n)) - μₜ₋₁ * τ₀ * exp(-fft.t(n) / τ₀)) / (μₜ₋₁ - pow(μₜ₋₁, 3) * pow(τ₀, 2)); + if (τ₀ == 2) { + Cₜ₋₁[n] = Γ₀ * exp(-fft.t(n) / 2) * (1 + fft.t(n) / 2); + } else { + Cₜ₋₁[n] = Γ₀ * (exp(-μₜ₋₁ * fft.t(n)) - μₜ₋₁ * τ₀ * exp(-fft.t(n) / τ₀)) / (μₜ₋₁ - pow(μₜ₋₁, 3) * pow(τ₀, 2)); + } } else { Cₜ₋₁[n] = Γ₀ * exp(-μₜ₋₁ * fft.t(n)) / μₜ₋₁; } |