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.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/ML_WaveToy/src/WT_Gaussian.cc b/ML_WaveToy/src/WT_Gaussian.cc
index e6faf2f..c88259e 100644
--- a/ML_WaveToy/src/WT_Gaussian.cc
+++ b/ML_WaveToy/src/WT_Gaussian.cc
@@ -12,6 +12,7 @@
#include "cctk_Parameters.h"
#include "GenericFD.h"
#include "Differencing.h"
+#include "cctk_Loop.h"
#include "loopcontrol.h"
/* Define macros used in calculations */
@@ -27,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 */
@@ -59,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));
@@ -76,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
- LC_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])
{
@@ -99,7 +98,7 @@ static void WT_Gaussian_Body(cGH const * restrict const cctkGH, int const dir, i
rho[index] = rhoL;
u[index] = uL;
}
- LC_ENDLOOP3 (WT_Gaussian);
+ CCTK_ENDLOOP3(WT_Gaussian);
}
extern "C" void WT_Gaussian(CCTK_ARGUMENTS)
@@ -118,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)
{