[Commits] [svn:einsteintoolkit] IDAnalyticBH/trunk/src/ (Rev. 178)
bcmsma at astro.rit.edu
bcmsma at astro.rit.edu
Mon Feb 28 14:09:10 CST 2011
User: bmundim
Date: 2011/02/28 02:09 PM
Modified:
/trunk/src/
Kerr.c
Log:
Segfault with kerr initial data using IDAnalyticBH
Yosef's patch:
If initial_data=kerr and metric_type=physical, IDAnalyticBH
writes to psi[x-z] and psi[x-z][x-z] (it tries to set these
GFs to zero) even if no storage is allocated. The problem
is with the code:
IDAnalyticBH_zero_CCTK_REAL_array(npoints, psix);
etc.., which is only executed when the metric is
physical.
I was able to use the Kerr data with this patch, but just
deleting the offending lines should be sufficient.
File Changes:
Directory: /trunk/src/
======================
File [modified]: Kerr.c
Delta lines: +21 -9
===================================================================
--- trunk/src/Kerr.c 2010-11-21 03:29:37 UTC (rev 177)
+++ trunk/src/Kerr.c 2011-02-28 20:09:09 UTC (rev 178)
@@ -103,8 +103,13 @@
conformal_storage); /*NOTREACHED*/
}
}
+ else
+ {
+ *conformal_state = 0;
+ }
+
/* printf("npoints: %i\n",npoints); */
for(i = 0; i < npoints; i++)
{
@@ -311,15 +316,22 @@
}
IDAnalyticBH_zero_CCTK_REAL_array(npoints, gxz);
IDAnalyticBH_zero_CCTK_REAL_array(npoints, gyz);
- IDAnalyticBH_zero_CCTK_REAL_array(npoints, psix);
- IDAnalyticBH_zero_CCTK_REAL_array(npoints, psiy);
- IDAnalyticBH_zero_CCTK_REAL_array(npoints, psiz);
- IDAnalyticBH_zero_CCTK_REAL_array(npoints, psixx);
- IDAnalyticBH_zero_CCTK_REAL_array(npoints, psixy);
- IDAnalyticBH_zero_CCTK_REAL_array(npoints, psixz);
- IDAnalyticBH_zero_CCTK_REAL_array(npoints, psiyy);
- IDAnalyticBH_zero_CCTK_REAL_array(npoints, psiyz);
- IDAnalyticBH_zero_CCTK_REAL_array(npoints, psizz);
+
+ if (psix && *conformal_state < 2)
+ {
+ IDAnalyticBH_zero_CCTK_REAL_array(npoints, psix);
+ IDAnalyticBH_zero_CCTK_REAL_array(npoints, psiy);
+ IDAnalyticBH_zero_CCTK_REAL_array(npoints, psiz);
+ }
+ if (psixx && *conformal_state < 3)
+ {
+ IDAnalyticBH_zero_CCTK_REAL_array(npoints, psixx);
+ IDAnalyticBH_zero_CCTK_REAL_array(npoints, psixy);
+ IDAnalyticBH_zero_CCTK_REAL_array(npoints, psixz);
+ IDAnalyticBH_zero_CCTK_REAL_array(npoints, psiyy);
+ IDAnalyticBH_zero_CCTK_REAL_array(npoints, psiyz);
+ IDAnalyticBH_zero_CCTK_REAL_array(npoints, psizz);
+ }
}
return;
More information about the Commits
mailing list