diff options
Diffstat (limited to 'Examples/Burgers/src/burgers_zero_rhs.cc')
-rw-r--r-- | Examples/Burgers/src/burgers_zero_rhs.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Examples/Burgers/src/burgers_zero_rhs.cc b/Examples/Burgers/src/burgers_zero_rhs.cc index 10f020f..689339b 100644 --- a/Examples/Burgers/src/burgers_zero_rhs.cc +++ b/Examples/Burgers/src/burgers_zero_rhs.cc @@ -17,10 +17,10 @@ /* Define macros used in calculations */ #define INITVALUE (42) -#define QAD(x) (SQR(SQR(x))) -#define INV(x) ((1.0) / (x)) +#define INV(x) ((CCTK_REAL)1.0 / (x)) #define SQR(x) ((x) * (x)) -#define CUB(x) ((x) * (x) * (x)) +#define CUB(x) ((x) * SQR(x)) +#define QAD(x) (SQR(SQR(x))) static void burgers_zero_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[]) { @@ -28,8 +28,6 @@ static void burgers_zero_rhs_Body(cGH const * restrict const cctkGH, int const d DECLARE_CCTK_PARAMETERS; - /* Declare finite differencing variables */ - /* Include user-supplied include files */ /* Initialise finite differencing variables */ @@ -72,9 +70,9 @@ static void burgers_zero_rhs_Body(cGH const * restrict const cctkGH, int const d /* Loop over the grid points */ #pragma omp parallel - CCTK_LOOP3 (burgers_zero_rhs, + CCTK_LOOP3(burgers_zero_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]) + cctk_ash[0],cctk_ash[1],cctk_ash[2]) { ptrdiff_t const index = di*i + dj*j + dk*k; @@ -92,7 +90,7 @@ static void burgers_zero_rhs_Body(cGH const * restrict const cctkGH, int const d /* Copy local copies back to grid functions */ urhs[index] = urhsL; } - CCTK_ENDLOOP3 (burgers_zero_rhs); + CCTK_ENDLOOP3(burgers_zero_rhs); } extern "C" void burgers_zero_rhs(CCTK_ARGUMENTS) @@ -111,11 +109,12 @@ extern "C" void burgers_zero_rhs(CCTK_ARGUMENTS) return; } - const char *groups[] = {"Burgers::u_grouprhs"}; + const char *const groups[] = { + "Burgers::u_grouprhs"}; GenericFD_AssertGroupStorage(cctkGH, "burgers_zero_rhs", 1, groups); - GenericFD_LoopOverEverything(cctkGH, &burgers_zero_rhs_Body); + GenericFD_LoopOverEverything(cctkGH, burgers_zero_rhs_Body); if (verbose > 1) { |