aboutsummaryrefslogtreecommitdiff
path: root/src/sor_confmetric.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sor_confmetric.c')
-rw-r--r--src/sor_confmetric.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/src/sor_confmetric.c b/src/sor_confmetric.c
index 6fb677b..15c4a9d 100644
--- a/src/sor_confmetric.c
+++ b/src/sor_confmetric.c
@@ -21,6 +21,10 @@
#include "Ell_DBstructure.h"
#include "EllBase.h"
+static const char *rcsid = "$Header$";
+
+CCTK_FILEVERSION(CactusElliptic_EllSOR_sor_confmetric_c)
+
#define SQR(a) ((a)*(a))
int sor_confmetric_3d(cGH *GH, int *MetricPsiI, int conformal,
@@ -167,18 +171,10 @@ int sor_confmetric_3d(cGH *GH, int *MetricPsiI, int conformal,
/* Get the data ptr of these GFs, They all have to be
on the same timelevel; derive the metric data pointer from
the index array. Note the ordering in the metric */
- timelevel = CCTK_NumTimeLevelsFromVarI (FieldIndex) - 1;
- if (timelevel > 0)
- {
- timelevel--;
- }
+ timelevel = 0;
var = (CCTK_REAL*) CCTK_VarDataPtrI(GH, timelevel, FieldIndex);
- timelevel = CCTK_NumTimeLevelsFromVarI (MetricPsiI[0]) - 1;
- if (timelevel > 0)
- {
- timelevel--;
- }
+ timelevel = 0;
gxx = (CCTK_REAL*) CCTK_VarDataPtrI(GH, timelevel, MetricPsiI[0]);
gxy = (CCTK_REAL*) CCTK_VarDataPtrI(GH, timelevel, MetricPsiI[1]);
gxz = (CCTK_REAL*) CCTK_VarDataPtrI(GH, timelevel, MetricPsiI[2]);
@@ -188,11 +184,7 @@ int sor_confmetric_3d(cGH *GH, int *MetricPsiI, int conformal,
if (conformal)
{
- timelevel = CCTK_NumTimeLevelsFromVarI (MetricPsiI[6]) - 1;
- if (timelevel > 0)
- {
- timelevel--;
- }
+ timelevel = 0;
psi = (CCTK_REAL*) CCTK_VarDataPtrI(GH, timelevel, MetricPsiI[6]);
}
@@ -201,21 +193,13 @@ int sor_confmetric_3d(cGH *GH, int *MetricPsiI, int conformal,
set flag Mstorage=1, dito for N */
if (MIndex>=0)
{
- timelevel = CCTK_NumTimeLevelsFromVarI (MIndex) - 1;
- if (timelevel > 0)
- {
- timelevel--;
- }
+ timelevel = 0;
Mlin = (CCTK_REAL*) CCTK_VarDataPtrI(GH,timelevel,MIndex);
Mstorage = 1;
}
if (NIndex>=0)
{
- timelevel = CCTK_NumTimeLevelsFromVarI (NIndex) - 1;
- if (timelevel > 0)
- {
- timelevel--;
- }
+ timelevel = 0;
Nlin = (CCTK_REAL*) CCTK_VarDataPtrI(GH,timelevel,NIndex);
Nstorage = 1;
}