SpECTRE  v2024.06.18
EventsAndTriggers Class Reference

Class that checks triggers and runs events. More...

#include <EventsAndTriggers.hpp>

Classes

struct  TriggerAndEvents
 

Public Types

using Storage = std::vector< TriggerAndEvents >
 

Public Member Functions

 EventsAndTriggers (Storage events_and_triggers)
 
template<typename DbTags , typename Metavariables , typename ArrayIndex , typename Component , typename CheckTrigger = std::nullptr_t>
void run_events (const gsl::not_null< db::DataBox< DbTags > * > box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const Component *component, const Event::ObservationValue &observation_value, const CheckTrigger &check_trigger=nullptr) const
 Check the triggers and run the associated events. More...
 
void pup (PUP::er &p)
 
template<typename F >
void for_each_event (F &&f) const
 

Detailed Description

Class that checks triggers and runs events.

Member Function Documentation

◆ run_events()

template<typename DbTags , typename Metavariables , typename ArrayIndex , typename Component , typename CheckTrigger = std::nullptr_t>
void EventsAndTriggers::run_events ( const gsl::not_null< db::DataBox< DbTags > * >  box,
Parallel::GlobalCache< Metavariables > &  cache,
const ArrayIndex &  array_index,
const Component *  component,
const Event::ObservationValue observation_value,
const CheckTrigger &  check_trigger = nullptr 
) const
inline

Check the triggers and run the associated events.

By default the trigger check just calls the is_triggered method, but the last argument can be passed to override this. It must be a functor taking a const Trigger& and returning bool.


The documentation for this class was generated from the following file: