]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix querying time steps in ARKODE.
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 3 Jun 2024 02:39:23 +0000 (20:39 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 11 Jun 2024 03:26:23 +0000 (21:26 -0600)
source/sundials/arkode.cc

index c899099a7127d0c818284bf2bd231ab075c6d44c..1b47776c1663f87fb6df6237777bd4d44a272cfb 100644 (file)
@@ -231,7 +231,13 @@ namespace SUNDIALS
                       time.get_step_number());
       }
     last_end_time = time.get_current_time();
-    return time.get_step_number();
+
+    long int   n_steps;
+    const auto status = ARKStepGetNumSteps(arkode_mem, &n_steps);
+    (void)status;
+    AssertARKode(status);
+
+    return n_steps;
   }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.