aboutsummaryrefslogtreecommitdiff
path: root/src/driver/announce.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver/announce.cc')
-rw-r--r--src/driver/announce.cc20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/driver/announce.cc b/src/driver/announce.cc
index 5cd0fb5..f604d1c 100644
--- a/src/driver/announce.cc
+++ b/src/driver/announce.cc
@@ -12,7 +12,6 @@
#include "util_Table.h"
#include "cctk.h"
#include "cctk_Arguments.h"
-#include "cctk_Parameters.h"
#include "config.h"
#include "stdc.h"
@@ -64,28 +63,19 @@ extern "C"
void AHFinderDirect_announce(CCTK_ARGUMENTS)
{
DECLARE_CCTK_ARGUMENTS
-DECLARE_CCTK_PARAMETERS
const struct verbose_info& verbose_info = state.verbose_info;
// only try to announce AH info if we've found AHs at this time level
-// ==> only try every find_every time steps
-if ((cctk_iteration % find_every) != 0)
+if (! state.find_now(cctk_iteration))
then return; // *** NO-OP RETURN ***
-// which horizon to announce?
-const int hn = which_horizon_to_announce_centroid;
-if (hn == 0)
+// only try to anounce AH info if we've been asked to do so
+if (! state.announce_centroid_flag)
then return; // *** NO-OP RETURN ***
-if (! ((hn >= 1) && (hn <= N_horizons)) )
- then CCTK_VWarn(FATAL_ERROR, __LINE__, __FILE__, CCTK_THORNSTRING,
-"\n"
-" AHFinderDirect_announce():\n"
-" invalid horizon number %d to announce\n"
-" (valid range is [1,N_horizons=%d])!\n"
- ,
- hn, int(N_horizons)); /*NOTREACHED*/
+// which horizon to announce?
+const int hn = state.which_horizon_to_announce_centroid;
// did we actually *find* this horizon?
if (state.AH_data_array[hn] == NULL)