SpECTRE Documentation Coverage Report
Current view: top level - ParallelAlgorithms/EventsAndTriggers - Event.hpp Hit Total Coverage
Commit: b1342d46f40e2d46bbd11d0cef68fd973031a24b Lines: 2 8 25.0 %
Date: 2020-09-24 20:24:42
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 "Parallel/CharmPupable.hpp"
       8             : #include "Parallel/GlobalCache.hpp"
       9             : #include "Utilities/FakeVirtual.hpp"
      10             : #include "Utilities/Registration.hpp"
      11             : #include "Utilities/TMPL.hpp"
      12             : 
      13             : /// \cond
      14             : namespace Events {
      15             : template <typename EventRegistrars>
      16             : class Completion;
      17             : }  // namespace Events
      18             : /// \endcond
      19             : 
      20             : /// \ingroup EventsAndTriggersGroup
      21             : namespace Events {
      22             : /// Registrars for Events
      23           1 : namespace Registrars {}
      24             : }  // namespace Events
      25             : 
      26             : /// \ingroup EventsAndTriggersGroup
      27             : /// Base class for something that can happen during a simulation (such
      28             : /// as an observation).
      29             : template <typename EventRegistrars>
      30           1 : class Event : public PUP::able {
      31             :  protected:
      32             :   /// \cond
      33             :   Event() = default;
      34             :   Event(const Event&) = default;
      35             :   Event(Event&&) = default;
      36             :   Event& operator=(const Event&) = default;
      37             :   Event& operator=(Event&&) = default;
      38             :   /// \endcond
      39             : 
      40             :  public:
      41           0 :   ~Event() override = default;
      42             : 
      43           0 :   WRAPPED_PUPable_abstract(Event);  // NOLINT
      44             : 
      45           0 :   using default_events = tmpl::list<Events::Completion<EventRegistrars>>;
      46             : 
      47           0 :   using creatable_classes =
      48             :       tmpl::append<default_events, Registration::registrants<EventRegistrars>>;
      49             : 
      50             :   template <typename DbTags, typename Metavariables, typename ArrayIndex,
      51             :             typename ComponentPointer>
      52           0 :   void run(const db::DataBox<DbTags>& box,
      53             :            Parallel::GlobalCache<Metavariables>& cache,
      54             :            const ArrayIndex& array_index,
      55             :            const ComponentPointer /*meta*/) noexcept {
      56             :     call_with_dynamic_type<void, creatable_classes>(
      57             :         this, [&box, &cache, &array_index ](auto* const event) noexcept {
      58             :           db::apply(*event, box, cache, array_index, ComponentPointer{});
      59             :         });
      60             :   }
      61             : };
      62             : 
      63             : #include "ParallelAlgorithms/EventsAndTriggers/Completion.hpp"

Generated by: LCOV version 1.14