Skip to content

Commit 2e3ac91

Browse files
committed
Remove ObserveCentersBase base tag
1 parent 217e8b7 commit 2e3ac91

File tree

4 files changed

+11
-24
lines changed

4 files changed

+11
-24
lines changed

src/ControlSystem/Tags/SystemTags.hpp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,7 @@ struct WriteDataToDisk : db::SimpleTag {
6262
static type create_from_options(const type& option) { return option; }
6363
};
6464

65-
/// \ingroup DataBoxTagsGroup
66-
/// \ingroup ControlSystemGroup
67-
/// DataBox tag for writing the centers of the horizons to disk.
68-
///
69-
/// This is controlled by the `control_system::OptionTags::WriteDataToDisk`
70-
/// option in the input file.
71-
struct ObserveCenters : ::ah::Tags::ObserveCentersBase, db::SimpleTag {
72-
using type = bool;
73-
using option_tags = tmpl::list<OptionTags::WriteDataToDisk>;
74-
75-
static constexpr bool pass_metavariables = false;
76-
static type create_from_options(const type& option) { return option; }
77-
};
65+
using ObserveCenters = ah::Tags::ObserveCenters;
7866

7967
/// \ingroup DataBoxTagsGroup
8068
/// \ingroup ControlSystemGroup

src/ParallelAlgorithms/ApparentHorizonFinder/Callbacks/ObserveCenters.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct ObserveCenters {
8888
"DataBox must contain ylm::Tags::EuclideanAreaElement<Frame>");
8989

9090
// Only print the centers if we want to.
91-
if (not Parallel::get<ah::Tags::ObserveCentersBase>(cache)) {
91+
if (not Parallel::get<ah::Tags::ObserveCenters>(cache)) {
9292
return;
9393
}
9494

src/ParallelAlgorithms/ApparentHorizonFinder/Tags.hpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
#include "IO/Logging/Verbosity.hpp"
1515
#include "ParallelAlgorithms/ApparentHorizonFinder/OptionTags.hpp"
1616
#include "ParallelAlgorithms/ApparentHorizonFinder/Storage.hpp"
17+
#include "Utilities/TMPL.hpp"
1718

1819
/// \cond
20+
namespace control_system::OptionTags {
21+
struct WriteDataToDisk;
22+
} // namespace control_system::OptionTags
1923
class FastFlow;
2024
namespace ylm {
2125
template <typename Frame>
@@ -122,16 +126,13 @@ struct FailedInterpolationIterations : db::SimpleTag {
122126
using type = size_t;
123127
};
124128

125-
/// Base tag for whether or not to write the centers of the horizons to disk.
126-
/// Most likely to be used in the `ObserveCenters` post horizon find callback
127-
///
128-
/// Other things can control whether the horizon centers are output by defining
129-
/// their own simple tag from this base tag.
130-
struct ObserveCentersBase : db::BaseTag {};
131-
132129
/// Simple tag for whether to write the centers of the horizons to disk.
133130
/// Currently this tag is not creatable by options
134-
struct ObserveCenters : ObserveCentersBase, db::SimpleTag {
131+
struct ObserveCenters : db::SimpleTag {
135132
using type = bool;
133+
using option_tags = tmpl::list<control_system::OptionTags::WriteDataToDisk>;
134+
135+
static constexpr bool pass_metavariables = false;
136+
static type create_from_options(const type& option) { return option; }
136137
};
137138
} // namespace ah::Tags

tests/Unit/ParallelAlgorithms/ApparentHorizonFinder/Test_Tags.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,5 @@ SPECTRE_TEST_CASE("Unit.ApparentHorizonFinder.Tags",
5353
"PreviousIterationStrahlkorper");
5454
TestHelpers::db::test_simple_tag<ah::Tags::FailedInterpolationIterations>(
5555
"FailedInterpolationIterations");
56-
TestHelpers::db::test_base_tag<ah::Tags::ObserveCentersBase>(
57-
"ObserveCentersBase");
5856
TestHelpers::db::test_simple_tag<ah::Tags::ObserveCenters>("ObserveCenters");
5957
}

0 commit comments

Comments
 (0)