aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/BrillLindquist.c17
-rw-r--r--src/Kerr.c17
-rw-r--r--src/Misner_multiple.c17
-rw-r--r--src/Schwarzschild.c33
4 files changed, 64 insertions, 20 deletions
diff --git a/src/BrillLindquist.c b/src/BrillLindquist.c
index 74b56e6..6793fb3 100644
--- a/src/BrillLindquist.c
+++ b/src/BrillLindquist.c
@@ -57,18 +57,27 @@ void BrillLindquist(CCTK_ARGUMENTS)
/* Check if we should create and store conformal factor stuff */
if(CCTK_EQUALS(metric_type, "static conformal"))
{
- *conformal_state = 1;
-
- if(CCTK_EQUALS(conformal_storage,"factor+derivs"))
+ if (CCTK_EQUALS(conformal_storage,"factor"))
+ {
+ *conformal_state = 1;
+ make_conformal_derivs = 0;
+ }
+ else if (CCTK_EQUALS(conformal_storage,"factor+derivs"))
{
*conformal_state = 2;
make_conformal_derivs = 1;
}
- else if(CCTK_EQUALS(conformal_storage,"factor+derivs+2nd derivs"))
+ else if (CCTK_EQUALS(conformal_storage,"factor+derivs+2nd derivs"))
{
*conformal_state = 3;
make_conformal_derivs = 1;
}
+ else
+ {
+ CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING,
+"BrillLindquist(): impossible value for conformal_storage=\"%s\"!");
+ /*NOTREACHED*/
+ }
}
else
{
diff --git a/src/Kerr.c b/src/Kerr.c
index 7527552..b1c7ee9 100644
--- a/src/Kerr.c
+++ b/src/Kerr.c
@@ -81,24 +81,33 @@ void KerrID(CCTK_ARGUMENTS)
/* Check if we should create and store conformal factor stuff */
if(CCTK_EQUALS(metric_type, "static conformal"))
{
- *conformal_state = 1;
-
- if(CCTK_EQUALS(conformal_storage,"factor+derivs"))
+ if (CCTK_EQUALS(conformal_storage,"factor"))
+ {
+ *conformal_state = 1;
+ make_conformal_derivs = 0;
+ }
+ else if (CCTK_EQUALS(conformal_storage,"factor+derivs"))
{
*conformal_state = 2;
make_conformal_derivs = 1;
}
- else if(CCTK_EQUALS(conformal_storage,"factor+derivs+2nd derivs"))
+ else if (CCTK_EQUALS(conformal_storage,"factor+derivs+2nd derivs"))
{
*conformal_state = 3;
make_conformal_derivs = 1;
}
+ else
+ {
+ CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING,
+"KerrID(): impossible value for conformal_storage=\"%s\"!"); /*NOTREACHED*/
+ }
}
else
{
make_conformal_derivs = 0;
}
+
/* printf("npoints: %i\n",npoints); */
for(i = 0; i < npoints; i++)
{
diff --git a/src/Misner_multiple.c b/src/Misner_multiple.c
index ebb7c34..bac6ea0 100644
--- a/src/Misner_multiple.c
+++ b/src/Misner_multiple.c
@@ -58,18 +58,27 @@ void Misner_multiple(CCTK_ARGUMENTS)
/* Check if we should create and store conformal factor stuff */
if(CCTK_EQUALS(metric_type, "static conformal"))
{
- *conformal_state = 1;
-
- if(CCTK_EQUALS(conformal_storage,"factor+derivs"))
+ if (CCTK_EQUALS(conformal_storage,"factor"))
+ {
+ *conformal_state = 1;
+ make_conformal_derivs = 0;
+ }
+ else if (CCTK_EQUALS(conformal_storage,"factor+derivs"))
{
*conformal_state = 2;
make_conformal_derivs = 1;
}
- else if(CCTK_EQUALS(conformal_storage,"factor+derivs+2nd derivs"))
+ else if (CCTK_EQUALS(conformal_storage,"factor+derivs+2nd derivs"))
{
*conformal_state = 3;
make_conformal_derivs = 1;
}
+ else
+ {
+ CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING,
+"Misner_multiple(): impossible value for conformal_storage=\"%s\"!");
+ /*NOTREACHED*/
+ }
}
else
{
diff --git a/src/Schwarzschild.c b/src/Schwarzschild.c
index a29d4b7..0c7f0e2 100644
--- a/src/Schwarzschild.c
+++ b/src/Schwarzschild.c
@@ -30,28 +30,45 @@ void Schwarzschild(CCTK_ARGUMENTS)
const CCTK_REAL zero = 0.0, one = 1.0, two = 2.0, three = 3.0;
CCTK_REAL tmp, r_squared, r_cubed;
+ int make_conformal_derivs;
int i, npoints;
- npoints = cctk_lsh[0] * cctk_lsh[1] * cctk_lsh[2];
- /* conformal metric flag */
+ /* Check if we should create and store conformal factor stuff */
if(CCTK_EQUALS(metric_type, "static conformal"))
{
- int make_conformal_derivs;
-
- *conformal_state = 1;
-
- if(CCTK_EQUALS(conformal_storage,"factor+derivs"))
+ if (CCTK_EQUALS(conformal_storage,"factor"))
+ {
+ *conformal_state = 1;
+ make_conformal_derivs = 0;
+ }
+ else if (CCTK_EQUALS(conformal_storage,"factor+derivs"))
{
*conformal_state = 2;
make_conformal_derivs = 1;
}
- else if(CCTK_EQUALS(conformal_storage,"factor+derivs+2nd derivs"))
+ else if (CCTK_EQUALS(conformal_storage,"factor+derivs+2nd derivs"))
{
*conformal_state = 3;
make_conformal_derivs = 1;
}
+ else
+ {
+ CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING,
+"Schwarzschild(): impossible value for conformal_storage=\"%s\"!");
+ /*NOTREACHED*/
+ }
+ }
+ else
+ {
+ make_conformal_derivs = 0;
+ }
+
+ npoints = cctk_lsh[0] * cctk_lsh[1] * cctk_lsh[2];
+
+ if(CCTK_EQUALS(metric_type, "static conformal"))
+ {
for (i = 0; i < npoints; i++)
{
/* Compute conformal factor */