From 72f7dc2e7248eead5293ccbafe81fa9e63a3675b Mon Sep 17 00:00:00 2001 From: tradke Date: Wed, 2 Jan 2002 17:20:16 +0000 Subject: Removed unused variable. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Time/trunk@42 5633253d-7678-4964-a54d-f87795f8ee59 --- src/Courant.c | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/src/Courant.c b/src/Courant.c index ea1a6cc..9687f7b 100644 --- a/src/Courant.c +++ b/src/Courant.c @@ -2,9 +2,10 @@ @file Courant.c @date September 4 1999 @author Gabrielle Allen - @desc - Specification of timestep using Courant condition - @enddesc + @desc + Specification of timestep using Courant condition + @enddesc + @version $Id$ @@*/ #include @@ -22,31 +23,26 @@ void Time_Courant(CCTK_ARGUMENTS); void Time_Courant(CCTK_ARGUMENTS) { + CCTK_REAL min_spacing; DECLARE_CCTK_PARAMETERS DECLARE_CCTK_ARGUMENTS - CCTK_REAL min_spacing=0; - - char *message; /* Calculate the minimum grid spacing */ - if (cctk_dim>=1) - { - min_spacing = cctk_delta_space[0]; - } + min_spacing = cctk_delta_space[0]; if (cctk_dim>=2) { min_spacing = (min_spacing=3) { min_spacing = (min_spacing=4) { CCTK_WARN(0,"Time Step not defined for greater than 4 dimensions"); @@ -55,11 +51,11 @@ void Time_Courant(CCTK_ARGUMENTS) /* Calculate the courant timestep */ if (CCTK_Equals(timestep_method,"courant_time")) { - *courant_dt = courant_fac*(*courant_min_time)/sqrt((CCTK_REAL )cctk_dim); + *courant_dt = courant_fac*(*courant_min_time)/sqrt((double)cctk_dim); } else if (CCTK_Equals(timestep_method,"courant_speed")) { - *courant_dt = courant_fac/(*courant_wave_speed)/sqrt((CCTK_REAL )cctk_dim); + *courant_dt = courant_fac/(*courant_wave_speed)/sqrt((double) cctk_dim); } /* Set the Cactus timestep */ @@ -74,11 +70,4 @@ void Time_Courant(CCTK_ARGUMENTS) cctkGH->cctk_delta_time = dtfac*min_spacing; CCTK_VInfo(CCTK_THORNSTRING,"Courant timestep would be %f",*courant_dt); } - - - - } - - - -- cgit v1.2.3