aboutsummaryrefslogtreecommitdiff
path: root/ML_WaveToy/src/WT_Gaussian.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ML_WaveToy/src/WT_Gaussian.cc')
-rw-r--r--ML_WaveToy/src/WT_Gaussian.cc47
1 files changed, 31 insertions, 16 deletions
diff --git a/ML_WaveToy/src/WT_Gaussian.cc b/ML_WaveToy/src/WT_Gaussian.cc
index 3933786..e6faf2f 100644
--- a/ML_WaveToy/src/WT_Gaussian.cc
+++ b/ML_WaveToy/src/WT_Gaussian.cc
@@ -21,7 +21,7 @@
#define SQR(x) ((x) * (x))
#define CUB(x) ((x) * (x) * (x))
-static void WT_Gaussian_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_Gaussian_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 WT_Gaussian_Body(cGH const * restrict const cctkGH, int const dir, i
/* Declare finite differencing variables */
- if (verbose > 1)
- {
- CCTK_VInfo(CCTK_THORNSTRING,"Entering WT_Gaussian_Body");
- }
-
- if (cctk_iteration % WT_Gaussian_calc_every != WT_Gaussian_calc_offset)
- {
- return;
- }
-
- const char *groups[] = {"ML_WaveToy::WT_rho","ML_WaveToy::WT_u"};
- GenericFD_AssertGroupStorage(cctkGH, "WT_Gaussian", 2, groups);
-
-
/* Include user-supplied include files */
/* Initialise finite differencing variables */
@@ -56,6 +42,7 @@ static void WT_Gaussian_Body(cGH const * restrict const cctkGH, int const dir, i
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 WT_Gaussian_Body(cGH const * restrict const cctkGH, int const dir, i
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_Gaussian,
- 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;
@@ -112,5 +107,25 @@ extern "C" void WT_Gaussian(CCTK_ARGUMENTS)
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
+
+ if (verbose > 1)
+ {
+ CCTK_VInfo(CCTK_THORNSTRING,"Entering WT_Gaussian_Body");
+ }
+
+ if (cctk_iteration % WT_Gaussian_calc_every != WT_Gaussian_calc_offset)
+ {
+ return;
+ }
+
+ const char *groups[] = {"ML_WaveToy::WT_rho","ML_WaveToy::WT_u"};
+ GenericFD_AssertGroupStorage(cctkGH, "WT_Gaussian", 2, groups);
+
+
GenericFD_LoopOverEverything(cctkGH, &WT_Gaussian_Body);
+
+ if (verbose > 1)
+ {
+ CCTK_VInfo(CCTK_THORNSTRING,"Leaving WT_Gaussian_Body");
+ }
}