11 #include "DataStructures/DataBox/Tag.hpp"
12 #include "Framework/ActionTesting.hpp"
13 #include "IO/Observer/ObservationId.hpp"
14 #include "IO/Observer/ReductionActions.hpp"
17 #include "Utilities/TaggedTuple.hpp"
20 template <
typename Metavariables>
24 namespace ResidualMonitorActionsTestHelpers {
42 using observer_writer_tags =
47 template <
typename ParallelComponent,
typename DbTagsList,
48 typename Metavariables,
typename ArrayIndex,
49 typename... ReductionDatums,
52 static void apply(db::DataBox<DbTagsList>& box,
60 Parallel::ReductionData<ReductionDatums...>&&
61 in_reduction_data) noexcept {
65 [ observation_id, subfile_name, reduction_names, in_reduction_data ](
71 check_reduction_names,
73 check_reduction_data) noexcept {
74 *check_observation_id = observation_id;
75 *check_subfile_name = subfile_name;
76 *check_reduction_names = reduction_names;
77 *check_reduction_data = in_reduction_data.data();
82 template <
typename Metavariables>
84 using metavariables = Metavariables;
86 using array_index = int;
88 typename Metavariables::Phase, Metavariables::Phase::Initialization,
89 tmpl::list<ActionTesting::InitializeDataBox<observer_writer_tags>>>>;
92 using replace_these_threaded_actions =
93 tmpl::list<observers::ThreadedActions::WriteReductionData>;
94 using with_these_threaded_actions = tmpl::list<MockWriteReductionData>;
A unique identifier for an observation representing the type of observation and the instance (e....
Definition: ObservationId.hpp:71
Definition: ResidualMonitorActionsTestHelpers.hpp:34
Definition: ElementReceiveInterpPoints.hpp:15
Definition: ResidualMonitorActionsTestHelpers.hpp:83
Definition: ResidualMonitorActionsTestHelpers.hpp:46
Definition: ResidualMonitorActionsTestHelpers.hpp:38
Mark a struct as a simple tag by inheriting from this.
Definition: Tag.hpp:36
Definition: ResidualMonitorActionsTestHelpers.hpp:26
void mutate(const gsl::not_null< DataBox< TagList > * > box, Invokable &&invokable, Args &&... args) noexcept
Allows changing the state of one or more non-computed elements in the DataBox.
Definition: DataBox.hpp:859
List of all the actions to be executed in the specified phase.
Definition: PhaseDependentActionList.hpp:16
The nodegroup parallel component that is responsible for writing data to disk.
Definition: ObserverComponent.hpp:51
A mock class for the CMake-generated Parallel::Algorithms::Array
Definition: ActionTesting.hpp:556
gsl::not_null< T * > make_not_null(T *ptr) noexcept
Construct a not_null from a pointer. Often this will be done as an implicit conversion,...
Definition: Gsl.hpp:880
typename Requires_detail::requires_impl< B >::template_error_type_failed_to_meet_requirements_on_template_parameters Requires
Express requirements on the template parameters of a function or class, replaces std::enable_if_t
Definition: Requires.hpp:67
Require a pointer to not be a nullptr
Definition: ReadSpecThirdOrderPiecewisePolynomial.hpp:13