From d867c60478ca01d2b0c2ec3ee2bcc792f6447b0c Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 17 Jun 2003 14:41:20 +0000 Subject: Patch by Erik Schnetter: use the new macros CCTK_DELTA_SPACE and CCTK_ORIGIN_SPACE to initialize the cGH structure. These changes require an update of the flesh also. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/CartGrid3D/trunk@179 c78560ca-4b45-4335-b268-5f3340f3cb52 --- src/CartGrid3D.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/CartGrid3D.c b/src/CartGrid3D.c index 75a9546..55f9074 100644 --- a/src/CartGrid3D.c +++ b/src/CartGrid3D.c @@ -8,7 +8,7 @@ @version $Id$ @enddesc @@*/ - + /*#define CARTGRID3D_DEBUG*/ #include @@ -147,15 +147,15 @@ void CartGrid3D(CCTK_ARGUMENTS) xmax1 = 0.5; ymax1 = 0.5; zmax1 = 0.5; - + xmin1 = -0.5; ymin1 = -0.5; zmin1 = -0.5; - + } else { - + if (xyzmax != -424242) { xmax1 = xyzmax; @@ -168,7 +168,7 @@ void CartGrid3D(CCTK_ARGUMENTS) ymax1 = ymax; zmax1 = zmax; } - + if (xyzmin != -424242) { xmin1 = xyzmin; @@ -202,11 +202,11 @@ void CartGrid3D(CCTK_ARGUMENTS) } else { - if (cntstag[0]) - { - CCTK_WARN(4,"Ignoring request to avoid origin in x-direction," - "it is not relevant for this grid type"); - } + if (cntstag[0]) + { + CCTK_WARN(4,"Ignoring request to avoid origin in x-direction," + "it is not relevant for this grid type"); + } *coarse_dx = (xmax1 - xmin1) / max(cctk_gsh[0] - 1, 1); x_origin = xmin1; } @@ -226,11 +226,11 @@ void CartGrid3D(CCTK_ARGUMENTS) } else { - if (cntstag[1]) - { - CCTK_WARN(4,"Ignoring request to avoid origin in y-direction," - "it is not relevant for this grid type"); - } + if (cntstag[1]) + { + CCTK_WARN(4,"Ignoring request to avoid origin in y-direction," + "it is not relevant for this grid type"); + } *coarse_dy = (ymax1 - ymin1) / max(cctk_gsh[1] - 1, 1); y_origin = ymin1; } @@ -250,11 +250,11 @@ void CartGrid3D(CCTK_ARGUMENTS) } else { - if (cntstag[2]) - { - CCTK_WARN(4,"Ignoring request to avoid origin in z-direction," - "it is not relevant for this grid type"); - } + if (cntstag[2]) + { + CCTK_WARN(4,"Ignoring request to avoid origin in z-direction," + "it is not relevant for this grid type"); + } *coarse_dz = (zmax1 - zmin1) / max(cctk_gsh[2] - 1, 1); z_origin = zmin1; } @@ -336,13 +336,13 @@ void CartGrid3D(CCTK_ARGUMENTS) /* Use the already calculated coordinate ranges for all but the coarsest levels */ - this_dx = cctk_delta_space[0] / cctk_levfac[0]; - this_dy = cctk_delta_space[1] / cctk_levfac[1]; - this_dz = cctk_delta_space[2] / cctk_levfac[2]; + this_dx = CCTK_DELTA_SPACE(0); + this_dy = CCTK_DELTA_SPACE(1); + this_dz = CCTK_DELTA_SPACE(2); - x_origin = cctk_origin_space[0]; - y_origin = cctk_origin_space[1]; - z_origin = cctk_origin_space[2]; + x_origin = CCTK_ORIGIN_SPACE(0); + y_origin = CCTK_ORIGIN_SPACE(1); + z_origin = CCTK_ORIGIN_SPACE(2); } /* if (not coarsest refinement level) */ -- cgit v1.2.3