aboutsummaryrefslogtreecommitdiff
path: root/src/Kerr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Kerr.c')
-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;