aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreschnett <eschnett@6a3ddf76-46e1-4315-99d9-bc56cac1ef84>2011-03-08 17:04:33 +0000
committereschnett <eschnett@6a3ddf76-46e1-4315-99d9-bc56cac1ef84>2011-03-08 17:04:33 +0000
commitf300f50f897ae891c414a829b47e77f9ddf8ef5c (patch)
treeb986df31e767f5105dd149bfb5c18baa1469653b
parent0f3d43755a4854f43d2ee79af857673fa32d3aed (diff)
The Kerr initial data (in
EinsteinInitialData?/IDAnalyticBH/src/Kerr.c) has a defect along the z-axis (that is, the spin axis of the hole). The three-metric (for instance) is not smooth across this axis, leading to discontinuities in second spatial derivatives near there. This appears to be due to overly crude safety measures protecting from division by zero when calculating this data. Tweaking these measures for more self-consistency leads to much smoother behaviour. I'm attaching a simple patch that fixes the problem at least for metric_type = physical. [Patch from Bernard Kelly] git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/IDAnalyticBH/trunk@179 6a3ddf76-46e1-4315-99d9-bc56cac1ef84
-rw-r--r--src/Kerr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Kerr.c b/src/Kerr.c
index dea5ee5..93a2611 100644
--- a/src/Kerr.c
+++ b/src/Kerr.c
@@ -117,8 +117,12 @@ void KerrID(CCTK_ARGUMENTS)
/* Define coordinate functions */
xx=x[i]; yy=y[i]; zz=z[i];
rho_2=xx*xx+yy*yy;
- if (rho_2<epsilon) rho_2=epsilon;
rho=sqrt(rho_2);
+ if (rho<epsilon) {
+ xx=epsilon;
+ rho_2=xx*xx+yy*yy;
+ rho=sqrt(rho_2);
+ }
R_2=rho_2+zz*zz;
R=sqrt(R_2);
R_3=R*R_2;