aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetTracker/src
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2009-09-21 11:26:25 -0500
committerBarry Wardell <barry.wardell@gmail.com>2011-12-14 16:45:08 +0000
commit797579d71872e279e13e0b93dabd4f670d19fd05 (patch)
tree4d80df9f273c19e3ecbd156627919ea3ff9f3cb3 /Carpet/CarpetTracker/src
parent3371f928a3b6d77bcc8b8e378c7074fd1698f75a (diff)
CarpetTracker: Update positions only once per iteration
Ignore-this: a25b242733447e6545d6dbb63d6f9951
Diffstat (limited to 'Carpet/CarpetTracker/src')
-rw-r--r--Carpet/CarpetTracker/src/SetPositions.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/Carpet/CarpetTracker/src/SetPositions.cc b/Carpet/CarpetTracker/src/SetPositions.cc
index b621fd4b0..7a986347f 100644
--- a/Carpet/CarpetTracker/src/SetPositions.cc
+++ b/Carpet/CarpetTracker/src/SetPositions.cc
@@ -32,6 +32,11 @@ using namespace std;
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
+ static int cctk_iteration_done = -1;
+
+ if (cctk_iteration == cctk_iteration_done) return;
+ cctk_iteration_done = cctk_iteration;
+
for (int n = 0; n < num_surfaces; ++ n) {
int const sn = surface[n];
if (sn >= 0) {