aboutsummaryrefslogtreecommitdiff
path: root/ML_WaveToy
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2010-03-18 20:28:16 -0700
committerErik Schnetter <schnetter@cct.lsu.edu>2010-03-18 20:28:16 -0700
commitcb546d85228985472ddc13d1633d4f0eb689f872 (patch)
tree33db751f5f14ea2c3b7bfb8248762d73fa4db0c4 /ML_WaveToy
parent33479637cddfa24c0150cb691ee0bc1695f42866 (diff)
Use Ian's version of Kranc, which is found at
<git@github.com:ianhinder/Kranc.git>.
Diffstat (limited to 'ML_WaveToy')
-rw-r--r--ML_WaveToy/src/WT_Gaussian.c33
-rw-r--r--ML_WaveToy/src/WT_RHS.c38
2 files changed, 9 insertions, 62 deletions
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);
}