summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-09-14 11:23:58 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-09-14 11:23:58 +0000
commit762ecfe3246c432f6e72336f909eca112dab8636 (patch)
tree0f0c90bdf2ced0f2c34ba8f029dd8a8d9cb56f5f /src/include
parent2a4a453dd7fd13f6b07604b3dfce1818567bb253 (diff)
Changing again how we deal with space and time, ready for AMR.
Now cctk_delta_space(i) are (again) the grid spacing on the BASE grid and there are macros CCTK_DELTA_SPACE(i) = cctk_delta_space(i)/cctk_levfac(i) to give the grid spacing on the local grid. Similarly with CCTK_DELTA_TIME You should switch over to using this variables whenever you want the grid spacings, to be ready for mesh refinement drivers. git-svn-id: http://svn.cactuscode.org/flesh/trunk@909 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include')
-rw-r--r--src/include/cctk.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/cctk.h b/src/include/cctk.h
index 8598ad86..e4092fa3 100644
--- a/src/include/cctk.h
+++ b/src/include/cctk.h
@@ -51,6 +51,9 @@
#define CCTK_PASS_FTOF CCTK_FARGUMENTS
+#define CCTK_DELTA_SPACE(x) cctk_delta_space(x)/cctk_levfac(x)
+#define CCTK_DELTA_TIME cctk_delta_time
+
#endif /*FCODE*/
#ifdef CCODE
@@ -58,6 +61,8 @@
#include "cGH.h"
#define CCTK_GFINDEX3D(GH,i,j,k) ((i) + GH->cctk_lsh[0]*((j)+GH->cctk_lsh[1]*(k)))
+#define CCTK_GFINDEX2D(GH,i,j) ((i) + GH->cctk_lsh[0]*((j)))
+#define CCTK_GFINDEX1D(GH,i) (i)
#define CCTK_PRINTSEPARATOR \
@@ -120,6 +125,9 @@ extern int _cctk_one;
#define CCTK_PASS_CTOC cctkGH
+#define CCTK_DELTA_SPACE(x) cctk_delta_space[x]/cctk_levfac[x]
+#define CCTK_DELTA_TIME cctk_delta_time
+
#endif /*CCODE*/
#define CCTK_VARIABLE_CHAR 1
@@ -127,6 +135,7 @@ extern int _cctk_one;
#define CCTK_VARIABLE_REAL 3
#define CCTK_VARIABLE_COMPLEX 4
+
/*#define CCTK_MAKESTRING(x) CCTK_REALSTRING(x)
#define CCTK_REALSTRING(x) #x
#define CCTK_WARN(a,b) CCTK_Warn(a,CCTK_MAKESTRING(CCTK_THORN),b,__LINE__,__FILE__)