aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlanfer <lanfer@5633253d-7678-4964-a54d-f87795f8ee59>1999-10-20 08:42:26 +0000
committerlanfer <lanfer@5633253d-7678-4964-a54d-f87795f8ee59>1999-10-20 08:42:26 +0000
commitadee3e97c377b390fe318d0d8b888b96db8554b3 (patch)
tree274bb7d20c58c1d937493f9d4832646cc251423d
parent9ad75f1b1648057d41cb96409acd05c19bb01aa9 (diff)
the global min operation on min_spacing (commented out for now)
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Time/trunk@10 5633253d-7678-4964-a54d-f87795f8ee59
-rw-r--r--src/Courant.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/Courant.c b/src/Courant.c
index 82f3557..7bac44c 100644
--- a/src/Courant.c
+++ b/src/Courant.c
@@ -24,6 +24,11 @@ void Time_Courant(CCTK_CARGUMENTS)
char *message;
+ int min_handle,ierr;
+
+ /* Get the handle for the MINIMUM operation */
+ /*$ierr = CCTK_ReductionArrayHandle("minimum");$*/
+
/* Calculate the minimum grid spacing */
if (cctk_dim>=1)
{
@@ -41,12 +46,21 @@ void Time_Courant(CCTK_CARGUMENTS)
min_spacing = (min_spacing<cctk_delta_space[2] ?
min_spacing : cctk_delta_space[2]);
}
-
+
if (cctk_dim>=4)
{
CCTK_WARN(0,"Time Step not defined for greater than 4 dimensions");
}
+ /* do the global minimum on local min_spacing to tmp and reassign that
+ to min_spacing */
+
+ /*$printf("Courant1: %d \n",min_spacing);
+ ierr = CCTK_ReduceLocalScalar(GH,-1,min_handle,min_spacing, tmp, CCTK_VAR_REAL);
+ printf("Courant2: %d \n",min_spacing,tmp);
+ min_spacing = tmp;
+ printf("Courant3: %d \n",min_spacing,tmp);$*/
+
/* Calculate the courant timestep */
courant_speed = *wave_speed;
*courant_dt = courant_fac/courant_speed/sqrt((CCTK_REAL )cctk_dim);