summaryrefslogtreecommitdiff
path: root/src/main/DebugDefines.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/DebugDefines.c')
-rw-r--r--src/main/DebugDefines.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/DebugDefines.c b/src/main/DebugDefines.c
index 43383489..76f70b2f 100644
--- a/src/main/DebugDefines.c
+++ b/src/main/DebugDefines.c
@@ -66,3 +66,24 @@ int CCTK_GFIndex4D (const cGH *GH, int i, int j, int k, int l)
{
return (i + GH->cctk_lsh[0]*(j + GH->cctk_lsh[1]*(k + GH->cctk_lsh[2] * l)));
}
+
+int CCTK_VectGFIndex1D (const cGH *GH, int i, int n)
+{
+ return (i + GH->cctk_lsh[0]*n);
+}
+
+int CCTK_VectGFIndex2D (const cGH *GH, int i, int j, int n)
+{
+ return (i + GH->cctk_lsh[0]*(j + GH->cctk_lsh[1]*n));
+}
+
+int CCTK_VectGFIndex3D (const cGH *GH, int i, int j, int k, int n)
+{
+ return (i + GH->cctk_lsh[0]*(j + GH->cctk_lsh[1]*(k + GH->cctk_lsh[2]*n)));
+}
+
+int CCTK_VectGFIndex4D (const cGH *GH, int i, int j, int k, int l, int n)
+{
+ return (i + GH->cctk_lsh[0]*(j + GH->cctk_lsh[1]*(k + GH->cctk_lsh[2]*
+ (l + GH->cctk_lsh[3]*n))));
+}