diff options
Diffstat (limited to 'ML_hydro/src/hydro_prim2con.cc')
-rw-r--r-- | ML_hydro/src/hydro_prim2con.cc | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/ML_hydro/src/hydro_prim2con.cc b/ML_hydro/src/hydro_prim2con.cc index cf7aabf..d9aa747 100644 --- a/ML_hydro/src/hydro_prim2con.cc +++ b/ML_hydro/src/hydro_prim2con.cc @@ -28,8 +28,6 @@ static void hydro_prim2con_Body(cGH const * restrict const cctkGH, int const dir DECLARE_CCTK_PARAMETERS; - /* Declare finite differencing variables */ - /* Include user-supplied include files */ /* Initialise finite differencing variables */ @@ -60,9 +58,9 @@ static void hydro_prim2con_Body(cGH const * restrict const cctkGH, int const dir CCTK_REAL const p1o2dx = 0.5*INV(dx); CCTK_REAL const p1o2dy = 0.5*INV(dy); CCTK_REAL const p1o2dz = 0.5*INV(dz); - CCTK_REAL const p1o4dxdy = 0.25*INV(dx)*INV(dy); - CCTK_REAL const p1o4dxdz = 0.25*INV(dx)*INV(dz); - CCTK_REAL const p1o4dydz = 0.25*INV(dy)*INV(dz); + CCTK_REAL const p1o4dxdy = 0.25*INV(dx*dy); + CCTK_REAL const p1o4dxdz = 0.25*INV(dx*dz); + CCTK_REAL const p1o4dydz = 0.25*INV(dy*dz); CCTK_REAL const p1odx2 = INV(SQR(dx)); CCTK_REAL const p1ody2 = INV(SQR(dy)); CCTK_REAL const p1odz2 = INV(SQR(dz)); @@ -77,7 +75,7 @@ static void hydro_prim2con_Body(cGH const * restrict const cctkGH, int const dir /* Loop over the grid points */ #pragma omp parallel - CCTK_LOOP3 (hydro_prim2con, + CCTK_LOOP3(hydro_prim2con, i,j,k, imin[0],imin[1],imin[2], imax[0],imax[1],imax[2], cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) { @@ -120,7 +118,7 @@ static void hydro_prim2con_Body(cGH const * restrict const cctkGH, int const dir mom3[index] = mom3L; vol[index] = volL; } - CCTK_ENDLOOP3 (hydro_prim2con); + CCTK_ENDLOOP3(hydro_prim2con); } extern "C" void hydro_prim2con(CCTK_ARGUMENTS) @@ -139,11 +137,18 @@ extern "C" void hydro_prim2con(CCTK_ARGUMENTS) return; } - const char *groups[] = {"ML_hydro::ene_group","ML_hydro::eps_group","ML_hydro::mass_group","ML_hydro::mom_group","ML_hydro::rho_group","ML_hydro::vel_group","ML_hydro::vol_group"}; + const char *const groups[] = { + "ML_hydro::ene_group", + "ML_hydro::eps_group", + "ML_hydro::mass_group", + "ML_hydro::mom_group", + "ML_hydro::rho_group", + "ML_hydro::vel_group", + "ML_hydro::vol_group"}; GenericFD_AssertGroupStorage(cctkGH, "hydro_prim2con", 7, groups); - GenericFD_LoopOverEverything(cctkGH, &hydro_prim2con_Body); + GenericFD_LoopOverEverything(cctkGH, hydro_prim2con_Body); if (verbose > 1) { |