ErrorOnFailedApparentHorizon.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include "ApparentHorizons/FastFlow.hpp"
9 
10 /// \cond
11 namespace db {
12 template <typename DbTags>
13 class DataBox;
14 } // namespace db
15 namespace Parallel {
16 template <typename Metavariables>
17 class GlobalCache;
18 } // namespace Parallel
19 /// \endcond
20 
21 namespace intrp::callbacks {
22 
23 /// \brief Callback for a failed apparent horizon find that simply errors.
25  template <typename InterpolationTargetTag, typename DbTags,
26  typename Metavariables, typename TemporalId>
27  static void apply(const db::DataBox<DbTags>& /*box*/,
28  const Parallel::GlobalCache<Metavariables>& /*cache*/,
29  const TemporalId& /*temporal_id*/,
30  const FastFlow::Status failure_reason) noexcept {
31  ERROR("Apparent horizon finder "
32  << pretty_type::short_name<InterpolationTargetTag>()
33  << " failed, reason = " << failure_reason);
34  }
35 };
36 
37 } // namespace intrp::callbacks
intrp::callbacks::ErrorOnFailedApparentHorizon
Callback for a failed apparent horizon find that simply errors.
Definition: ErrorOnFailedApparentHorizon.hpp:24
Parallel::GlobalCache
Definition: ElementReceiveInterpPoints.hpp:15
Error.hpp
PrettyType.hpp
ERROR
#define ERROR(m)
prints an error message to the standard error stream and aborts the program.
Definition: Error.hpp:37
intrp::callbacks
Contains callback functions called by InterpolationTargets.
Definition: Callbacks.hpp:11
Parallel
Functionality for parallelization.
Definition: ElementReceiveInterpPoints.hpp:13
db
Namespace for DataBox related things.
Definition: DataBox.hpp:44