aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Haas <roland.haas@physics.gatech.edu>2012-09-07 23:17:05 -0400
committerRoland Haas <roland.haas@physics.gatech.edu>2012-09-07 23:17:05 -0400
commit4b548cef6528ff0527c697e930cbef6261209d7a (patch)
treeee87575f16ccb89a8da2fdeece18b7699844f9d3
parent14e368cab6d2768dbec8e1750cb3420603d246b1 (diff)
Carpet: add aliased routines to obtain map, timelevel
-rw-r--r--Carpet/Carpet/interface.ccl21
-rw-r--r--Carpet/Carpet/src/helpers.cc21
2 files changed, 42 insertions, 0 deletions
diff --git a/Carpet/Carpet/interface.ccl b/Carpet/Carpet/interface.ccl
index 1a1f118f2..d2f7f5643 100644
--- a/Carpet/Carpet/interface.ccl
+++ b/Carpet/Carpet/interface.ccl
@@ -282,6 +282,27 @@ PROVIDES FUNCTION GetLocalComponents \
WITH Carpet_GetLocalComponents \
LANGUAGE C
+CCTK_INT FUNCTION \
+ GetMap \
+ (CCTK_POINTER_TO_CONST IN cctkGH)
+PROVIDES FUNCTION GetMap \
+ WITH Carpet_GetMap \
+ LANGUAGE C
+
+CCTK_INT FUNCTION \
+ GetMaps \
+ (CCTK_POINTER_TO_CONST IN cctkGH)
+PROVIDES FUNCTION GetMaps \
+ WITH Carpet_GetMaps \
+ LANGUAGE C
+
+CCTK_INT FUNCTION \
+ GetTimeLevel \
+ (CCTK_POINTER_TO_CONST IN cctkGH)
+PROVIDES FUNCTION GetTimeLevel \
+ WITH Carpet_GetTimeLevel \
+ LANGUAGE C
+
# Get pointer to grid variable for a specific map and refinement level
diff --git a/Carpet/Carpet/src/helpers.cc b/Carpet/Carpet/src/helpers.cc
index f2f07f12e..52e943d0e 100644
--- a/Carpet/Carpet/src/helpers.cc
+++ b/Carpet/Carpet/src/helpers.cc
@@ -66,6 +66,27 @@ namespace Carpet {
return vhh.AT(map)->local_components(reflevel);
}
+ // Get current map level
+ extern "C"
+ CCTK_INT Carpet_GetMap (CCTK_POINTER_TO_CONST const cctkGH)
+ {
+ return map;
+ }
+
+ // Get number of maps
+ extern "C"
+ CCTK_INT Carpet_GetMaps (CCTK_POINTER_TO_CONST const cctkGH)
+ {
+ return maps;
+ }
+
+ // Get current map level
+ extern "C"
+ CCTK_INT Carpet_GetTimeLevel (CCTK_POINTER_TO_CONST const cctkGH)
+ {
+ return timelevel;
+ }
+
// Enable or disable prolongating