11 #include "IO/Observer/ObservationId.hpp"
12 #include "IO/Observer/ObserverComponent.hpp"
13 #include "IO/Observer/ReductionActions.hpp"
14 #include "IO/Observer/TypeOfObservation.hpp"
16 #include "Parallel/Invoke.hpp"
17 #include "Parallel/Reduction.hpp"
19 #include "Utilities/Functional.hpp"
24 namespace observe_detail {
26 using reduction_data = Parallel::ReductionData<
32 template <
typename OptionsGroup>
34 template <
typename ParallelComponent,
typename DbTagsList,
37 register_info(
const db::DataBox<DbTagsList>& ,
38 const ArrayIndex& ) noexcept {
47 template <
typename OptionsGroup,
typename Metavariables>
48 void contribute_to_reduction_observer(
49 const size_t iteration_id,
const double residual_magnitude,
52 iteration_id, pretty_type::get_name<OptionsGroup>());
55 Parallel::threaded_action<observers::ThreadedActions::WriteReductionData>(
58 reduction_writer[0], observation_id,
static_cast<size_t>(sys::my_node()),
62 std::string{
"/" + Options::name<OptionsGroup>() +
"Residuals"},
64 reduction_data{iteration_id, residual_magnitude});
A unique identifier for an observation representing the type of observation and the instance (e....
Definition: ObservationId.hpp:71
Definition: ElementReceiveInterpPoints.hpp:15
The data to be reduced, and invokables to be called whenever two reduction messages are combined and ...
Definition: Reduction.hpp:63
auto get_parallel_component(GlobalCache< Metavariables > &cache) noexcept -> Parallel::proxy_from_parallel_component< GlobalCache_detail::get_component_if_mocked< typename Metavariables::component_list, ParallelComponentTag >> &
Access the Charm++ proxy associated with a ParallelComponent.
Definition: GlobalCache.hpp:521
Used as a key in maps to keep track of how many elements have registered.
Definition: ObservationId.hpp:28
The nodegroup parallel component that is responsible for writing data to disk.
Definition: ObserverComponent.hpp:51
Functionality for solving linear systems of equations.
Definition: Gmres.cpp:16
@ Reduction
The sender will only perform reduction observations.
Helpers for derived class registration.
Definition: Registration.hpp:32