From af04ce2e3d96d19b94dd4b416a6617b649c6da34 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 3 Apr 2012 16:05:18 -0400 Subject: Regenerate code with current version of Kranc This is necessary so that Pi is correctly vectorized. --- ML_WaveToy/schedule.ccl | 22 ++++++++++++++++------ ML_WaveToy/src/WT_Gaussian.cc | 18 +++++++++--------- ML_WaveToy/src/WT_RHS.cc | 20 +++++++++++--------- ML_WaveToy/src/make.code.defn | 2 +- 4 files changed, 37 insertions(+), 25 deletions(-) (limited to 'ML_WaveToy') diff --git a/ML_WaveToy/schedule.ccl b/ML_WaveToy/schedule.ccl index 9517af0..20b055e 100644 --- a/ML_WaveToy/schedule.ccl +++ b/ML_WaveToy/schedule.ccl @@ -43,12 +43,6 @@ schedule ML_WaveToy_Startup at STARTUP OPTIONS: meta } "create banner" -schedule ML_WaveToy_RegisterVars in MoL_Register -{ - LANG: C - OPTIONS: meta -} "Register Variables for MoL" - schedule ML_WaveToy_RegisterSymmetries in SymmetryRegister { LANG: C @@ -58,11 +52,17 @@ schedule ML_WaveToy_RegisterSymmetries in SymmetryRegister schedule WT_Gaussian AT initial { LANG: C + WRITES: ML_WaveToy::WT_rho + WRITES: ML_WaveToy::WT_u } "WT_Gaussian" schedule WT_RHS IN MoL_CalcRHS { LANG: C + READS: ML_WaveToy::WT_rho + READS: ML_WaveToy::WT_u + WRITES: ML_WaveToy::WT_rhorhs + WRITES: ML_WaveToy::WT_urhs } "WT_RHS" schedule WT_RHS AT analysis @@ -70,6 +70,10 @@ schedule WT_RHS AT analysis LANG: C SYNC: WT_rhorhs SYNC: WT_urhs + READS: ML_WaveToy::WT_rho + READS: ML_WaveToy::WT_u + WRITES: ML_WaveToy::WT_rhorhs + WRITES: ML_WaveToy::WT_urhs } "WT_RHS" schedule ML_WaveToy_SelectBoundConds in MoL_PostStep @@ -86,6 +90,12 @@ schedule ML_WaveToy_CheckBoundaries at BASEGRID OPTIONS: meta } "check boundaries treatment" +schedule ML_WaveToy_RegisterVars in MoL_Register +{ + LANG: C + OPTIONS: meta +} "Register Variables for MoL" + schedule group ApplyBCs as ML_WaveToy_ApplyBCs in MoL_PostStep after ML_WaveToy_SelectBoundConds { # no language specified diff --git a/ML_WaveToy/src/WT_Gaussian.cc b/ML_WaveToy/src/WT_Gaussian.cc index bd7116c..c88259e 100644 --- a/ML_WaveToy/src/WT_Gaussian.cc +++ b/ML_WaveToy/src/WT_Gaussian.cc @@ -28,8 +28,6 @@ static void WT_Gaussian_Body(cGH const * restrict const cctkGH, int const dir, i DECLARE_CCTK_PARAMETERS; - /* Declare finite differencing variables */ - /* Include user-supplied include files */ /* Initialise finite differencing variables */ @@ -60,9 +58,9 @@ static void WT_Gaussian_Body(cGH const * restrict const cctkGH, int const dir, i CCTK_REAL const p1o12dx = 0.0833333333333333333333333333333*INV(dx); CCTK_REAL const p1o12dy = 0.0833333333333333333333333333333*INV(dy); CCTK_REAL const p1o12dz = 0.0833333333333333333333333333333*INV(dz); - CCTK_REAL const p1o144dxdy = 0.00694444444444444444444444444444*INV(dx)*INV(dy); - CCTK_REAL const p1o144dxdz = 0.00694444444444444444444444444444*INV(dx)*INV(dz); - CCTK_REAL const p1o144dydz = 0.00694444444444444444444444444444*INV(dy)*INV(dz); + CCTK_REAL const p1o144dxdy = 0.00694444444444444444444444444444*INV(dx*dy); + CCTK_REAL const p1o144dxdz = 0.00694444444444444444444444444444*INV(dx*dz); + CCTK_REAL const p1o144dydz = 0.00694444444444444444444444444444*INV(dy*dz); CCTK_REAL const pm1o12dx2 = -0.0833333333333333333333333333333*INV(SQR(dx)); CCTK_REAL const pm1o12dy2 = -0.0833333333333333333333333333333*INV(SQR(dy)); CCTK_REAL const pm1o12dz2 = -0.0833333333333333333333333333333*INV(SQR(dz)); @@ -77,7 +75,7 @@ static void WT_Gaussian_Body(cGH const * restrict const cctkGH, int const dir, i /* Loop over the grid points */ #pragma omp parallel - CCTK_LOOP3 (WT_Gaussian, + CCTK_LOOP3(WT_Gaussian, i,j,k, imin[0],imin[1],imin[2], imax[0],imax[1],imax[2], cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { @@ -100,7 +98,7 @@ static void WT_Gaussian_Body(cGH const * restrict const cctkGH, int const dir, i rho[index] = rhoL; u[index] = uL; } - CCTK_ENDLOOP3 (WT_Gaussian); + CCTK_ENDLOOP3(WT_Gaussian); } extern "C" void WT_Gaussian(CCTK_ARGUMENTS) @@ -119,11 +117,13 @@ extern "C" void WT_Gaussian(CCTK_ARGUMENTS) return; } - const char *groups[] = {"ML_WaveToy::WT_rho","ML_WaveToy::WT_u"}; + const char *const groups[] = { + "ML_WaveToy::WT_rho", + "ML_WaveToy::WT_u"}; GenericFD_AssertGroupStorage(cctkGH, "WT_Gaussian", 2, groups); - GenericFD_LoopOverEverything(cctkGH, &WT_Gaussian_Body); + GenericFD_LoopOverEverything(cctkGH, WT_Gaussian_Body); if (verbose > 1) { diff --git a/ML_WaveToy/src/WT_RHS.cc b/ML_WaveToy/src/WT_RHS.cc index 6fe1d8e..2dd39f9 100644 --- a/ML_WaveToy/src/WT_RHS.cc +++ b/ML_WaveToy/src/WT_RHS.cc @@ -43,8 +43,6 @@ static void WT_RHS_Body(cGH const * restrict const cctkGH, int const dir, int co DECLARE_CCTK_PARAMETERS; - /* Declare finite differencing variables */ - /* Include user-supplied include files */ /* Initialise finite differencing variables */ @@ -75,9 +73,9 @@ static void WT_RHS_Body(cGH const * restrict const cctkGH, int const dir, int co CCTK_REAL const p1o12dx = 0.0833333333333333333333333333333*INV(dx); CCTK_REAL const p1o12dy = 0.0833333333333333333333333333333*INV(dy); CCTK_REAL const p1o12dz = 0.0833333333333333333333333333333*INV(dz); - CCTK_REAL const p1o144dxdy = 0.00694444444444444444444444444444*INV(dx)*INV(dy); - CCTK_REAL const p1o144dxdz = 0.00694444444444444444444444444444*INV(dx)*INV(dz); - CCTK_REAL const p1o144dydz = 0.00694444444444444444444444444444*INV(dy)*INV(dz); + CCTK_REAL const p1o144dxdy = 0.00694444444444444444444444444444*INV(dx*dy); + CCTK_REAL const p1o144dxdz = 0.00694444444444444444444444444444*INV(dx*dz); + CCTK_REAL const p1o144dydz = 0.00694444444444444444444444444444*INV(dy*dz); CCTK_REAL const pm1o12dx2 = -0.0833333333333333333333333333333*INV(SQR(dx)); CCTK_REAL const pm1o12dy2 = -0.0833333333333333333333333333333*INV(SQR(dy)); CCTK_REAL const pm1o12dz2 = -0.0833333333333333333333333333333*INV(SQR(dz)); @@ -92,7 +90,7 @@ static void WT_RHS_Body(cGH const * restrict const cctkGH, int const dir, int co /* Loop over the grid points */ #pragma omp parallel - CCTK_LOOP3 (WT_RHS, + CCTK_LOOP3(WT_RHS, i,j,k, imin[0],imin[1],imin[2], imax[0],imax[1],imax[2], cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { @@ -121,7 +119,7 @@ static void WT_RHS_Body(cGH const * restrict const cctkGH, int const dir, int co rhorhs[index] = rhorhsL; urhs[index] = urhsL; } - CCTK_ENDLOOP3 (WT_RHS); + CCTK_ENDLOOP3(WT_RHS); } extern "C" void WT_RHS(CCTK_ARGUMENTS) @@ -140,12 +138,16 @@ extern "C" void WT_RHS(CCTK_ARGUMENTS) return; } - const char *groups[] = {"ML_WaveToy::WT_rho","ML_WaveToy::WT_rhorhs","ML_WaveToy::WT_u","ML_WaveToy::WT_urhs"}; + const char *const groups[] = { + "ML_WaveToy::WT_rho", + "ML_WaveToy::WT_rhorhs", + "ML_WaveToy::WT_u", + "ML_WaveToy::WT_urhs"}; GenericFD_AssertGroupStorage(cctkGH, "WT_RHS", 4, groups); GenericFD_EnsureStencilFits(cctkGH, "WT_RHS", 2, 2, 2); - GenericFD_LoopOverInterior(cctkGH, &WT_RHS_Body); + GenericFD_LoopOverInterior(cctkGH, WT_RHS_Body); if (verbose > 1) { diff --git a/ML_WaveToy/src/make.code.defn b/ML_WaveToy/src/make.code.defn index fbd9e15..a36e2d9 100644 --- a/ML_WaveToy/src/make.code.defn +++ b/ML_WaveToy/src/make.code.defn @@ -1,3 +1,3 @@ # File produced by Kranc -SRCS = Startup.cc RegisterMoL.cc RegisterSymmetries.cc WT_Gaussian.cc WT_RHS.cc Boundaries.cc +SRCS = Startup.cc RegisterSymmetries.cc RegisterMoL.cc WT_Gaussian.cc WT_RHS.cc Boundaries.cc -- cgit v1.2.3