SpECTRE Documentation Coverage Report
Current view: top level - Elliptic/Actions - RunEventsAndTriggers.hpp Hit Total Coverage
Commit: c4864ba59ab2d0d4227eb983d3e1eb61f059bc16 Lines: 1 4 25.0 %
Date: 2024-05-05 16:16:17
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // Distributed under the MIT License.
       2             : // See LICENSE.txt for details.
       3             : 
       4             : #pragma once
       5             : 
       6             : #include "DataStructures/DataBox/DataBox.hpp"
       7             : #include "DataStructures/DataBox/TagName.hpp"
       8             : #include "Parallel/AlgorithmExecution.hpp"
       9             : #include "Parallel/GlobalCache.hpp"
      10             : #include "ParallelAlgorithms/EventsAndTriggers/Tags.hpp"
      11             : #include "Utilities/Gsl.hpp"
      12             : #include "Utilities/TMPL.hpp"
      13             : #include "Utilities/TaggedTuple.hpp"
      14             : 
      15             : namespace elliptic::Actions {
      16             : /// \ingroup ActionsGroup
      17             : /// \ingroup EventsAndTriggersGroup
      18             : /// \brief Run the events and triggers
      19             : ///
      20             : /// Uses:
      21             : /// - GlobalCache: the EventsAndTriggers tag, as required by
      22             : ///   events and triggers
      23             : /// - DataBox: as required by events and triggers
      24             : ///
      25             : /// DataBox changes:
      26             : /// - Adds: nothing
      27             : /// - Removes: nothing
      28             : /// - Modifies: nothing
      29             : template <typename ObservationId>
      30           1 : struct RunEventsAndTriggers {
      31           0 :   using const_global_cache_tags = tmpl::list<Tags::EventsAndTriggers>;
      32             : 
      33             :   template <typename DbTags, typename... InboxTags, typename Metavariables,
      34             :             typename ArrayIndex, typename ActionList,
      35             :             typename ParallelComponent>
      36           0 :   static Parallel::iterable_action_return_t apply(
      37             :       db::DataBox<DbTags>& box, tuples::TaggedTuple<InboxTags...>& /*inboxes*/,
      38             :       Parallel::GlobalCache<Metavariables>& cache,
      39             :       const ArrayIndex& array_index, const ActionList /*meta*/,
      40             :       const ParallelComponent* const component) {
      41             :     Parallel::get<Tags::EventsAndTriggers>(cache).run_events(
      42             :         make_not_null(&box), cache, array_index, component,
      43             :         {db::tag_name<ObservationId>(),
      44             :          static_cast<double>(db::get<ObservationId>(box))});
      45             : 
      46             :     return {Parallel::AlgorithmExecution::Continue, std::nullopt};
      47             :   }
      48             : };
      49             : }  // namespace elliptic::Actions

Generated by: LCOV version 1.14