aboutsummaryrefslogtreecommitdiff
path: root/Carpet
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet')
-rw-r--r--Carpet/Carpet/param.ccl4
-rw-r--r--Carpet/Carpet/src/CallFunction.cc4
2 files changed, 8 insertions, 0 deletions
diff --git a/Carpet/Carpet/param.ccl b/Carpet/Carpet/param.ccl
index 90aca4e83..6e24a05da 100644
--- a/Carpet/Carpet/param.ccl
+++ b/Carpet/Carpet/param.ccl
@@ -606,3 +606,7 @@ BOOLEAN adaptive_stepsize "Allow adaptive timestep sizes"
BOOLEAN use_unusedpoints_mask "Turn on storage and usage of 'unusedpoints_mask'" STEERABLE=recover
{
} "no"
+
+SHARES: CarpetLib
+
+USES BOOLEAN electric_fence
diff --git a/Carpet/Carpet/src/CallFunction.cc b/Carpet/Carpet/src/CallFunction.cc
index 224a66346..494f2864c 100644
--- a/Carpet/Carpet/src/CallFunction.cc
+++ b/Carpet/Carpet/src/CallFunction.cc
@@ -473,7 +473,11 @@ namespace Carpet {
void CheckFence (cGH const * const cctkGH, cFunctionData * attribute)
{
+ DECLARE_CCTK_PARAMETERS;
+
if (is_meta_mode()) return; // meta mode has no accessible variables
+ // enumerating the grid variables is expensive
+ if (not electric_fence) return;
Timers::Timer timer("FenceCheck");
timer.start();