From 94e1485b6b94cb5ac55bc91a2a7a0510f555a039 Mon Sep 17 00:00:00 2001 From: allen Date: Fri, 15 Mar 2002 09:14:47 +0000 Subject: Fixed courant timestep based on wavespeed (thanks to Christian Ott) git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Time/trunk@46 5633253d-7678-4964-a54d-f87795f8ee59 --- src/Courant.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Courant.c b/src/Courant.c index 9687f7b..ade4e53 100644 --- a/src/Courant.c +++ b/src/Courant.c @@ -55,7 +55,8 @@ void Time_Courant(CCTK_ARGUMENTS) } else if (CCTK_Equals(timestep_method,"courant_speed")) { - *courant_dt = courant_fac/(*courant_wave_speed)/sqrt((double) cctk_dim); + *courant_dt = courant_fac*min_spacing/ + (*courant_wave_speed)/sqrt((double) cctk_dim); } /* Set the Cactus timestep */ -- cgit v1.2.3