aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@5633253d-7678-4964-a54d-f87795f8ee59>2002-03-15 09:14:47 +0000
committerallen <allen@5633253d-7678-4964-a54d-f87795f8ee59>2002-03-15 09:14:47 +0000
commit94e1485b6b94cb5ac55bc91a2a7a0510f555a039 (patch)
treec790bf0c2ea799215050f1cfaf8d47351589567f
parent72f7dc2e7248eead5293ccbafe81fa9e63a3675b (diff)
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
-rw-r--r--src/Courant.c3
1 files changed, 2 insertions, 1 deletions
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 */