diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Courant.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Courant.c b/src/Courant.c index ade4e53..3d7451e 100644 --- a/src/Courant.c +++ b/src/Courant.c @@ -59,6 +59,14 @@ void Time_Courant(CCTK_ARGUMENTS) (*courant_wave_speed)/sqrt((double) cctk_dim); } + if (CCTK_Equals(terminate, "time")||CCTK_Equals(terminate, "both")) + { + if (cctkGH->cctk_time + *courant_dt > cctk_final_time) + { + *courant_dt = (1 + 1.e-10) * (cctk_final_time - cctkGH->cctk_time); + } + } + /* Set the Cactus timestep */ if (!timestep_outonly) |