From cb546d85228985472ddc13d1633d4f0eb689f872 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 18 Mar 2010 20:28:16 -0700 Subject: Use Ian's version of Kranc, which is found at . --- ML_WaveToy/src/WT_Gaussian.c | 33 +++------------------------------ ML_WaveToy/src/WT_RHS.c | 38 ++++++-------------------------------- 2 files changed, 9 insertions(+), 62 deletions(-) (limited to 'ML_WaveToy') diff --git a/ML_WaveToy/src/WT_Gaussian.c b/ML_WaveToy/src/WT_Gaussian.c index e0b278d..39a2d41 100644 --- a/ML_WaveToy/src/WT_Gaussian.c +++ b/ML_WaveToy/src/WT_Gaussian.c @@ -28,17 +28,6 @@ void WT_Gaussian_Body(cGH const * restrict const cctkGH, int const dir, int cons /* Declare finite differencing variables */ - /* Declare predefined quantities */ - // CCTK_REAL p1o12dx = INITVALUE; - // CCTK_REAL p1o12dy = INITVALUE; - // CCTK_REAL p1o12dz = INITVALUE; - // CCTK_REAL p1o144dxdy = INITVALUE; - // CCTK_REAL p1o144dxdz = INITVALUE; - // CCTK_REAL p1o144dydz = INITVALUE; - // CCTK_REAL pm1o12dx2 = INITVALUE; - // CCTK_REAL pm1o12dy2 = INITVALUE; - // CCTK_REAL pm1o12dz2 = INITVALUE; - if (verbose > 1) { CCTK_VInfo(CCTK_THORNSTRING,"Entering WT_Gaussian_Body"); @@ -88,40 +77,24 @@ void WT_Gaussian_Body(cGH const * restrict const cctkGH, int const dir, int cons cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { // int index = INITVALUE; - // int subblock_index = INITVALUE; int const index = CCTK_GFINDEX3D(cctkGH,i,j,k); - int const subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); - - /* Declare shorthands */ - - /* Declare local copies of grid functions */ - // CCTK_REAL rhoL = INITVALUE; - // CCTK_REAL uL = INITVALUE; - /* Declare precomputed derivatives*/ - /* Declare derivatives */ /* Assign local copies of grid functions */ - /* Assign local copies of subblock grid functions */ - /* Include user supplied include files */ - /* Precompute derivatives (new style) */ - - /* Precompute derivatives (old style) */ + /* Precompute derivatives */ /* Calculate temporaries and grid functions */ - CCTK_REAL const uL = 0; + CCTK_REAL uL = 0; - CCTK_REAL const rhoL = 0; + CCTK_REAL rhoL = 0; /* Copy local copies back to grid functions */ rho[index] = rhoL; u[index] = uL; - - /* Copy local copies back to subblock grid functions */ } LC_ENDLOOP3 (WT_Gaussian); } diff --git a/ML_WaveToy/src/WT_RHS.c b/ML_WaveToy/src/WT_RHS.c index 31b1fbb..4f0e59f 100644 --- a/ML_WaveToy/src/WT_RHS.c +++ b/ML_WaveToy/src/WT_RHS.c @@ -28,17 +28,6 @@ void WT_RHS_Body(cGH const * restrict const cctkGH, int const dir, int const fac /* Declare finite differencing variables */ - /* Declare predefined quantities */ - // CCTK_REAL p1o12dx = INITVALUE; - // CCTK_REAL p1o12dy = INITVALUE; - // CCTK_REAL p1o12dz = INITVALUE; - // CCTK_REAL p1o144dxdy = INITVALUE; - // CCTK_REAL p1o144dxdz = INITVALUE; - // CCTK_REAL p1o144dydz = INITVALUE; - // CCTK_REAL pm1o12dx2 = INITVALUE; - // CCTK_REAL pm1o12dy2 = INITVALUE; - // CCTK_REAL pm1o12dz2 = INITVALUE; - if (verbose > 1) { CCTK_VInfo(CCTK_THORNSTRING,"Entering WT_RHS_Body"); @@ -88,48 +77,33 @@ void WT_RHS_Body(cGH const * restrict const cctkGH, int const dir, int const fac cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { // int index = INITVALUE; - // int subblock_index = INITVALUE; int const index = CCTK_GFINDEX3D(cctkGH,i,j,k); - int const subblock_index = i - min[0] + (max[0] - min[0]) * (j - min[1] + (max[1]-min[1]) * (k - min[2])); - - /* Declare shorthands */ - - /* Declare local copies of grid functions */ - // CCTK_REAL rhoL = INITVALUE, rhorhsL = INITVALUE; - // CCTK_REAL uL = INITVALUE, urhsL = INITVALUE; - /* Declare precomputed derivatives*/ - /* Declare derivatives */ // CCTK_REAL PDstandardNth11u = INITVALUE; // CCTK_REAL PDstandardNth22u = INITVALUE; // CCTK_REAL PDstandardNth33u = INITVALUE; /* Assign local copies of grid functions */ - CCTK_REAL const rhoL = rho[index]; - CCTK_REAL const uL = u[index]; - - /* Assign local copies of subblock grid functions */ + CCTK_REAL rhoL = rho[index]; + CCTK_REAL uL = u[index]; /* Include user supplied include files */ - /* Precompute derivatives (new style) */ + /* Precompute derivatives */ CCTK_REAL const PDstandardNth11u = PDstandardNth11(u, i, j, k); CCTK_REAL const PDstandardNth22u = PDstandardNth22(u, i, j, k); CCTK_REAL const PDstandardNth33u = PDstandardNth33(u, i, j, k); - /* Precompute derivatives (old style) */ - /* Calculate temporaries and grid functions */ - CCTK_REAL const urhsL = rhoL; + CCTK_REAL urhsL = rhoL; - CCTK_REAL const rhorhsL = PDstandardNth11u + PDstandardNth22u + PDstandardNth33u; + CCTK_REAL rhorhsL = PDstandardNth11u + PDstandardNth22u + + PDstandardNth33u; /* Copy local copies back to grid functions */ rhorhs[index] = rhorhsL; urhs[index] = urhsL; - - /* Copy local copies back to subblock grid functions */ } LC_ENDLOOP3 (WT_RHS); } -- cgit v1.2.3