Skip to content

Commit

Permalink
PunctureTracker: make it work in real global mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lwJi committed Aug 19, 2024
1 parent 4ee9c38 commit 5794525
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions PunctureTracker/src/puncture_tracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ namespace PunctureTracker {

static PunctureContainer *g_punctures = nullptr;

static double previous_time = 0.0;

const int max_num_tracked = 10;

extern "C" void PunctureTracker_Init(CCTK_ARGUMENTS) {
Expand Down Expand Up @@ -101,6 +103,13 @@ extern "C" void PunctureTracker_Track(CCTK_ARGUMENTS) {
DECLARE_CCTK_ARGUMENTS_PunctureTracker_Track;
DECLARE_CCTK_PARAMETERS;

// we can remove this segment when global mode works
if (cctk_time <= previous_time) {
return;
}
#pragma omp master
{ previous_time = cctk_time; }

// Do not track while setting up initial data; time interpolation may fail
if (cctk_iteration == 0) {
return;
Expand Down

0 comments on commit 5794525

Please sign in to comment.