aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2011-01-20 13:03:38 -0500
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 18:25:55 +0000
commiteb468c8ed6dd66581d1e91f5c8a67f122cb30a31 (patch)
tree606aa21e023c009f2f178b5aa614a16322f2bc88
parent38f5ec152c968e90a472c23ffc1cf4b09aa6b161 (diff)
Carpet: Add aliased function GetRegriddingEpoch
-rw-r--r--Carpet/Carpet/interface.ccl7
-rw-r--r--Carpet/Carpet/src/helpers.cc7
-rw-r--r--Carpet/Carpet/src/variables.hh2
3 files changed, 15 insertions, 1 deletions
diff --git a/Carpet/Carpet/interface.ccl b/Carpet/Carpet/interface.ccl
index b4fa05583..f56e3ba75 100644
--- a/Carpet/Carpet/interface.ccl
+++ b/Carpet/Carpet/interface.ccl
@@ -209,6 +209,13 @@ PROVIDES FUNCTION GetCoordRange WITH Carpet_GetCoordRange LANGUAGE C
# Get current refinement level and number of refinement levels
CCTK_INT FUNCTION \
+ GetRegriddingEpoch \
+ (CCTK_POINTER_TO_CONST IN cctkGH)
+PROVIDES FUNCTION GetRegriddingEpoch \
+ WITH Carpet_GetRegriddingEpoch \
+ LANGUAGE C
+
+CCTK_INT FUNCTION \
GetRefinementLevel \
(CCTK_POINTER_TO_CONST IN cctkGH)
PROVIDES FUNCTION GetRefinementLevel \
diff --git a/Carpet/Carpet/src/helpers.cc b/Carpet/Carpet/src/helpers.cc
index 9234df67e..f947c3a5c 100644
--- a/Carpet/Carpet/src/helpers.cc
+++ b/Carpet/Carpet/src/helpers.cc
@@ -36,6 +36,13 @@ namespace Carpet {
return &carpetGH;
}
+ // Get current regridding epoch
+ extern "C"
+ CCTK_INT Carpet_GetRegriddingEpoch (CCTK_POINTER_TO_CONST const cctkGH)
+ {
+ return regridding_epoch;
+ }
+
// Get current refinement level
extern "C"
CCTK_INT Carpet_GetRefinementLevel (CCTK_POINTER_TO_CONST const cctkGH)
diff --git a/Carpet/Carpet/src/variables.hh b/Carpet/Carpet/src/variables.hh
index 661986a14..037e6a192 100644
--- a/Carpet/Carpet/src/variables.hh
+++ b/Carpet/Carpet/src/variables.hh
@@ -155,7 +155,7 @@ namespace Carpet {
extern vector<gh*> vhh; // [map]
extern vector<dh*> vdd; // [map]
extern th* tt;
- extern int regridding_epoch;
+ extern int regridding_epoch; // increases with each regridding
// Data for the groups
struct groupdesc {