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_hydro/src/hydro_vacuum.cc | |
parent | 46d48e71bde1f46188faa75fb967be9cf91dcb54 (diff) |
Regenerate code
Kranc version beb854b56cd60ec97072d709a064eeafe1633ed1
Diffstat (limited to 'ML_hydro/src/hydro_vacuum.cc')
-rw-r--r-- | ML_hydro/src/hydro_vacuum.cc | 47 |
1 files changed, 31 insertions, 16 deletions
diff --git a/ML_hydro/src/hydro_vacuum.cc b/ML_hydro/src/hydro_vacuum.cc index ea14bf0..f2299c6 100644 --- a/ML_hydro/src/hydro_vacuum.cc +++ b/ML_hydro/src/hydro_vacuum.cc @@ -21,7 +21,7 @@ #define SQR(x) ((x) * (x)) #define CUB(x) ((x) * (x) * (x)) -static void hydro_vacuum_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 hydro_vacuum_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; @@ -29,20 +29,6 @@ static void hydro_vacuum_Body(cGH const * restrict const cctkGH, int const dir, /* Declare finite differencing variables */ - if (verbose > 1) - { - CCTK_VInfo(CCTK_THORNSTRING,"Entering hydro_vacuum_Body"); - } - - if (cctk_iteration % hydro_vacuum_calc_every != hydro_vacuum_calc_offset) - { - return; - } - - const char *groups[] = {"ML_hydro::eps_group","ML_hydro::rho_group","ML_hydro::vel_group"}; - GenericFD_AssertGroupStorage(cctkGH, "hydro_vacuum", 3, groups); - - /* Include user-supplied include files */ /* Initialise finite differencing variables */ @@ -56,6 +42,7 @@ static void hydro_vacuum_Body(cGH const * restrict const cctkGH, int const dir, 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); @@ -79,10 +66,18 @@ static void hydro_vacuum_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const p1ody2 = INV(SQR(dy)); CCTK_REAL const p1odz2 = 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 (hydro_vacuum, - 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; @@ -121,5 +116,25 @@ extern "C" void hydro_vacuum(CCTK_ARGUMENTS) DECLARE_CCTK_ARGUMENTS; DECLARE_CCTK_PARAMETERS; + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering hydro_vacuum_Body"); + } + + if (cctk_iteration % hydro_vacuum_calc_every != hydro_vacuum_calc_offset) + { + return; + } + + const char *groups[] = {"ML_hydro::eps_group","ML_hydro::rho_group","ML_hydro::vel_group"}; + GenericFD_AssertGroupStorage(cctkGH, "hydro_vacuum", 3, groups); + + GenericFD_LoopOverEverything(cctkGH, &hydro_vacuum_Body); + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Leaving hydro_vacuum_Body"); + } } |