aboutsummaryrefslogtreecommitdiff
path: root/ML_CCZ4/src/ML_CCZ4_constraints1.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ML_CCZ4/src/ML_CCZ4_constraints1.cc')
-rw-r--r--ML_CCZ4/src/ML_CCZ4_constraints1.cc78
1 files changed, 37 insertions, 41 deletions
diff --git a/ML_CCZ4/src/ML_CCZ4_constraints1.cc b/ML_CCZ4/src/ML_CCZ4_constraints1.cc
index 99a14e7..e39c785 100644
--- a/ML_CCZ4/src/ML_CCZ4_constraints1.cc
+++ b/ML_CCZ4/src/ML_CCZ4_constraints1.cc
@@ -703,7 +703,43 @@ static void ML_CCZ4_constraints1_Body(const cGH* restrict const cctkGH, const in
default:
CCTK_BUILTIN_UNREACHABLE();
}
-
+
+ double xx = x[index];
+ int origin = fabs(xx) < 1e-8;
+
+ PDstandardNth2gt11 = 0;
+ PDstandardNth22gt11 = origin ? PDstandardNth11gt22 : PDstandardNth1gt11 / xx - 2 * (gt11[index] - gt22[index]) / (xx * xx);
+ PDstandardNth12gt11 = 0;
+ PDstandardNth23gt11 = 0;
+ PDstandardNth2gt12 = origin ? PDstandardNth1gt11 - PDstandardNth1gt22 : (gt11[index] - gt22[index]) / xx;
+ PDstandardNth22gt12 = 0;
+ PDstandardNth12gt12 = origin ? (PDstandardNth11gt11 - PDstandardNth11gt22) / 2 : (PDstandardNth1gt11 - PDstandardNth1gt22) / xx - (gt11[index] - gt22[index]) / (xx * xx);
+ PDstandardNth23gt12 = origin ? PDstandardNth13gt11 - PDstandardNth13gt22 : (PDstandardNth3gt11 - PDstandardNth3gt22) / xx;
+ PDstandardNth2gt13 = 0;
+ PDstandardNth22gt13 = origin ? PDstandardNth11gt13 / 2 : PDstandardNth1gt13 / xx - gt13[index] / (xx * xx);
+ PDstandardNth12gt13 = 0;
+ PDstandardNth23gt13 = 0;
+ PDstandardNth2gt22 = 0;
+ PDstandardNth22gt22 = origin ? PDstandardNth11gt11 : PDstandardNth1gt22 / xx + 2 * (gt11[index] - gt22[index]) / (xx * xx);
+ PDstandardNth12gt22 = 0;
+ PDstandardNth23gt22 = 0;
+ PDstandardNth2gt23 = origin ? PDstandardNth1gt13 : gt13[index] / xx;
+ PDstandardNth22gt23 = 0;
+ PDstandardNth12gt23 = origin ? PDstandardNth11gt13 / 2 : PDstandardNth1gt13 / xx - gt13[index] / (xx * xx);
+ PDstandardNth23gt23 = origin ? PDstandardNth13gt13 : PDstandardNth3gt13 / xx;
+ PDstandardNth2gt33 = 0;
+ PDstandardNth22gt33 = origin ? PDstandardNth11gt33 : PDstandardNth1gt33 / xx;
+ PDstandardNth12gt33 = 0;
+ PDstandardNth23gt33 = 0;
+
+ PDstandardNth2phi = 0;
+ PDstandardNth22phi = origin ? PDstandardNth11phi : PDstandardNth1phi / xx;
+ PDstandardNth12phi = 0;
+ PDstandardNth23phi = 0;
+ PDstandardNth2Xt1 = 0;
+ PDstandardNth2Xt2 = origin ? PDstandardNth1Xt1 : Xt1[index] / xx;
+ PDstandardNth2Xt3 = 0;
+
/* Calculate temporaries and grid functions */
CCTK_REAL_VEC JacPDstandardNth11gt11 CCTK_ATTRIBUTE_UNUSED;
CCTK_REAL_VEC JacPDstandardNth11gt12 CCTK_ATTRIBUTE_UNUSED;
@@ -1665,46 +1701,6 @@ extern "C" void ML_CCZ4_constraints1(CCTK_ARGUMENTS)
return;
}
- const char* const groups[] = {
- "ML_CCZ4::ML_curv",
- "ML_CCZ4::ML_Gamma",
- "ML_CCZ4::ML_Ham",
- "ML_CCZ4::ML_lapse",
- "ML_CCZ4::ML_log_confac",
- "ML_CCZ4::ML_metric",
- "ML_CCZ4::ML_shift",
- "ML_CCZ4::ML_trace_curv"};
- GenericFD_AssertGroupStorage(cctkGH, "ML_CCZ4_constraints1", 8, groups);
-
- switch (fdOrder)
- {
- case 2:
- {
- GenericFD_EnsureStencilFits(cctkGH, "ML_CCZ4_constraints1", 1, 1, 1);
- break;
- }
-
- case 4:
- {
- GenericFD_EnsureStencilFits(cctkGH, "ML_CCZ4_constraints1", 2, 2, 2);
- break;
- }
-
- case 6:
- {
- GenericFD_EnsureStencilFits(cctkGH, "ML_CCZ4_constraints1", 3, 3, 3);
- break;
- }
-
- case 8:
- {
- GenericFD_EnsureStencilFits(cctkGH, "ML_CCZ4_constraints1", 4, 4, 4);
- break;
- }
- default:
- CCTK_BUILTIN_UNREACHABLE();
- }
-
GenericFD_LoopOverInterior(cctkGH, ML_CCZ4_constraints1_Body);
if (verbose > 1)