aboutsummaryrefslogtreecommitdiff
path: root/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.cc
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2011-06-12 09:24:08 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2011-06-12 09:24:08 +0200
commit05347a08d0c9bd2a87846ab4ad8990fe26274a4a (patch)
treecabc39bebecf54d332040bd16e83498a5c0240cf /ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.cc
parentf937369127deb6b5c85698a0d3c627588663f56e (diff)
Revert recent commits
These are causing NaNs when run with poison. I don't know if this is due to the tests or the code, so I am reverting the commits from 863a3e5b25e7150148f9d2b60b4b362628c675f7 to 2725eb1eb32525486df76a3686f8e550155c8e0c while the problem is being diagnosed.
Diffstat (limited to 'ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.cc')
-rw-r--r--ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.cc59
1 files changed, 23 insertions, 36 deletions
diff --git a/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.cc b/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.cc
index 917a7e9..f89f8b1 100644
--- a/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.cc
+++ b/ML_BSSN/src/ML_BSSN_convertFromADMBaseGamma.cc
@@ -282,49 +282,36 @@ static void ML_BSSN_convertFromADMBaseGamma_Body(cGH const * restrict const cctk
CCTK_REAL Xt3L = Gt311*gtu11 + Gt322*gtu22 + 2*(Gt312*gtu12 +
Gt313*gtu13 + Gt323*gtu23) + Gt333*gtu33;
- CCTK_REAL AL = IfThen(LapseACoeff !=
- 0,-(INV(ToReal(harmonicF))*pow(alphaL,-ToReal(harmonicN))*(dtalpL -
+ CCTK_REAL AL = IfThen(ToReal(LapseACoeff) !=
+ 0,-3*INV(ToReal(harmonicF))*pow(alphaL,-ToReal(harmonicN))*(9*dtalpL -
(beta1L*PDupwindNthAnti1alpha + beta2L*PDupwindNthAnti2alpha +
beta3L*PDupwindNthAnti3alpha + PDupwindNthSymm1alpha*Abs(beta1L) +
PDupwindNthSymm2alpha*Abs(beta2L) +
- PDupwindNthSymm3alpha*Abs(beta3L))*ToReal(LapseAdvectionCoeff))),0);
+ PDupwindNthSymm3alpha*Abs(beta3L))*ToReal(LapseAdvectionCoeff)),0);
CCTK_REAL theta = fmin(1,exp(1 -
rL*INV(ToReal(SpatialShiftGammaCoeffRadius))));
- CCTK_REAL B1L;
- CCTK_REAL B2L;
- CCTK_REAL B3L;
-
- if (ShiftBCoeff*ShiftGammaCoeff != 0)
- {
- B1L = INV(theta)*INV(ToReal(ShiftGammaCoeff))*(dtbetaxL -
- (beta1L*PDupwindNthAnti1beta1 + beta2L*PDupwindNthAnti2beta1 +
- beta3L*PDupwindNthAnti3beta1 + PDupwindNthSymm1beta1*Abs(beta1L) +
- PDupwindNthSymm2beta1*Abs(beta2L) +
- PDupwindNthSymm3beta1*Abs(beta3L))*ToReal(ShiftAdvectionCoeff));
-
- B2L = INV(theta)*INV(ToReal(ShiftGammaCoeff))*(dtbetayL -
- (beta1L*PDupwindNthAnti1beta2 + beta2L*PDupwindNthAnti2beta2 +
- beta3L*PDupwindNthAnti3beta2 + PDupwindNthSymm1beta2*Abs(beta1L) +
- PDupwindNthSymm2beta2*Abs(beta2L) +
- PDupwindNthSymm3beta2*Abs(beta3L))*ToReal(ShiftAdvectionCoeff));
-
- B3L = INV(theta)*INV(ToReal(ShiftGammaCoeff))*(dtbetazL -
- (beta1L*PDupwindNthAnti1beta3 + beta2L*PDupwindNthAnti2beta3 +
- beta3L*PDupwindNthAnti3beta3 + PDupwindNthSymm1beta3*Abs(beta1L) +
- PDupwindNthSymm2beta3*Abs(beta2L) +
- PDupwindNthSymm3beta3*Abs(beta3L))*ToReal(ShiftAdvectionCoeff));
- }
- else
- {
- B1L = 0;
-
- B2L = 0;
-
- B3L = 0;
- }
-
+ CCTK_REAL B1L = IfThen(ToReal(ShiftBCoeff)*ToReal(ShiftGammaCoeff) !=
+ 0,INV(theta)*INV(ToReal(ShiftGammaCoeff))*(27*dtbetaxL -
+ 3*(beta1L*PDupwindNthAnti1beta1 + beta2L*PDupwindNthAnti2beta1 +
+ beta3L*PDupwindNthAnti3beta1 + PDupwindNthSymm1beta1*Abs(beta1L) +
+ PDupwindNthSymm2beta1*Abs(beta2L) +
+ PDupwindNthSymm3beta1*Abs(beta3L))*ToReal(ShiftAdvectionCoeff)),0);
+
+ CCTK_REAL B2L = IfThen(ToReal(ShiftBCoeff)*ToReal(ShiftGammaCoeff) !=
+ 0,INV(theta)*INV(ToReal(ShiftGammaCoeff))*(27*dtbetayL -
+ 3*(beta1L*PDupwindNthAnti1beta2 + beta2L*PDupwindNthAnti2beta2 +
+ beta3L*PDupwindNthAnti3beta2 + PDupwindNthSymm1beta2*Abs(beta1L) +
+ PDupwindNthSymm2beta2*Abs(beta2L) +
+ PDupwindNthSymm3beta2*Abs(beta3L))*ToReal(ShiftAdvectionCoeff)),0);
+
+ CCTK_REAL B3L = IfThen(ToReal(ShiftBCoeff)*ToReal(ShiftGammaCoeff) !=
+ 0,INV(theta)*INV(ToReal(ShiftGammaCoeff))*(27*dtbetazL -
+ 3*(beta1L*PDupwindNthAnti1beta3 + beta2L*PDupwindNthAnti2beta3 +
+ beta3L*PDupwindNthAnti3beta3 + PDupwindNthSymm1beta3*Abs(beta1L) +
+ PDupwindNthSymm2beta3*Abs(beta2L) +
+ PDupwindNthSymm3beta3*Abs(beta3L))*ToReal(ShiftAdvectionCoeff)),0);
/* Copy local copies back to grid functions */
A[index] = AL;