[Commits] [svn:einsteintoolkit] IDAnalyticBH/trunk/src/ (Rev. 179)

schnetter at cct.lsu.edu schnetter at cct.lsu.edu
Tue Mar 8 11:04:33 CST 2011


User: eschnett
Date: 2011/03/08 11:04 AM

Modified:
 /trunk/src/
  Kerr.c

Log:
 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]

File Changes:

Directory: /trunk/src/
======================

File [modified]: Kerr.c
Delta lines: +5 -1
===================================================================
--- trunk/src/Kerr.c	2011-02-28 20:09:09 UTC (rev 178)
+++ trunk/src/Kerr.c	2011-03-08 17:04:33 UTC (rev 179)
@@ -117,8 +117,12 @@
     /* 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;



More information about the Commits mailing list