diff options
Diffstat (limited to 'Carpet/Carpet')
-rw-r--r-- | Carpet/Carpet/interface.ccl | 21 | ||||
-rw-r--r-- | Carpet/Carpet/src/helpers.cc | 21 |
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 |