diff options
author | Roland Haas <roland.haas@physics.gatech.edu> | 2012-09-07 23:17:05 -0400 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2012-09-11 18:23:37 +0100 |
commit | 95bfa92c1b78692244ae18d295f421e16784b26c (patch) | |
tree | e109d03a36b3491c2bb50d447b6fb1e358ce07be | |
parent | 4fa811835475399ea3599851c84deb4db506cb9f (diff) |
Carpet: add aliased routines to obtain map, timelevel
-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 |