diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-10 16:10:23 -0300 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-05-10 16:10:23 -0300 |
commit | e9f047834b2433fed2ff9aa486d0b430b82d039c (patch) | |
tree | a384ce627a792a90143561cc77a77ece904cbee8 | |
parent | c57e3fee38f36fdaf03e2b9c21be635594a1f704 (diff) | |
download | code-e9f047834b2433fed2ff9aa486d0b430b82d039c.tar.gz code-e9f047834b2433fed2ff9aa486d0b430b82d039c.tar.bz2 code-e9f047834b2433fed2ff9aa486d0b430b82d039c.zip |
All values zero after first
-rw-r--r-- | log-fourier_integrator.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/log-fourier_integrator.cpp b/log-fourier_integrator.cpp index e4564c6..22f63e6 100644 --- a/log-fourier_integrator.cpp +++ b/log-fourier_integrator.cpp @@ -147,9 +147,11 @@ int main(int argc, char* argv[]) { Real C₀ = Cₜ₊₁[0]; + bool trigger = false; for (unsigned i = 0; i < N; i++) { - if (Cₜ₊₁[i] < 0) { + if (Cₜ₊₁[i] < 0 || trigger) { Cₜ₊₁[i] = 0; + trigger = true; } if (Cₜ₊₁[i] > 1) { Cₜ₊₁[i] = 1; |