diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-11-17 18:07:14 +0100 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-11-17 18:07:14 +0100 |
commit | 5859ce9074941ed0f52f5200d0adde8fed1d9012 (patch) | |
tree | 76497302b0e8dab4e1d4f0fc6f127fd826ea2ebf /ML_WaveToy/src/WT_RHS.cc | |
parent | 46d48e71bde1f46188faa75fb967be9cf91dcb54 (diff) |
Regenerate code
Kranc version beb854b56cd60ec97072d709a064eeafe1633ed1
Diffstat (limited to 'ML_WaveToy/src/WT_RHS.cc')
-rw-r--r-- | ML_WaveToy/src/WT_RHS.cc | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/ML_WaveToy/src/WT_RHS.cc b/ML_WaveToy/src/WT_RHS.cc index b6c7b2a..01cb50e 100644 --- a/ML_WaveToy/src/WT_RHS.cc +++ b/ML_WaveToy/src/WT_RHS.cc @@ -36,7 +36,7 @@ extern "C" void WT_RHS_SelectBCs(CCTK_ARGUMENTS) return; } -static void WT_RHS_Body(cGH const * restrict const cctkGH, int const dir, int const face, CCTK_REAL const normal[3], CCTK_REAL const tangentA[3], CCTK_REAL const tangentB[3], int const min[3], int const max[3], int const n_subblock_gfs, CCTK_REAL * restrict const subblock_gfs[]) +static void WT_RHS_Body(cGH const * restrict const cctkGH, int const dir, int const face, CCTK_REAL const normal[3], CCTK_REAL const tangentA[3], CCTK_REAL const tangentB[3], int const imin[3], int const imax[3], int const n_subblock_gfs, CCTK_REAL * restrict const subblock_gfs[]) { DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; @@ -44,21 +44,6 @@ static void WT_RHS_Body(cGH const * restrict const cctkGH, int const dir, int co /* Declare finite differencing variables */ - if (verbose > 1) - { - CCTK_VInfo(CCTK_THORNSTRING,"Entering WT_RHS_Body"); - } - - if (cctk_iteration % WT_RHS_calc_every != WT_RHS_calc_offset) - { - return; - } - - const char *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); - /* Include user-supplied include files */ /* Initialise finite differencing variables */ @@ -72,6 +57,7 @@ static void WT_RHS_Body(cGH const * restrict const cctkGH, int const dir, int co CCTK_REAL const dy = ToReal(CCTK_DELTA_SPACE(1)); CCTK_REAL const dz = ToReal(CCTK_DELTA_SPACE(2)); CCTK_REAL const dt = ToReal(CCTK_DELTA_TIME); + CCTK_REAL const t = ToReal(cctk_time); CCTK_REAL const dxi = INV(dx); CCTK_REAL const dyi = INV(dy); CCTK_REAL const dzi = INV(dz); @@ -95,10 +81,18 @@ static void WT_RHS_Body(cGH const * restrict const cctkGH, int const dir, int co CCTK_REAL const pm1o12dy2 = -0.0833333333333333333333333333333*INV(SQR(dy)); CCTK_REAL const pm1o12dz2 = -0.0833333333333333333333333333333*INV(SQR(dz)); + /* Assign local copies of arrays functions */ + + + + /* Calculate temporaries and arrays functions */ + + /* Copy local copies back to grid functions */ + /* Loop over the grid points */ #pragma omp parallel LC_LOOP3 (WT_RHS, - i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + i,j,k, imin[0],imin[1],imin[2], imax[0],imax[1],imax[2], cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { ptrdiff_t const index = di*i + dj*j + dk*k; @@ -134,5 +128,26 @@ extern "C" void WT_RHS(CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering WT_RHS_Body"); + } + + if (cctk_iteration % WT_RHS_calc_every != WT_RHS_calc_offset) + { + return; + } + + const char *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); + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Leaving WT_RHS_Body"); + } } |