diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-06-09 22:00:21 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2011-06-09 22:00:21 +0200 |
commit | 00db430c5a06c0d87d2ad18413dd138e76501ea0 (patch) | |
tree | 9b5bccdaabc9eb07715ce6b8d735bed7c992e1ca /ML_BSSN/src | |
parent | ae2c3a85fc9cf6a3de764b242e344edb7a8940f8 (diff) |
Regenerate code
Testsuite passes
Diffstat (limited to 'ML_BSSN/src')
-rw-r--r-- | ML_BSSN/src/ML_BSSN_Dissipation.cc | 392 | ||||
-rw-r--r-- | ML_BSSN/src/ML_BSSN_RHS1.cc | 205 | ||||
-rw-r--r-- | ML_BSSN/src/ML_BSSN_RHS2.cc | 60 | ||||
-rw-r--r-- | ML_BSSN/src/make.code.defn | 2 |
4 files changed, 463 insertions, 196 deletions
diff --git a/ML_BSSN/src/ML_BSSN_Dissipation.cc b/ML_BSSN/src/ML_BSSN_Dissipation.cc new file mode 100644 index 0000000..110c5bb --- /dev/null +++ b/ML_BSSN/src/ML_BSSN_Dissipation.cc @@ -0,0 +1,392 @@ +/* File produced by Kranc */ + +#define KRANC_C + +#include <assert.h> +#include <math.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "cctk.h" +#include "cctk_Arguments.h" +#include "cctk_Parameters.h" +#include "GenericFD.h" +#include "Differencing.h" +#include "loopcontrol.h" + +/* Define macros used in calculations */ +#define INITVALUE (42) +#define QAD(x) (SQR(SQR(x))) +#define INV(x) ((1.0) / (x)) +#define SQR(x) ((x) * (x)) +#define CUB(x) ((x) * (x) * (x)) + +extern "C" void ML_BSSN_Dissipation_SelectBCs(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + CCTK_INT ierr = 0; + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_curvrhs","flat"); + if (ierr < 0) + CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_curvrhs."); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_dtlapserhs","flat"); + if (ierr < 0) + CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_dtlapserhs."); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_dtshiftrhs","flat"); + if (ierr < 0) + CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_dtshiftrhs."); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_Gammarhs","flat"); + if (ierr < 0) + CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_Gammarhs."); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_lapserhs","flat"); + if (ierr < 0) + CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_lapserhs."); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_log_confacrhs","flat"); + if (ierr < 0) + CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_log_confacrhs."); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_metricrhs","flat"); + if (ierr < 0) + CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_metricrhs."); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_shiftrhs","flat"); + if (ierr < 0) + CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_shiftrhs."); + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, GenericFD_GetBoundaryWidth(cctkGH), -1 /* no table */, "ML_BSSN::ML_trace_curvrhs","flat"); + if (ierr < 0) + CCTK_WARN(1, "Failed to register flat BC for ML_BSSN::ML_trace_curvrhs."); + return; +} + +static void ML_BSSN_Dissipation_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[]) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + + /* Declare finite differencing variables */ + + if (verbose > 1) + { + CCTK_VInfo(CCTK_THORNSTRING,"Entering ML_BSSN_Dissipation_Body"); + } + + if (cctk_iteration % ML_BSSN_Dissipation_calc_every != ML_BSSN_Dissipation_calc_offset) + { + return; + } + + const char *groups[] = {"ML_BSSN::ML_curv","ML_BSSN::ML_curvrhs","ML_BSSN::ML_dtlapse","ML_BSSN::ML_dtlapserhs","ML_BSSN::ML_dtshift","ML_BSSN::ML_dtshiftrhs","ML_BSSN::ML_Gamma","ML_BSSN::ML_Gammarhs","ML_BSSN::ML_lapse","ML_BSSN::ML_lapserhs","ML_BSSN::ML_log_confac","ML_BSSN::ML_log_confacrhs","ML_BSSN::ML_metric","ML_BSSN::ML_metricrhs","ML_BSSN::ML_shift","ML_BSSN::ML_shiftrhs","ML_BSSN::ML_trace_curv","ML_BSSN::ML_trace_curvrhs"}; + GenericFD_AssertGroupStorage(cctkGH, "ML_BSSN_Dissipation", 18, groups); + + GenericFD_EnsureStencilFits(cctkGH, "ML_BSSN_Dissipation", 3, 3, 3); + + /* Include user-supplied include files */ + + /* Initialise finite differencing variables */ + ptrdiff_t const di = 1; + ptrdiff_t const dj = CCTK_GFINDEX3D(cctkGH,0,1,0) - CCTK_GFINDEX3D(cctkGH,0,0,0); + ptrdiff_t const dk = CCTK_GFINDEX3D(cctkGH,0,0,1) - CCTK_GFINDEX3D(cctkGH,0,0,0); + ptrdiff_t const cdi = sizeof(CCTK_REAL) * di; + ptrdiff_t const cdj = sizeof(CCTK_REAL) * dj; + ptrdiff_t const cdk = sizeof(CCTK_REAL) * dk; + CCTK_REAL const dx = ToReal(CCTK_DELTA_SPACE(0)); + 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 dxi = INV(dx); + CCTK_REAL const dyi = INV(dy); + CCTK_REAL const dzi = INV(dz); + CCTK_REAL const khalf = 0.5; + CCTK_REAL const kthird = 1/3.0; + CCTK_REAL const ktwothird = 2.0/3.0; + CCTK_REAL const kfourthird = 4.0/3.0; + CCTK_REAL const keightthird = 8.0/3.0; + CCTK_REAL const hdxi = 0.5 * dxi; + CCTK_REAL const hdyi = 0.5 * dyi; + CCTK_REAL const hdzi = 0.5 * dzi; + + /* Initialize predefined quantities */ + 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 p1o24dx = 0.0416666666666666666666666666667*INV(dx); + CCTK_REAL const p1o24dy = 0.0416666666666666666666666666667*INV(dy); + CCTK_REAL const p1o24dz = 0.0416666666666666666666666666667*INV(dz); + CCTK_REAL const p1o64dx = 0.015625*INV(dx); + CCTK_REAL const p1o64dy = 0.015625*INV(dy); + CCTK_REAL const p1o64dz = 0.015625*INV(dz); + CCTK_REAL const p1odx = INV(dx); + CCTK_REAL const p1ody = INV(dy); + CCTK_REAL const p1odz = INV(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)); + + /* Loop over the grid points */ + #pragma omp parallel + LC_LOOP3 (ML_BSSN_Dissipation, + i,j,k, min[0],min[1],min[2], max[0],max[1],max[2], + cctk_lsh[0],cctk_lsh[1],cctk_lsh[2]) + { + ptrdiff_t const index = di*i + dj*j + dk*k; + + /* Assign local copies of grid functions */ + + CCTK_REAL AL = A[index]; + CCTK_REAL alphaL = alpha[index]; + CCTK_REAL alpharhsL = alpharhs[index]; + CCTK_REAL ArhsL = Arhs[index]; + CCTK_REAL At11L = At11[index]; + CCTK_REAL At11rhsL = At11rhs[index]; + CCTK_REAL At12L = At12[index]; + CCTK_REAL At12rhsL = At12rhs[index]; + CCTK_REAL At13L = At13[index]; + CCTK_REAL At13rhsL = At13rhs[index]; + CCTK_REAL At22L = At22[index]; + CCTK_REAL At22rhsL = At22rhs[index]; + CCTK_REAL At23L = At23[index]; + CCTK_REAL At23rhsL = At23rhs[index]; + CCTK_REAL At33L = At33[index]; + CCTK_REAL At33rhsL = At33rhs[index]; + CCTK_REAL B1L = B1[index]; + CCTK_REAL B1rhsL = B1rhs[index]; + CCTK_REAL B2L = B2[index]; + CCTK_REAL B2rhsL = B2rhs[index]; + CCTK_REAL B3L = B3[index]; + CCTK_REAL B3rhsL = B3rhs[index]; + CCTK_REAL beta1L = beta1[index]; + CCTK_REAL beta1rhsL = beta1rhs[index]; + CCTK_REAL beta2L = beta2[index]; + CCTK_REAL beta2rhsL = beta2rhs[index]; + CCTK_REAL beta3L = beta3[index]; + CCTK_REAL beta3rhsL = beta3rhs[index]; + CCTK_REAL gt11L = gt11[index]; + CCTK_REAL gt11rhsL = gt11rhs[index]; + CCTK_REAL gt12L = gt12[index]; + CCTK_REAL gt12rhsL = gt12rhs[index]; + CCTK_REAL gt13L = gt13[index]; + CCTK_REAL gt13rhsL = gt13rhs[index]; + CCTK_REAL gt22L = gt22[index]; + CCTK_REAL gt22rhsL = gt22rhs[index]; + CCTK_REAL gt23L = gt23[index]; + CCTK_REAL gt23rhsL = gt23rhs[index]; + CCTK_REAL gt33L = gt33[index]; + CCTK_REAL gt33rhsL = gt33rhs[index]; + CCTK_REAL phiL = phi[index]; + CCTK_REAL phirhsL = phirhs[index]; + CCTK_REAL trKL = trK[index]; + CCTK_REAL trKrhsL = trKrhs[index]; + CCTK_REAL Xt1L = Xt1[index]; + CCTK_REAL Xt1rhsL = Xt1rhs[index]; + CCTK_REAL Xt2L = Xt2[index]; + CCTK_REAL Xt2rhsL = Xt2rhs[index]; + CCTK_REAL Xt3L = Xt3[index]; + CCTK_REAL Xt3rhsL = Xt3rhs[index]; + + + /* Include user supplied include files */ + + /* Precompute derivatives */ + CCTK_REAL const PDdissipationNth1A = PDdissipationNth1(&A[index]); + CCTK_REAL const PDdissipationNth2A = PDdissipationNth2(&A[index]); + CCTK_REAL const PDdissipationNth3A = PDdissipationNth3(&A[index]); + CCTK_REAL const PDdissipationNth1alpha = PDdissipationNth1(&alpha[index]); + CCTK_REAL const PDdissipationNth2alpha = PDdissipationNth2(&alpha[index]); + CCTK_REAL const PDdissipationNth3alpha = PDdissipationNth3(&alpha[index]); + CCTK_REAL const PDdissipationNth1At11 = PDdissipationNth1(&At11[index]); + CCTK_REAL const PDdissipationNth2At11 = PDdissipationNth2(&At11[index]); + CCTK_REAL const PDdissipationNth3At11 = PDdissipationNth3(&At11[index]); + CCTK_REAL const PDdissipationNth1At12 = PDdissipationNth1(&At12[index]); + CCTK_REAL const PDdissipationNth2At12 = PDdissipationNth2(&At12[index]); + CCTK_REAL const PDdissipationNth3At12 = PDdissipationNth3(&At12[index]); + CCTK_REAL const PDdissipationNth1At13 = PDdissipationNth1(&At13[index]); + CCTK_REAL const PDdissipationNth2At13 = PDdissipationNth2(&At13[index]); + CCTK_REAL const PDdissipationNth3At13 = PDdissipationNth3(&At13[index]); + CCTK_REAL const PDdissipationNth1At22 = PDdissipationNth1(&At22[index]); + CCTK_REAL const PDdissipationNth2At22 = PDdissipationNth2(&At22[index]); + CCTK_REAL const PDdissipationNth3At22 = PDdissipationNth3(&At22[index]); + CCTK_REAL const PDdissipationNth1At23 = PDdissipationNth1(&At23[index]); + CCTK_REAL const PDdissipationNth2At23 = PDdissipationNth2(&At23[index]); + CCTK_REAL const PDdissipationNth3At23 = PDdissipationNth3(&At23[index]); + CCTK_REAL const PDdissipationNth1At33 = PDdissipationNth1(&At33[index]); + CCTK_REAL const PDdissipationNth2At33 = PDdissipationNth2(&At33[index]); + CCTK_REAL const PDdissipationNth3At33 = PDdissipationNth3(&At33[index]); + CCTK_REAL const PDdissipationNth1B1 = PDdissipationNth1(&B1[index]); + CCTK_REAL const PDdissipationNth2B1 = PDdissipationNth2(&B1[index]); + CCTK_REAL const PDdissipationNth3B1 = PDdissipationNth3(&B1[index]); + CCTK_REAL const PDdissipationNth1B2 = PDdissipationNth1(&B2[index]); + CCTK_REAL const PDdissipationNth2B2 = PDdissipationNth2(&B2[index]); + CCTK_REAL const PDdissipationNth3B2 = PDdissipationNth3(&B2[index]); + CCTK_REAL const PDdissipationNth1B3 = PDdissipationNth1(&B3[index]); + CCTK_REAL const PDdissipationNth2B3 = PDdissipationNth2(&B3[index]); + CCTK_REAL const PDdissipationNth3B3 = PDdissipationNth3(&B3[index]); + CCTK_REAL const PDdissipationNth1beta1 = PDdissipationNth1(&beta1[index]); + CCTK_REAL const PDdissipationNth2beta1 = PDdissipationNth2(&beta1[index]); + CCTK_REAL const PDdissipationNth3beta1 = PDdissipationNth3(&beta1[index]); + CCTK_REAL const PDdissipationNth1beta2 = PDdissipationNth1(&beta2[index]); + CCTK_REAL const PDdissipationNth2beta2 = PDdissipationNth2(&beta2[index]); + CCTK_REAL const PDdissipationNth3beta2 = PDdissipationNth3(&beta2[index]); + CCTK_REAL const PDdissipationNth1beta3 = PDdissipationNth1(&beta3[index]); + CCTK_REAL const PDdissipationNth2beta3 = PDdissipationNth2(&beta3[index]); + CCTK_REAL const PDdissipationNth3beta3 = PDdissipationNth3(&beta3[index]); + CCTK_REAL const PDdissipationNth1gt11 = PDdissipationNth1(>11[index]); + CCTK_REAL const PDdissipationNth2gt11 = PDdissipationNth2(>11[index]); + CCTK_REAL const PDdissipationNth3gt11 = PDdissipationNth3(>11[index]); + CCTK_REAL const PDdissipationNth1gt12 = PDdissipationNth1(>12[index]); + CCTK_REAL const PDdissipationNth2gt12 = PDdissipationNth2(>12[index]); + CCTK_REAL const PDdissipationNth3gt12 = PDdissipationNth3(>12[index]); + CCTK_REAL const PDdissipationNth1gt13 = PDdissipationNth1(>13[index]); + CCTK_REAL const PDdissipationNth2gt13 = PDdissipationNth2(>13[index]); + CCTK_REAL const PDdissipationNth3gt13 = PDdissipationNth3(>13[index]); + CCTK_REAL const PDdissipationNth1gt22 = PDdissipationNth1(>22[index]); + CCTK_REAL const PDdissipationNth2gt22 = PDdissipationNth2(>22[index]); + CCTK_REAL const PDdissipationNth3gt22 = PDdissipationNth3(>22[index]); + CCTK_REAL const PDdissipationNth1gt23 = PDdissipationNth1(>23[index]); + CCTK_REAL const PDdissipationNth2gt23 = PDdissipationNth2(>23[index]); + CCTK_REAL const PDdissipationNth3gt23 = PDdissipationNth3(>23[index]); + CCTK_REAL const PDdissipationNth1gt33 = PDdissipationNth1(>33[index]); + CCTK_REAL const PDdissipationNth2gt33 = PDdissipationNth2(>33[index]); + CCTK_REAL const PDdissipationNth3gt33 = PDdissipationNth3(>33[index]); + CCTK_REAL const PDdissipationNth1phi = PDdissipationNth1(&phi[index]); + CCTK_REAL const PDdissipationNth2phi = PDdissipationNth2(&phi[index]); + CCTK_REAL const PDdissipationNth3phi = PDdissipationNth3(&phi[index]); + CCTK_REAL const PDdissipationNth1trK = PDdissipationNth1(&trK[index]); + CCTK_REAL const PDdissipationNth2trK = PDdissipationNth2(&trK[index]); + CCTK_REAL const PDdissipationNth3trK = PDdissipationNth3(&trK[index]); + CCTK_REAL const PDdissipationNth1Xt1 = PDdissipationNth1(&Xt1[index]); + CCTK_REAL const PDdissipationNth2Xt1 = PDdissipationNth2(&Xt1[index]); + CCTK_REAL const PDdissipationNth3Xt1 = PDdissipationNth3(&Xt1[index]); + CCTK_REAL const PDdissipationNth1Xt2 = PDdissipationNth1(&Xt2[index]); + CCTK_REAL const PDdissipationNth2Xt2 = PDdissipationNth2(&Xt2[index]); + CCTK_REAL const PDdissipationNth3Xt2 = PDdissipationNth3(&Xt2[index]); + CCTK_REAL const PDdissipationNth1Xt3 = PDdissipationNth1(&Xt3[index]); + CCTK_REAL const PDdissipationNth2Xt3 = PDdissipationNth2(&Xt3[index]); + CCTK_REAL const PDdissipationNth3Xt3 = PDdissipationNth3(&Xt3[index]); + + /* Calculate temporaries and grid functions */ + CCTK_REAL epsdiss1 = ToReal(EpsDiss); + + CCTK_REAL epsdiss2 = ToReal(EpsDiss); + + CCTK_REAL epsdiss3 = ToReal(EpsDiss); + + phirhsL = epsdiss1*PDdissipationNth1phi + + epsdiss2*PDdissipationNth2phi + epsdiss3*PDdissipationNth3phi + + phirhsL; + + gt11rhsL = gt11rhsL + epsdiss1*PDdissipationNth1gt11 + + epsdiss2*PDdissipationNth2gt11 + epsdiss3*PDdissipationNth3gt11; + + gt12rhsL = gt12rhsL + epsdiss1*PDdissipationNth1gt12 + + epsdiss2*PDdissipationNth2gt12 + epsdiss3*PDdissipationNth3gt12; + + gt13rhsL = gt13rhsL + epsdiss1*PDdissipationNth1gt13 + + epsdiss2*PDdissipationNth2gt13 + epsdiss3*PDdissipationNth3gt13; + + gt22rhsL = gt22rhsL + epsdiss1*PDdissipationNth1gt22 + + epsdiss2*PDdissipationNth2gt22 + epsdiss3*PDdissipationNth3gt22; + + gt23rhsL = gt23rhsL + epsdiss1*PDdissipationNth1gt23 + + epsdiss2*PDdissipationNth2gt23 + epsdiss3*PDdissipationNth3gt23; + + gt33rhsL = gt33rhsL + epsdiss1*PDdissipationNth1gt33 + + epsdiss2*PDdissipationNth2gt33 + epsdiss3*PDdissipationNth3gt33; + + Xt1rhsL = epsdiss1*PDdissipationNth1Xt1 + + epsdiss2*PDdissipationNth2Xt1 + epsdiss3*PDdissipationNth3Xt1 + + Xt1rhsL; + + Xt2rhsL = epsdiss1*PDdissipationNth1Xt2 + + epsdiss2*PDdissipationNth2Xt2 + epsdiss3*PDdissipationNth3Xt2 + + Xt2rhsL; + + Xt3rhsL = epsdiss1*PDdissipationNth1Xt3 + + epsdiss2*PDdissipationNth2Xt3 + epsdiss3*PDdissipationNth3Xt3 + + Xt3rhsL; + + trKrhsL = epsdiss1*PDdissipationNth1trK + + epsdiss2*PDdissipationNth2trK + epsdiss3*PDdissipationNth3trK + + trKrhsL; + + At11rhsL = At11rhsL + epsdiss1*PDdissipationNth1At11 + + epsdiss2*PDdissipationNth2At11 + epsdiss3*PDdissipationNth3At11; + + At12rhsL = At12rhsL + epsdiss1*PDdissipationNth1At12 + + epsdiss2*PDdissipationNth2At12 + epsdiss3*PDdissipationNth3At12; + + At13rhsL = At13rhsL + epsdiss1*PDdissipationNth1At13 + + epsdiss2*PDdissipationNth2At13 + epsdiss3*PDdissipationNth3At13; + + At22rhsL = At22rhsL + epsdiss1*PDdissipationNth1At22 + + epsdiss2*PDdissipationNth2At22 + epsdiss3*PDdissipationNth3At22; + + At23rhsL = At23rhsL + epsdiss1*PDdissipationNth1At23 + + epsdiss2*PDdissipationNth2At23 + epsdiss3*PDdissipationNth3At23; + + At33rhsL = At33rhsL + epsdiss1*PDdissipationNth1At33 + + epsdiss2*PDdissipationNth2At33 + epsdiss3*PDdissipationNth3At33; + + alpharhsL = alpharhsL + epsdiss1*PDdissipationNth1alpha + + epsdiss2*PDdissipationNth2alpha + epsdiss3*PDdissipationNth3alpha; + + ArhsL = ArhsL + epsdiss1*PDdissipationNth1A + + epsdiss2*PDdissipationNth2A + epsdiss3*PDdissipationNth3A; + + beta1rhsL = beta1rhsL + epsdiss1*PDdissipationNth1beta1 + + epsdiss2*PDdissipationNth2beta1 + epsdiss3*PDdissipationNth3beta1; + + beta2rhsL = beta2rhsL + epsdiss1*PDdissipationNth1beta2 + + epsdiss2*PDdissipationNth2beta2 + epsdiss3*PDdissipationNth3beta2; + + beta3rhsL = beta3rhsL + epsdiss1*PDdissipationNth1beta3 + + epsdiss2*PDdissipationNth2beta3 + epsdiss3*PDdissipationNth3beta3; + + B1rhsL = B1rhsL + epsdiss1*PDdissipationNth1B1 + + epsdiss2*PDdissipationNth2B1 + epsdiss3*PDdissipationNth3B1; + + B2rhsL = B2rhsL + epsdiss1*PDdissipationNth1B2 + + epsdiss2*PDdissipationNth2B2 + epsdiss3*PDdissipationNth3B2; + + B3rhsL = B3rhsL + epsdiss1*PDdissipationNth1B3 + + epsdiss2*PDdissipationNth2B3 + epsdiss3*PDdissipationNth3B3; + + /* Copy local copies back to grid functions */ + alpharhs[index] = alpharhsL; + Arhs[index] = ArhsL; + At11rhs[index] = At11rhsL; + At12rhs[index] = At12rhsL; + At13rhs[index] = At13rhsL; + At22rhs[index] = At22rhsL; + At23rhs[index] = At23rhsL; + At33rhs[index] = At33rhsL; + B1rhs[index] = B1rhsL; + B2rhs[index] = B2rhsL; + B3rhs[index] = B3rhsL; + beta1rhs[index] = beta1rhsL; + beta2rhs[index] = beta2rhsL; + beta3rhs[index] = beta3rhsL; + gt11rhs[index] = gt11rhsL; + gt12rhs[index] = gt12rhsL; + gt13rhs[index] = gt13rhsL; + gt22rhs[index] = gt22rhsL; + gt23rhs[index] = gt23rhsL; + gt33rhs[index] = gt33rhsL; + phirhs[index] = phirhsL; + trKrhs[index] = trKrhsL; + Xt1rhs[index] = Xt1rhsL; + Xt2rhs[index] = Xt2rhsL; + Xt3rhs[index] = Xt3rhsL; + } + LC_ENDLOOP3 (ML_BSSN_Dissipation); +} + +extern "C" void ML_BSSN_Dissipation(CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + GenericFD_LoopOverInterior(cctkGH, &ML_BSSN_Dissipation_Body); +} diff --git a/ML_BSSN/src/ML_BSSN_RHS1.cc b/ML_BSSN/src/ML_BSSN_RHS1.cc index 5362559..0f1e946 100644 --- a/ML_BSSN/src/ML_BSSN_RHS1.cc +++ b/ML_BSSN/src/ML_BSSN_RHS1.cc @@ -191,9 +191,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, /* Include user supplied include files */ /* Precompute derivatives */ - CCTK_REAL const PDdissipationNth1A = PDdissipationNth1(&A[index]); - CCTK_REAL const PDdissipationNth2A = PDdissipationNth2(&A[index]); - CCTK_REAL const PDdissipationNth3A = PDdissipationNth3(&A[index]); CCTK_REAL const PDupwindNthAnti1A = PDupwindNthAnti1(&A[index]); CCTK_REAL const PDupwindNthSymm1A = PDupwindNthSymm1(&A[index]); CCTK_REAL const PDupwindNthAnti2A = PDupwindNthAnti2(&A[index]); @@ -209,36 +206,24 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const PDstandardNth12alpha = PDstandardNth12(&alpha[index]); CCTK_REAL const PDstandardNth13alpha = PDstandardNth13(&alpha[index]); CCTK_REAL const PDstandardNth23alpha = PDstandardNth23(&alpha[index]); - CCTK_REAL const PDdissipationNth1alpha = PDdissipationNth1(&alpha[index]); - CCTK_REAL const PDdissipationNth2alpha = PDdissipationNth2(&alpha[index]); - CCTK_REAL const PDdissipationNth3alpha = PDdissipationNth3(&alpha[index]); CCTK_REAL const PDupwindNthAnti1alpha = PDupwindNthAnti1(&alpha[index]); CCTK_REAL const PDupwindNthSymm1alpha = PDupwindNthSymm1(&alpha[index]); CCTK_REAL const PDupwindNthAnti2alpha = PDupwindNthAnti2(&alpha[index]); CCTK_REAL const PDupwindNthSymm2alpha = PDupwindNthSymm2(&alpha[index]); CCTK_REAL const PDupwindNthAnti3alpha = PDupwindNthAnti3(&alpha[index]); CCTK_REAL const PDupwindNthSymm3alpha = PDupwindNthSymm3(&alpha[index]); - CCTK_REAL const PDdissipationNth1B1 = PDdissipationNth1(&B1[index]); - CCTK_REAL const PDdissipationNth2B1 = PDdissipationNth2(&B1[index]); - CCTK_REAL const PDdissipationNth3B1 = PDdissipationNth3(&B1[index]); CCTK_REAL const PDupwindNthAnti1B1 = PDupwindNthAnti1(&B1[index]); CCTK_REAL const PDupwindNthSymm1B1 = PDupwindNthSymm1(&B1[index]); CCTK_REAL const PDupwindNthAnti2B1 = PDupwindNthAnti2(&B1[index]); CCTK_REAL const PDupwindNthSymm2B1 = PDupwindNthSymm2(&B1[index]); CCTK_REAL const PDupwindNthAnti3B1 = PDupwindNthAnti3(&B1[index]); CCTK_REAL const PDupwindNthSymm3B1 = PDupwindNthSymm3(&B1[index]); - CCTK_REAL const PDdissipationNth1B2 = PDdissipationNth1(&B2[index]); - CCTK_REAL const PDdissipationNth2B2 = PDdissipationNth2(&B2[index]); - CCTK_REAL const PDdissipationNth3B2 = PDdissipationNth3(&B2[index]); CCTK_REAL const PDupwindNthAnti1B2 = PDupwindNthAnti1(&B2[index]); CCTK_REAL const PDupwindNthSymm1B2 = PDupwindNthSymm1(&B2[index]); CCTK_REAL const PDupwindNthAnti2B2 = PDupwindNthAnti2(&B2[index]); CCTK_REAL const PDupwindNthSymm2B2 = PDupwindNthSymm2(&B2[index]); CCTK_REAL const PDupwindNthAnti3B2 = PDupwindNthAnti3(&B2[index]); CCTK_REAL const PDupwindNthSymm3B2 = PDupwindNthSymm3(&B2[index]); - CCTK_REAL const PDdissipationNth1B3 = PDdissipationNth1(&B3[index]); - CCTK_REAL const PDdissipationNth2B3 = PDdissipationNth2(&B3[index]); - CCTK_REAL const PDdissipationNth3B3 = PDdissipationNth3(&B3[index]); CCTK_REAL const PDupwindNthAnti1B3 = PDupwindNthAnti1(&B3[index]); CCTK_REAL const PDupwindNthSymm1B3 = PDupwindNthSymm1(&B3[index]); CCTK_REAL const PDupwindNthAnti2B3 = PDupwindNthAnti2(&B3[index]); @@ -254,9 +239,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const PDstandardNth12beta1 = PDstandardNth12(&beta1[index]); CCTK_REAL const PDstandardNth13beta1 = PDstandardNth13(&beta1[index]); CCTK_REAL const PDstandardNth23beta1 = PDstandardNth23(&beta1[index]); - CCTK_REAL const PDdissipationNth1beta1 = PDdissipationNth1(&beta1[index]); - CCTK_REAL const PDdissipationNth2beta1 = PDdissipationNth2(&beta1[index]); - CCTK_REAL const PDdissipationNth3beta1 = PDdissipationNth3(&beta1[index]); CCTK_REAL const PDupwindNthAnti1beta1 = PDupwindNthAnti1(&beta1[index]); CCTK_REAL const PDupwindNthSymm1beta1 = PDupwindNthSymm1(&beta1[index]); CCTK_REAL const PDupwindNthAnti2beta1 = PDupwindNthAnti2(&beta1[index]); @@ -272,9 +254,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const PDstandardNth12beta2 = PDstandardNth12(&beta2[index]); CCTK_REAL const PDstandardNth13beta2 = PDstandardNth13(&beta2[index]); CCTK_REAL const PDstandardNth23beta2 = PDstandardNth23(&beta2[index]); - CCTK_REAL const PDdissipationNth1beta2 = PDdissipationNth1(&beta2[index]); - CCTK_REAL const PDdissipationNth2beta2 = PDdissipationNth2(&beta2[index]); - CCTK_REAL const PDdissipationNth3beta2 = PDdissipationNth3(&beta2[index]); CCTK_REAL const PDupwindNthAnti1beta2 = PDupwindNthAnti1(&beta2[index]); CCTK_REAL const PDupwindNthSymm1beta2 = PDupwindNthSymm1(&beta2[index]); CCTK_REAL const PDupwindNthAnti2beta2 = PDupwindNthAnti2(&beta2[index]); @@ -290,9 +269,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const PDstandardNth12beta3 = PDstandardNth12(&beta3[index]); CCTK_REAL const PDstandardNth13beta3 = PDstandardNth13(&beta3[index]); CCTK_REAL const PDstandardNth23beta3 = PDstandardNth23(&beta3[index]); - CCTK_REAL const PDdissipationNth1beta3 = PDdissipationNth1(&beta3[index]); - CCTK_REAL const PDdissipationNth2beta3 = PDdissipationNth2(&beta3[index]); - CCTK_REAL const PDdissipationNth3beta3 = PDdissipationNth3(&beta3[index]); CCTK_REAL const PDupwindNthAnti1beta3 = PDupwindNthAnti1(&beta3[index]); CCTK_REAL const PDupwindNthSymm1beta3 = PDupwindNthSymm1(&beta3[index]); CCTK_REAL const PDupwindNthAnti2beta3 = PDupwindNthAnti2(&beta3[index]); @@ -302,9 +278,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const PDstandardNth1gt11 = PDstandardNth1(>11[index]); CCTK_REAL const PDstandardNth2gt11 = PDstandardNth2(>11[index]); CCTK_REAL const PDstandardNth3gt11 = PDstandardNth3(>11[index]); - CCTK_REAL const PDdissipationNth1gt11 = PDdissipationNth1(>11[index]); - CCTK_REAL const PDdissipationNth2gt11 = PDdissipationNth2(>11[index]); - CCTK_REAL const PDdissipationNth3gt11 = PDdissipationNth3(>11[index]); CCTK_REAL const PDupwindNthAnti1gt11 = PDupwindNthAnti1(>11[index]); CCTK_REAL const PDupwindNthSymm1gt11 = PDupwindNthSymm1(>11[index]); CCTK_REAL const PDupwindNthAnti2gt11 = PDupwindNthAnti2(>11[index]); @@ -314,9 +287,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const PDstandardNth1gt12 = PDstandardNth1(>12[index]); CCTK_REAL const PDstandardNth2gt12 = PDstandardNth2(>12[index]); CCTK_REAL const PDstandardNth3gt12 = PDstandardNth3(>12[index]); - CCTK_REAL const PDdissipationNth1gt12 = PDdissipationNth1(>12[index]); - CCTK_REAL const PDdissipationNth2gt12 = PDdissipationNth2(>12[index]); - CCTK_REAL const PDdissipationNth3gt12 = PDdissipationNth3(>12[index]); CCTK_REAL const PDupwindNthAnti1gt12 = PDupwindNthAnti1(>12[index]); CCTK_REAL const PDupwindNthSymm1gt12 = PDupwindNthSymm1(>12[index]); CCTK_REAL const PDupwindNthAnti2gt12 = PDupwindNthAnti2(>12[index]); @@ -326,9 +296,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const PDstandardNth1gt13 = PDstandardNth1(>13[index]); CCTK_REAL const PDstandardNth2gt13 = PDstandardNth2(>13[index]); CCTK_REAL const PDstandardNth3gt13 = PDstandardNth3(>13[index]); - CCTK_REAL const PDdissipationNth1gt13 = PDdissipationNth1(>13[index]); - CCTK_REAL const PDdissipationNth2gt13 = PDdissipationNth2(>13[index]); - CCTK_REAL const PDdissipationNth3gt13 = PDdissipationNth3(>13[index]); CCTK_REAL const PDupwindNthAnti1gt13 = PDupwindNthAnti1(>13[index]); CCTK_REAL const PDupwindNthSymm1gt13 = PDupwindNthSymm1(>13[index]); CCTK_REAL const PDupwindNthAnti2gt13 = PDupwindNthAnti2(>13[index]); @@ -338,9 +305,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const PDstandardNth1gt22 = PDstandardNth1(>22[index]); CCTK_REAL const PDstandardNth2gt22 = PDstandardNth2(>22[index]); CCTK_REAL const PDstandardNth3gt22 = PDstandardNth3(>22[index]); - CCTK_REAL const PDdissipationNth1gt22 = PDdissipationNth1(>22[index]); - CCTK_REAL const PDdissipationNth2gt22 = PDdissipationNth2(>22[index]); - CCTK_REAL const PDdissipationNth3gt22 = PDdissipationNth3(>22[index]); CCTK_REAL const PDupwindNthAnti1gt22 = PDupwindNthAnti1(>22[index]); CCTK_REAL const PDupwindNthSymm1gt22 = PDupwindNthSymm1(>22[index]); CCTK_REAL const PDupwindNthAnti2gt22 = PDupwindNthAnti2(>22[index]); @@ -350,9 +314,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const PDstandardNth1gt23 = PDstandardNth1(>23[index]); CCTK_REAL const PDstandardNth2gt23 = PDstandardNth2(>23[index]); CCTK_REAL const PDstandardNth3gt23 = PDstandardNth3(>23[index]); - CCTK_REAL const PDdissipationNth1gt23 = PDdissipationNth1(>23[index]); - CCTK_REAL const PDdissipationNth2gt23 = PDdissipationNth2(>23[index]); - CCTK_REAL const PDdissipationNth3gt23 = PDdissipationNth3(>23[index]); CCTK_REAL const PDupwindNthAnti1gt23 = PDupwindNthAnti1(>23[index]); CCTK_REAL const PDupwindNthSymm1gt23 = PDupwindNthSymm1(>23[index]); CCTK_REAL const PDupwindNthAnti2gt23 = PDupwindNthAnti2(>23[index]); @@ -362,9 +323,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const PDstandardNth1gt33 = PDstandardNth1(>33[index]); CCTK_REAL const PDstandardNth2gt33 = PDstandardNth2(>33[index]); CCTK_REAL const PDstandardNth3gt33 = PDstandardNth3(>33[index]); - CCTK_REAL const PDdissipationNth1gt33 = PDdissipationNth1(>33[index]); - CCTK_REAL const PDdissipationNth2gt33 = PDdissipationNth2(>33[index]); - CCTK_REAL const PDdissipationNth3gt33 = PDdissipationNth3(>33[index]); CCTK_REAL const PDupwindNthAnti1gt33 = PDupwindNthAnti1(>33[index]); CCTK_REAL const PDupwindNthSymm1gt33 = PDupwindNthSymm1(>33[index]); CCTK_REAL const PDupwindNthAnti2gt33 = PDupwindNthAnti2(>33[index]); @@ -374,9 +332,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const PDstandardNth1phi = PDstandardNth1(&phi[index]); CCTK_REAL const PDstandardNth2phi = PDstandardNth2(&phi[index]); CCTK_REAL const PDstandardNth3phi = PDstandardNth3(&phi[index]); - CCTK_REAL const PDdissipationNth1phi = PDdissipationNth1(&phi[index]); - CCTK_REAL const PDdissipationNth2phi = PDdissipationNth2(&phi[index]); - CCTK_REAL const PDdissipationNth3phi = PDdissipationNth3(&phi[index]); CCTK_REAL const PDupwindNthAnti1phi = PDupwindNthAnti1(&phi[index]); CCTK_REAL const PDupwindNthSymm1phi = PDupwindNthSymm1(&phi[index]); CCTK_REAL const PDupwindNthAnti2phi = PDupwindNthAnti2(&phi[index]); @@ -386,36 +341,24 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const PDstandardNth1trK = PDstandardNth1(&trK[index]); CCTK_REAL const PDstandardNth2trK = PDstandardNth2(&trK[index]); CCTK_REAL const PDstandardNth3trK = PDstandardNth3(&trK[index]); - CCTK_REAL const PDdissipationNth1trK = PDdissipationNth1(&trK[index]); - CCTK_REAL const PDdissipationNth2trK = PDdissipationNth2(&trK[index]); - CCTK_REAL const PDdissipationNth3trK = PDdissipationNth3(&trK[index]); CCTK_REAL const PDupwindNthAnti1trK = PDupwindNthAnti1(&trK[index]); CCTK_REAL const PDupwindNthSymm1trK = PDupwindNthSymm1(&trK[index]); CCTK_REAL const PDupwindNthAnti2trK = PDupwindNthAnti2(&trK[index]); CCTK_REAL const PDupwindNthSymm2trK = PDupwindNthSymm2(&trK[index]); CCTK_REAL const PDupwindNthAnti3trK = PDupwindNthAnti3(&trK[index]); CCTK_REAL const PDupwindNthSymm3trK = PDupwindNthSymm3(&trK[index]); - CCTK_REAL const PDdissipationNth1Xt1 = PDdissipationNth1(&Xt1[index]); - CCTK_REAL const PDdissipationNth2Xt1 = PDdissipationNth2(&Xt1[index]); - CCTK_REAL const PDdissipationNth3Xt1 = PDdissipationNth3(&Xt1[index]); CCTK_REAL const PDupwindNthAnti1Xt1 = PDupwindNthAnti1(&Xt1[index]); CCTK_REAL const PDupwindNthSymm1Xt1 = PDupwindNthSymm1(&Xt1[index]); CCTK_REAL const PDupwindNthAnti2Xt1 = PDupwindNthAnti2(&Xt1[index]); CCTK_REAL const PDupwindNthSymm2Xt1 = PDupwindNthSymm2(&Xt1[index]); CCTK_REAL const PDupwindNthAnti3Xt1 = PDupwindNthAnti3(&Xt1[index]); CCTK_REAL const PDupwindNthSymm3Xt1 = PDupwindNthSymm3(&Xt1[index]); - CCTK_REAL const PDdissipationNth1Xt2 = PDdissipationNth1(&Xt2[index]); - CCTK_REAL const PDdissipationNth2Xt2 = PDdissipationNth2(&Xt2[index]); - CCTK_REAL const PDdissipationNth3Xt2 = PDdissipationNth3(&Xt2[index]); CCTK_REAL const PDupwindNthAnti1Xt2 = PDupwindNthAnti1(&Xt2[index]); CCTK_REAL const PDupwindNthSymm1Xt2 = PDupwindNthSymm1(&Xt2[index]); CCTK_REAL const PDupwindNthAnti2Xt2 = PDupwindNthAnti2(&Xt2[index]); CCTK_REAL const PDupwindNthSymm2Xt2 = PDupwindNthSymm2(&Xt2[index]); CCTK_REAL const PDupwindNthAnti3Xt2 = PDupwindNthAnti3(&Xt2[index]); CCTK_REAL const PDupwindNthSymm3Xt2 = PDupwindNthSymm3(&Xt2[index]); - CCTK_REAL const PDdissipationNth1Xt3 = PDdissipationNth1(&Xt3[index]); - CCTK_REAL const PDdissipationNth2Xt3 = PDdissipationNth2(&Xt3[index]); - CCTK_REAL const PDdissipationNth3Xt3 = PDdissipationNth3(&Xt3[index]); CCTK_REAL const PDupwindNthAnti1Xt3 = PDupwindNthAnti1(&Xt3[index]); CCTK_REAL const PDupwindNthSymm1Xt3 = PDupwindNthSymm1(&Xt3[index]); CCTK_REAL const PDupwindNthAnti2Xt3 = PDupwindNthAnti2(&Xt3[index]); @@ -430,12 +373,6 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, ptrdiff_t dir3 = Sign(beta3L); - CCTK_REAL epsdiss1 = ToReal(EpsDiss); - - CCTK_REAL epsdiss2 = ToReal(EpsDiss); - - CCTK_REAL epsdiss3 = ToReal(EpsDiss); - CCTK_REAL detgt = 1; CCTK_REAL gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); @@ -594,20 +531,18 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL trS = em4phi*(eTxxL*gtu11 + eTyyL*gtu22 + 2*(eTxyL*gtu12 + eTxzL*gtu13 + eTyzL*gtu23) + eTzzL*gtu33); - CCTK_REAL phirhsL = epsdiss1*PDdissipationNth1phi + - epsdiss2*PDdissipationNth2phi + epsdiss3*PDdissipationNth3phi + - beta1L*PDupwindNthAnti1phi + beta2L*PDupwindNthAnti2phi + - beta3L*PDupwindNthAnti3phi + PDupwindNthSymm1phi*Abs(beta1L) + - PDupwindNthSymm2phi*Abs(beta2L) + PDupwindNthSymm3phi*Abs(beta3L) + + CCTK_REAL phirhsL = beta1L*PDupwindNthAnti1phi + + beta2L*PDupwindNthAnti2phi + beta3L*PDupwindNthAnti3phi + + PDupwindNthSymm1phi*Abs(beta1L) + PDupwindNthSymm2phi*Abs(beta2L) + + PDupwindNthSymm3phi*Abs(beta3L) + IfThen(ToReal(conformalMethod),phiL*(-0.333333333333333333333333333333*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) + 0.333333333333333333333333333333*alphaL*trKL),0.166666666666666666666666666667*(PDstandardNth1beta1 + PDstandardNth2beta2 + PDstandardNth3beta3) - 0.166666666666666666666666666667*alphaL*trKL); - CCTK_REAL gt11rhsL = -2*alphaL*At11L + epsdiss1*PDdissipationNth1gt11 - + epsdiss2*PDdissipationNth2gt11 + epsdiss3*PDdissipationNth3gt11 + - 2*(gt12L*PDstandardNth1beta2 + gt13L*PDstandardNth1beta3) + + CCTK_REAL gt11rhsL = -2*alphaL*At11L + 2*(gt12L*PDstandardNth1beta2 + + gt13L*PDstandardNth1beta3) + gt11L*(1.33333333333333333333333333333*PDstandardNth1beta1 - 0.666666666666666666666666666667*(PDstandardNth2beta2 + PDstandardNth3beta3)) + beta1L*PDupwindNthAnti1gt11 + @@ -615,10 +550,9 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, PDupwindNthSymm1gt11*Abs(beta1L) + PDupwindNthSymm2gt11*Abs(beta2L) + PDupwindNthSymm3gt11*Abs(beta3L); - CCTK_REAL gt12rhsL = -2*alphaL*At12L + epsdiss1*PDdissipationNth1gt12 - + epsdiss2*PDdissipationNth2gt12 + epsdiss3*PDdissipationNth3gt12 + - gt22L*PDstandardNth1beta2 + gt23L*PDstandardNth1beta3 + - gt11L*PDstandardNth2beta1 + gt13L*PDstandardNth2beta3 + + CCTK_REAL gt12rhsL = -2*alphaL*At12L + gt22L*PDstandardNth1beta2 + + gt23L*PDstandardNth1beta3 + gt11L*PDstandardNth2beta1 + + gt13L*PDstandardNth2beta3 + gt12L*(0.333333333333333333333333333333*(PDstandardNth1beta1 + PDstandardNth2beta2) - 0.666666666666666666666666666667*PDstandardNth3beta3) + @@ -626,10 +560,9 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, beta3L*PDupwindNthAnti3gt12 + PDupwindNthSymm1gt12*Abs(beta1L) + PDupwindNthSymm2gt12*Abs(beta2L) + PDupwindNthSymm3gt12*Abs(beta3L); - CCTK_REAL gt13rhsL = -2*alphaL*At13L + epsdiss1*PDdissipationNth1gt13 - + epsdiss2*PDdissipationNth2gt13 + epsdiss3*PDdissipationNth3gt13 + - gt23L*PDstandardNth1beta2 + gt33L*PDstandardNth1beta3 + - gt11L*PDstandardNth3beta1 + gt12L*PDstandardNth3beta2 + + CCTK_REAL gt13rhsL = -2*alphaL*At13L + gt23L*PDstandardNth1beta2 + + gt33L*PDstandardNth1beta3 + gt11L*PDstandardNth3beta1 + + gt12L*PDstandardNth3beta2 + gt13L*(-0.666666666666666666666666666667*PDstandardNth2beta2 + 0.333333333333333333333333333333*(PDstandardNth1beta1 + PDstandardNth3beta3)) + beta1L*PDupwindNthAnti1gt13 + @@ -637,9 +570,8 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, PDupwindNthSymm1gt13*Abs(beta1L) + PDupwindNthSymm2gt13*Abs(beta2L) + PDupwindNthSymm3gt13*Abs(beta3L); - CCTK_REAL gt22rhsL = -2*alphaL*At22L + epsdiss1*PDdissipationNth1gt22 - + epsdiss2*PDdissipationNth2gt22 + epsdiss3*PDdissipationNth3gt22 + - 2*(gt12L*PDstandardNth2beta1 + gt23L*PDstandardNth2beta3) + + CCTK_REAL gt22rhsL = -2*alphaL*At22L + 2*(gt12L*PDstandardNth2beta1 + + gt23L*PDstandardNth2beta3) + gt22L*(1.33333333333333333333333333333*PDstandardNth2beta2 - 0.666666666666666666666666666667*(PDstandardNth1beta1 + PDstandardNth3beta3)) + beta1L*PDupwindNthAnti1gt22 + @@ -647,10 +579,9 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, PDupwindNthSymm1gt22*Abs(beta1L) + PDupwindNthSymm2gt22*Abs(beta2L) + PDupwindNthSymm3gt22*Abs(beta3L); - CCTK_REAL gt23rhsL = -2*alphaL*At23L + epsdiss1*PDdissipationNth1gt23 - + epsdiss2*PDdissipationNth2gt23 + epsdiss3*PDdissipationNth3gt23 + - gt13L*PDstandardNth2beta1 + gt33L*PDstandardNth2beta3 + - gt12L*PDstandardNth3beta1 + gt22L*PDstandardNth3beta2 + + CCTK_REAL gt23rhsL = -2*alphaL*At23L + gt13L*PDstandardNth2beta1 + + gt33L*PDstandardNth2beta3 + gt12L*PDstandardNth3beta1 + + gt22L*PDstandardNth3beta2 + gt23L*(-0.666666666666666666666666666667*PDstandardNth1beta1 + 0.333333333333333333333333333333*(PDstandardNth2beta2 + PDstandardNth3beta3)) + beta1L*PDupwindNthAnti1gt23 + @@ -658,9 +589,8 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, PDupwindNthSymm1gt23*Abs(beta1L) + PDupwindNthSymm2gt23*Abs(beta2L) + PDupwindNthSymm3gt23*Abs(beta3L); - CCTK_REAL gt33rhsL = -2*alphaL*At33L + epsdiss1*PDdissipationNth1gt33 - + epsdiss2*PDdissipationNth2gt33 + epsdiss3*PDdissipationNth3gt33 + - 2*(gt13L*PDstandardNth3beta1 + gt23L*PDstandardNth3beta2) + + CCTK_REAL gt33rhsL = -2*alphaL*At33L + 2*(gt13L*PDstandardNth3beta1 + + gt23L*PDstandardNth3beta2) + gt33L*(-0.666666666666666666666666666667*(PDstandardNth1beta1 + PDstandardNth2beta2) + 1.33333333333333333333333333333*PDstandardNth3beta3) + @@ -731,44 +661,37 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, beta3L*PDupwindNthAnti3Xt3 + PDupwindNthSymm1Xt3*Abs(beta1L) + PDupwindNthSymm2Xt3*Abs(beta2L) + PDupwindNthSymm3Xt3*Abs(beta3L))); - CCTK_REAL Xt1rhsL = dotXt1 + epsdiss1*PDdissipationNth1Xt1 + - epsdiss2*PDdissipationNth2Xt1 + epsdiss3*PDdissipationNth3Xt1; - - CCTK_REAL Xt2rhsL = dotXt2 + epsdiss1*PDdissipationNth1Xt2 + - epsdiss2*PDdissipationNth2Xt2 + epsdiss3*PDdissipationNth3Xt2; - - CCTK_REAL Xt3rhsL = dotXt3 + epsdiss1*PDdissipationNth1Xt3 + - epsdiss2*PDdissipationNth2Xt3 + epsdiss3*PDdissipationNth3Xt3; - - CCTK_REAL dottrK = epsdiss1*PDdissipationNth1trK + - epsdiss2*PDdissipationNth2trK + epsdiss3*PDdissipationNth3trK + - beta1L*PDupwindNthAnti1trK + beta2L*PDupwindNthAnti2trK + - beta3L*PDupwindNthAnti3trK - em4phi*(gtu11*PDstandardNth11alpha + - gtu22*PDstandardNth22alpha + gtu33*(PDstandardNth33alpha + - 2*cdphi3*PDstandardNth3alpha) + 2*(gtu12*PDstandardNth12alpha + - gtu13*(PDstandardNth13alpha + cdphi1*PDstandardNth3alpha) + - gtu23*(PDstandardNth23alpha + cdphi2*PDstandardNth3alpha)) + - PDstandardNth1alpha*(2*(cdphi1*gtu11 + cdphi2*gtu12 + cdphi3*gtu13) - - Xtn1) + PDstandardNth2alpha*(2*(cdphi1*gtu12 + cdphi2*gtu22 + - cdphi3*gtu23) - Xtn2) - PDstandardNth3alpha*Xtn3) + - PDupwindNthSymm1trK*Abs(beta1L) + PDupwindNthSymm2trK*Abs(beta2L) + - PDupwindNthSymm3trK*Abs(beta3L) + alphaL*(2*(Atm12*Atm21 + Atm13*Atm31 - + Atm23*Atm32) + 12.56637061435917295385057353311801153679*(rho + trS) - + SQR(Atm11) + SQR(Atm22) + SQR(Atm33) + - 0.333333333333333333333333333333*SQR(trKL)); + CCTK_REAL Xt1rhsL = dotXt1; + + CCTK_REAL Xt2rhsL = dotXt2; + + CCTK_REAL Xt3rhsL = dotXt3; + + CCTK_REAL dottrK = beta1L*PDupwindNthAnti1trK + + beta2L*PDupwindNthAnti2trK + beta3L*PDupwindNthAnti3trK - + em4phi*(gtu11*PDstandardNth11alpha + gtu22*PDstandardNth22alpha + + gtu33*(PDstandardNth33alpha + 2*cdphi3*PDstandardNth3alpha) + + 2*(gtu12*PDstandardNth12alpha + gtu13*(PDstandardNth13alpha + + cdphi1*PDstandardNth3alpha) + gtu23*(PDstandardNth23alpha + + cdphi2*PDstandardNth3alpha)) + PDstandardNth1alpha*(2*(cdphi1*gtu11 + + cdphi2*gtu12 + cdphi3*gtu13) - Xtn1) + + PDstandardNth2alpha*(2*(cdphi1*gtu12 + cdphi2*gtu22 + cdphi3*gtu23) - + Xtn2) - PDstandardNth3alpha*Xtn3) + PDupwindNthSymm1trK*Abs(beta1L) + + PDupwindNthSymm2trK*Abs(beta2L) + PDupwindNthSymm3trK*Abs(beta3L) + + alphaL*(2*(Atm12*Atm21 + Atm13*Atm31 + Atm23*Atm32) + + 12.56637061435917295385057353311801153679*(rho + trS) + SQR(Atm11) + + SQR(Atm22) + SQR(Atm33) + 0.333333333333333333333333333333*SQR(trKL)); CCTK_REAL trKrhsL = dottrK; - CCTK_REAL alpharhsL = epsdiss1*PDdissipationNth1alpha + - epsdiss2*PDdissipationNth2alpha + epsdiss3*PDdissipationNth3alpha - - pow(alphaL,ToReal(harmonicN))*ToReal(harmonicF)*(trKL + (AL - - trKL)*ToReal(LapseACoeff)) + (beta1L*PDupwindNthAnti1alpha + + CCTK_REAL alpharhsL = + -(pow(alphaL,ToReal(harmonicN))*ToReal(harmonicF)*(trKL + (AL - + trKL)*ToReal(LapseACoeff))) + (beta1L*PDupwindNthAnti1alpha + beta2L*PDupwindNthAnti2alpha + beta3L*PDupwindNthAnti3alpha + PDupwindNthSymm1alpha*Abs(beta1L) + PDupwindNthSymm2alpha*Abs(beta2L) + PDupwindNthSymm3alpha*Abs(beta3L))*ToReal(LapseAdvectionCoeff); - CCTK_REAL ArhsL = epsdiss1*PDdissipationNth1A + - epsdiss2*PDdissipationNth2A + epsdiss3*PDdissipationNth3A + (dottrK - + CCTK_REAL ArhsL = (dottrK - AL*ToReal(AlphaDriver))*ToReal(LapseACoeff) + (beta1L*PDupwindNthAnti1A + beta2L*PDupwindNthAnti2A + beta3L*PDupwindNthAnti3A + PDupwindNthSymm1A*Abs(beta1L) + PDupwindNthSymm2A*Abs(beta2L) + @@ -779,57 +702,45 @@ static void ML_BSSN_RHS1_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL theta = fmin(1,exp(1 - rL*INV(ToReal(SpatialShiftGammaCoeffRadius)))); - CCTK_REAL beta1rhsL = epsdiss1*PDdissipationNth1beta1 + - epsdiss2*PDdissipationNth2beta1 + epsdiss3*PDdissipationNth3beta1 + - (beta1L*PDupwindNthAnti1beta1 + beta2L*PDupwindNthAnti2beta1 + - beta3L*PDupwindNthAnti3beta1 + PDupwindNthSymm1beta1*Abs(beta1L) + - PDupwindNthSymm2beta1*Abs(beta2L) + + CCTK_REAL beta1rhsL = (beta1L*PDupwindNthAnti1beta1 + + beta2L*PDupwindNthAnti2beta1 + beta3L*PDupwindNthAnti3beta1 + + PDupwindNthSymm1beta1*Abs(beta1L) + PDupwindNthSymm2beta1*Abs(beta2L) + PDupwindNthSymm3beta1*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) + theta*(Xt1L + beta1L*eta*ToReal(BetaDriver)*(-1 + ToReal(ShiftBCoeff)) + (B1L - Xt1L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff); - CCTK_REAL beta2rhsL = epsdiss1*PDdissipationNth1beta2 + - epsdiss2*PDdissipationNth2beta2 + epsdiss3*PDdissipationNth3beta2 + - (beta1L*PDupwindNthAnti1beta2 + beta2L*PDupwindNthAnti2beta2 + - beta3L*PDupwindNthAnti3beta2 + PDupwindNthSymm1beta2*Abs(beta1L) + - PDupwindNthSymm2beta2*Abs(beta2L) + + CCTK_REAL beta2rhsL = (beta1L*PDupwindNthAnti1beta2 + + beta2L*PDupwindNthAnti2beta2 + beta3L*PDupwindNthAnti3beta2 + + PDupwindNthSymm1beta2*Abs(beta1L) + PDupwindNthSymm2beta2*Abs(beta2L) + PDupwindNthSymm3beta2*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) + theta*(Xt2L + beta2L*eta*ToReal(BetaDriver)*(-1 + ToReal(ShiftBCoeff)) + (B2L - Xt2L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff); - CCTK_REAL beta3rhsL = epsdiss1*PDdissipationNth1beta3 + - epsdiss2*PDdissipationNth2beta3 + epsdiss3*PDdissipationNth3beta3 + - (beta1L*PDupwindNthAnti1beta3 + beta2L*PDupwindNthAnti2beta3 + - beta3L*PDupwindNthAnti3beta3 + PDupwindNthSymm1beta3*Abs(beta1L) + - PDupwindNthSymm2beta3*Abs(beta2L) + + CCTK_REAL beta3rhsL = (beta1L*PDupwindNthAnti1beta3 + + beta2L*PDupwindNthAnti2beta3 + beta3L*PDupwindNthAnti3beta3 + + PDupwindNthSymm1beta3*Abs(beta1L) + PDupwindNthSymm2beta3*Abs(beta2L) + PDupwindNthSymm3beta3*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) + theta*(Xt3L + beta3L*eta*ToReal(BetaDriver)*(-1 + ToReal(ShiftBCoeff)) + (B3L - Xt3L)*ToReal(ShiftBCoeff))*ToReal(ShiftGammaCoeff); - CCTK_REAL B1rhsL = epsdiss1*PDdissipationNth1B1 + - epsdiss2*PDdissipationNth2B1 + epsdiss3*PDdissipationNth3B1 + - (beta1L*(PDupwindNthAnti1B1 - PDupwindNthAnti1Xt1) + - beta2L*(PDupwindNthAnti2B1 - PDupwindNthAnti2Xt1) + + CCTK_REAL B1rhsL = (beta1L*(PDupwindNthAnti1B1 - PDupwindNthAnti1Xt1) + + beta2L*(PDupwindNthAnti2B1 - PDupwindNthAnti2Xt1) + beta3L*(PDupwindNthAnti3B1 - PDupwindNthAnti3Xt1) + (PDupwindNthSymm1B1 - PDupwindNthSymm1Xt1)*Abs(beta1L) + (PDupwindNthSymm2B1 - PDupwindNthSymm2Xt1)*Abs(beta2L) + (PDupwindNthSymm3B1 - PDupwindNthSymm3Xt1)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) + (dotXt1 - B1L*eta*ToReal(BetaDriver))*ToReal(ShiftBCoeff); - CCTK_REAL B2rhsL = epsdiss1*PDdissipationNth1B2 + - epsdiss2*PDdissipationNth2B2 + epsdiss3*PDdissipationNth3B2 + - (beta1L*(PDupwindNthAnti1B2 - PDupwindNthAnti1Xt2) + - beta2L*(PDupwindNthAnti2B2 - PDupwindNthAnti2Xt2) + + CCTK_REAL B2rhsL = (beta1L*(PDupwindNthAnti1B2 - PDupwindNthAnti1Xt2) + + beta2L*(PDupwindNthAnti2B2 - PDupwindNthAnti2Xt2) + beta3L*(PDupwindNthAnti3B2 - PDupwindNthAnti3Xt2) + (PDupwindNthSymm1B2 - PDupwindNthSymm1Xt2)*Abs(beta1L) + (PDupwindNthSymm2B2 - PDupwindNthSymm2Xt2)*Abs(beta2L) + (PDupwindNthSymm3B2 - PDupwindNthSymm3Xt2)*Abs(beta3L))*ToReal(ShiftAdvectionCoeff) + (dotXt2 - B2L*eta*ToReal(BetaDriver))*ToReal(ShiftBCoeff); - CCTK_REAL B3rhsL = epsdiss1*PDdissipationNth1B3 + - epsdiss2*PDdissipationNth2B3 + epsdiss3*PDdissipationNth3B3 + - (beta1L*(PDupwindNthAnti1B3 - PDupwindNthAnti1Xt3) + - beta2L*(PDupwindNthAnti2B3 - PDupwindNthAnti2Xt3) + + CCTK_REAL B3rhsL = (beta1L*(PDupwindNthAnti1B3 - PDupwindNthAnti1Xt3) + + beta2L*(PDupwindNthAnti2B3 - PDupwindNthAnti2Xt3) + beta3L*(PDupwindNthAnti3B3 - PDupwindNthAnti3Xt3) + (PDupwindNthSymm1B3 - PDupwindNthSymm1Xt3)*Abs(beta1L) + (PDupwindNthSymm2B3 - PDupwindNthSymm2Xt3)*Abs(beta2L) + (PDupwindNthSymm3B3 - diff --git a/ML_BSSN/src/ML_BSSN_RHS2.cc b/ML_BSSN/src/ML_BSSN_RHS2.cc index 14e28ba..a28181e 100644 --- a/ML_BSSN/src/ML_BSSN_RHS2.cc +++ b/ML_BSSN/src/ML_BSSN_RHS2.cc @@ -166,54 +166,36 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir, CCTK_REAL const PDstandardNth12alpha = PDstandardNth12(&alpha[index]); CCTK_REAL const PDstandardNth13alpha = PDstandardNth13(&alpha[index]); CCTK_REAL const PDstandardNth23alpha = PDstandardNth23(&alpha[index]); - CCTK_REAL const PDdissipationNth1At11 = PDdissipationNth1(&At11[index]); - CCTK_REAL const PDdissipationNth2At11 = PDdissipationNth2(&At11[index]); - CCTK_REAL const PDdissipationNth3At11 = PDdissipationNth3(&At11[index]); CCTK_REAL const PDupwindNthAnti1At11 = PDupwindNthAnti1(&At11[index]); CCTK_REAL const PDupwindNthSymm1At11 = PDupwindNthSymm1(&At11[index]); CCTK_REAL const PDupwindNthAnti2At11 = PDupwindNthAnti2(&At11[index]); CCTK_REAL const PDupwindNthSymm2At11 = PDupwindNthSymm2(&At11[index]); CCTK_REAL const PDupwindNthAnti3At11 = PDupwindNthAnti3(&At11[index]); CCTK_REAL const PDupwindNthSymm3At11 = PDupwindNthSymm3(&At11[index]); - CCTK_REAL const PDdissipationNth1At12 = PDdissipationNth1(&At12[index]); - CCTK_REAL const PDdissipationNth2At12 = PDdissipationNth2(&At12[index]); - CCTK_REAL const PDdissipationNth3At12 = PDdissipationNth3(&At12[index]); CCTK_REAL const PDupwindNthAnti1At12 = PDupwindNthAnti1(&At12[index]); CCTK_REAL const PDupwindNthSymm1At12 = PDupwindNthSymm1(&At12[index]); CCTK_REAL const PDupwindNthAnti2At12 = PDupwindNthAnti2(&At12[index]); CCTK_REAL const PDupwindNthSymm2At12 = PDupwindNthSymm2(&At12[index]); CCTK_REAL const PDupwindNthAnti3At12 = PDupwindNthAnti3(&At12[index]); CCTK_REAL const PDupwindNthSymm3At12 = PDupwindNthSymm3(&At12[index]); - CCTK_REAL const PDdissipationNth1At13 = PDdissipationNth1(&At13[index]); - CCTK_REAL const PDdissipationNth2At13 = PDdissipationNth2(&At13[index]); - CCTK_REAL const PDdissipationNth3At13 = PDdissipationNth3(&At13[index]); CCTK_REAL const PDupwindNthAnti1At13 = PDupwindNthAnti1(&At13[index]); CCTK_REAL const PDupwindNthSymm1At13 = PDupwindNthSymm1(&At13[index]); CCTK_REAL const PDupwindNthAnti2At13 = PDupwindNthAnti2(&At13[index]); CCTK_REAL const PDupwindNthSymm2At13 = PDupwindNthSymm2(&At13[index]); CCTK_REAL const PDupwindNthAnti3At13 = PDupwindNthAnti3(&At13[index]); CCTK_REAL const PDupwindNthSymm3At13 = PDupwindNthSymm3(&At13[index]); - CCTK_REAL const PDdissipationNth1At22 = PDdissipationNth1(&At22[index]); - CCTK_REAL const PDdissipationNth2At22 = PDdissipationNth2(&At22[index]); - CCTK_REAL const PDdissipationNth3At22 = PDdissipationNth3(&At22[index]); CCTK_REAL const PDupwindNthAnti1At22 = PDupwindNthAnti1(&At22[index]); CCTK_REAL const PDupwindNthSymm1At22 = PDupwindNthSymm1(&At22[index]); CCTK_REAL const PDupwindNthAnti2At22 = PDupwindNthAnti2(&At22[index]); CCTK_REAL const PDupwindNthSymm2At22 = PDupwindNthSymm2(&At22[index]); CCTK_REAL const PDupwindNthAnti3At22 = PDupwindNthAnti3(&At22[index]); CCTK_REAL const PDupwindNthSymm3At22 = PDupwindNthSymm3(&At22[index]); - CCTK_REAL const PDdissipationNth1At23 = PDdissipationNth1(&At23[index]); - CCTK_REAL const PDdissipationNth2At23 = PDdissipationNth2(&At23[index]); - CCTK_REAL const PDdissipationNth3At23 = PDdissipationNth3(&At23[index]); CCTK_REAL const PDupwindNthAnti1At23 = PDupwindNthAnti1(&At23[index]); CCTK_REAL const PDupwindNthSymm1At23 = PDupwindNthSymm1(&At23[index]); CCTK_REAL const PDupwindNthAnti2At23 = PDupwindNthAnti2(&At23[index]); CCTK_REAL const PDupwindNthSymm2At23 = PDupwindNthSymm2(&At23[index]); CCTK_REAL const PDupwindNthAnti3At23 = PDupwindNthAnti3(&At23[index]); CCTK_REAL const PDupwindNthSymm3At23 = PDupwindNthSymm3(&At23[index]); - CCTK_REAL const PDdissipationNth1At33 = PDdissipationNth1(&At33[index]); - CCTK_REAL const PDdissipationNth2At33 = PDdissipationNth2(&At33[index]); - CCTK_REAL const PDdissipationNth3At33 = PDdissipationNth3(&At33[index]); CCTK_REAL const PDupwindNthAnti1At33 = PDupwindNthAnti1(&At33[index]); CCTK_REAL const PDupwindNthSymm1At33 = PDupwindNthSymm1(&At33[index]); CCTK_REAL const PDupwindNthAnti2At33 = PDupwindNthAnti2(&At33[index]); @@ -309,12 +291,6 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir, ptrdiff_t dir3 = Sign(beta3L); - CCTK_REAL epsdiss1 = ToReal(EpsDiss); - - CCTK_REAL epsdiss2 = ToReal(EpsDiss); - - CCTK_REAL epsdiss3 = ToReal(EpsDiss); - CCTK_REAL detgt = 1; CCTK_REAL gtu11 = INV(detgt)*(gt22L*gt33L - SQR(gt23L)); @@ -702,11 +678,9 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir, + Ats23*gu23) + Ats33*gu33; CCTK_REAL At11rhsL = -2.*alphaL*(At11L*Atm11 + At12L*Atm21 + - At13L*Atm31) + epsdiss1*PDdissipationNth1At11 + - epsdiss2*PDdissipationNth2At11 + epsdiss3*PDdissipationNth3At11 + - 2.*(At12L*PDstandardNth1beta2 + At13L*PDstandardNth1beta3) + - beta1L*PDupwindNthAnti1At11 + beta2L*PDupwindNthAnti2At11 + - beta3L*PDupwindNthAnti3At11 + + At13L*Atm31) + 2.*(At12L*PDstandardNth1beta2 + + At13L*PDstandardNth1beta3) + beta1L*PDupwindNthAnti1At11 + + beta2L*PDupwindNthAnti2At11 + beta3L*PDupwindNthAnti3At11 + At11L*(1.333333333333333333333333333333333333333*PDstandardNth1beta1 - 0.6666666666666666666666666666666666666667*(PDstandardNth2beta2 + PDstandardNth3beta3) + alphaL*trKL) + em4phi*(Ats11 - @@ -717,9 +691,7 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir, PDupwindNthSymm3At11*Abs(beta3L); CCTK_REAL At12rhsL = -2.*alphaL*(At11L*Atm12 + At12L*Atm22 + - At13L*Atm32) + epsdiss1*PDdissipationNth1At12 + - epsdiss2*PDdissipationNth2At12 + epsdiss3*PDdissipationNth3At12 + - At22L*PDstandardNth1beta2 + At23L*PDstandardNth1beta3 + + At13L*Atm32) + At22L*PDstandardNth1beta2 + At23L*PDstandardNth1beta3 + At11L*PDstandardNth2beta1 + At13L*PDstandardNth2beta3 + beta1L*PDupwindNthAnti1At12 + beta2L*PDupwindNthAnti2At12 + beta3L*PDupwindNthAnti3At12 + @@ -734,9 +706,7 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir, PDupwindNthSymm3At12*Abs(beta3L); CCTK_REAL At13rhsL = -2.*alphaL*(At11L*Atm13 + At12L*Atm23 + - At13L*Atm33) + epsdiss1*PDdissipationNth1At13 + - epsdiss2*PDdissipationNth2At13 + epsdiss3*PDdissipationNth3At13 + - At23L*PDstandardNth1beta2 + At33L*PDstandardNth1beta3 + + At13L*Atm33) + At23L*PDstandardNth1beta2 + At33L*PDstandardNth1beta3 + At11L*PDstandardNth3beta1 + At12L*PDstandardNth3beta2 + beta1L*PDupwindNthAnti1At13 + beta2L*PDupwindNthAnti2At13 + beta3L*PDupwindNthAnti3At13 + @@ -750,11 +720,9 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir, PDupwindNthSymm3At13*Abs(beta3L); CCTK_REAL At22rhsL = -2.*alphaL*(At12L*Atm12 + At22L*Atm22 + - At23L*Atm32) + epsdiss1*PDdissipationNth1At22 + - epsdiss2*PDdissipationNth2At22 + epsdiss3*PDdissipationNth3At22 + - 2.*(At12L*PDstandardNth2beta1 + At23L*PDstandardNth2beta3) + - beta1L*PDupwindNthAnti1At22 + beta2L*PDupwindNthAnti2At22 + - beta3L*PDupwindNthAnti3At22 + + At23L*Atm32) + 2.*(At12L*PDstandardNth2beta1 + + At23L*PDstandardNth2beta3) + beta1L*PDupwindNthAnti1At22 + + beta2L*PDupwindNthAnti2At22 + beta3L*PDupwindNthAnti3At22 + At22L*(1.333333333333333333333333333333333333333*PDstandardNth2beta2 - 0.6666666666666666666666666666666666666667*(PDstandardNth1beta1 + PDstandardNth3beta3) + alphaL*trKL) + em4phi*(Ats22 - @@ -765,9 +733,7 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir, PDupwindNthSymm3At22*Abs(beta3L); CCTK_REAL At23rhsL = -2.*alphaL*(At12L*Atm13 + At22L*Atm23 + - At23L*Atm33) + epsdiss1*PDdissipationNth1At23 + - epsdiss2*PDdissipationNth2At23 + epsdiss3*PDdissipationNth3At23 + - At13L*PDstandardNth2beta1 + At33L*PDstandardNth2beta3 + + At23L*Atm33) + At13L*PDstandardNth2beta1 + At33L*PDstandardNth2beta3 + At12L*PDstandardNth3beta1 + At22L*PDstandardNth3beta2 + beta1L*PDupwindNthAnti1At23 + beta2L*PDupwindNthAnti2At23 + beta3L*PDupwindNthAnti3At23 + @@ -781,11 +747,9 @@ static void ML_BSSN_RHS2_Body(cGH const * restrict const cctkGH, int const dir, PDupwindNthSymm3At23*Abs(beta3L); CCTK_REAL At33rhsL = -2.*alphaL*(At13L*Atm13 + At23L*Atm23 + - At33L*Atm33) + epsdiss1*PDdissipationNth1At33 + - epsdiss2*PDdissipationNth2At33 + epsdiss3*PDdissipationNth3At33 + - 2.*(At13L*PDstandardNth3beta1 + At23L*PDstandardNth3beta2) + - beta1L*PDupwindNthAnti1At33 + beta2L*PDupwindNthAnti2At33 + - beta3L*PDupwindNthAnti3At33 + + At33L*Atm33) + 2.*(At13L*PDstandardNth3beta1 + + At23L*PDstandardNth3beta2) + beta1L*PDupwindNthAnti1At33 + + beta2L*PDupwindNthAnti2At33 + beta3L*PDupwindNthAnti3At33 + At33L*(-0.6666666666666666666666666666666666666667*(PDstandardNth1beta1 + PDstandardNth2beta2) + 1.333333333333333333333333333333333333333*PDstandardNth3beta3 + diff --git a/ML_BSSN/src/make.code.defn b/ML_BSSN/src/make.code.defn index bf0a051..87afabc 100644 --- a/ML_BSSN/src/make.code.defn +++ b/ML_BSSN/src/make.code.defn @@ -1,3 +1,3 @@ # File produced by Kranc -SRCS = Startup.cc RegisterMoL.cc RegisterSymmetries.cc ML_BSSN_Minkowski.cc ML_BSSN_convertFromADMBase.cc ML_BSSN_convertFromADMBaseGamma.cc ML_BSSN_RHS1.cc ML_BSSN_RHS2.cc ML_BSSN_RHSStaticBoundary.cc ML_BSSN_enforce.cc ML_BSSN_boundary.cc ML_BSSN_convertToADMBase.cc ML_BSSN_convertToADMBaseDtLapseShift.cc ML_BSSN_convertToADMBaseDtLapseShiftBoundary.cc ML_BSSN_convertToADMBaseFakeDtLapseShift.cc ML_BSSN_constraints1.cc ML_BSSN_constraints2.cc Boundaries.cc +SRCS = Startup.cc RegisterMoL.cc RegisterSymmetries.cc ML_BSSN_Minkowski.cc ML_BSSN_convertFromADMBase.cc ML_BSSN_convertFromADMBaseGamma.cc ML_BSSN_RHS1.cc ML_BSSN_RHS2.cc ML_BSSN_Dissipation.cc ML_BSSN_RHSStaticBoundary.cc ML_BSSN_enforce.cc ML_BSSN_boundary.cc ML_BSSN_convertToADMBase.cc ML_BSSN_convertToADMBaseDtLapseShift.cc ML_BSSN_convertToADMBaseDtLapseShiftBoundary.cc ML_BSSN_convertToADMBaseFakeDtLapseShift.cc ML_BSSN_constraints1.cc ML_BSSN_constraints2.cc Boundaries.cc |