From fa567ab69ac4eaa70d703b573d5486267e649039 Mon Sep 17 00:00:00 2001 From: yye00 Date: Tue, 5 Oct 2004 20:01:05 +0000 Subject: Call CFL setting routines only once per refinement level. Calculate the grid spacing correctly even for dim>3. Correctly cast the values before passing them to printf. Print the newly calculated time step size, not the old time step size. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Time/trunk@62 5633253d-7678-4964-a54d-f87795f8ee59 --- src/Simple.c | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/src/Simple.c b/src/Simple.c index e809b7f..15ac2cf 100644 --- a/src/Simple.c +++ b/src/Simple.c @@ -21,32 +21,18 @@ void Time_Simple(CCTK_ARGUMENTS); void Time_Simple(CCTK_ARGUMENTS) { - DECLARE_CCTK_PARAMETERS - DECLARE_CCTK_ARGUMENTS + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; - CCTK_REAL min_spacing=0; + CCTK_REAL min_spacing; + int d; /* Calculate the minimum grid spacing */ - if (cctk_dim>=1) + min_spacing = cctk_delta_space[0]; + for (d=1; d=2) - { - min_spacing = (min_spacing=3) - { - min_spacing = (min_spacing=4) - { - CCTK_WARN(0,"Time Step not defined for greater than 4 dimensions"); + min_spacing = (min_spacingcctk_delta_time/cctkGH->cctk_timefac)); } - - - -- cgit v1.2.3