From 89791be6d65c4e7ae757599fe1df70a6155740dd Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Mon, 3 Feb 2025 12:27:16 -0500 Subject: [PATCH] Print lyapunov if it is the last step --- src/lyapunov.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lyapunov.c b/src/lyapunov.c index 1cef444..b041a83 100644 --- a/src/lyapunov.c +++ b/src/lyapunov.c @@ -137,7 +137,8 @@ int lyapunov( } // QR decomposition - if((lyapunov_trigger==LYAPUNOV_TRIGGER_TIME && time>(n+1)*lyapunov_reset) || (lyapunov_trigger==LYAPUNOV_TRIGGER_SIZE && norm>lyapunov_reset)){ + // Do it also if it is the last step + if((lyapunov_trigger==LYAPUNOV_TRIGGER_TIME && time>(n+1)*lyapunov_reset) || (lyapunov_trigger==LYAPUNOV_TRIGGER_SIZE && norm>lyapunov_reset) || time>=final_time){ n++; // QR decomposition