SpECTRE
v2024.09.16
|
Trigger for control system measurements. More...
#include <Trigger.hpp>
Public Types | |
using | is_triggered_return_tags = tmpl::list<> |
using | is_triggered_argument_tags = tmpl::list<::Tags::Time, control_system::Tags::FutureMeasurements< ControlSystems > > |
using | next_check_time_return_tags = tmpl::list< control_system::Tags::FutureMeasurements< ControlSystems > > |
using | next_check_time_argument_tags = tmpl::list<::Tags::Time > |
Public Member Functions | |
template<typename Metavariables , size_t Dim, typename Component > | |
std::optional< bool > | is_triggered (Parallel::GlobalCache< Metavariables > &cache, const ElementId< Dim > &array_index, const Component *, const double time, const control_system::FutureMeasurements &measurement_times) |
template<typename Metavariables , size_t Dim, typename Component > | |
std::optional< double > | next_check_time (Parallel::GlobalCache< Metavariables > &cache, const ElementId< Dim > &array_index, const Component *, const gsl::not_null< control_system::FutureMeasurements * > measurement_times, const double time) |
Public Member Functions inherited from DenseTrigger | |
template<typename DbTags , typename Metavariables , typename ArrayIndex , typename Component > | |
std::optional< bool > | is_triggered (const gsl::not_null< db::DataBox< DbTags > * > box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const Component *const component) |
Check whether the trigger fires. Returns std::nullopt if insufficient data is available to make the decision. The trigger is not responsible for checking whether dense output of the evolved variables is possible, but may need to check things such as the availability of FunctionOfTime data. | |
template<typename DbTags , typename Metavariables , typename ArrayIndex , typename Component > | |
std::optional< double > | next_check_time (const gsl::not_null< db::DataBox< DbTags > * > box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const Component *component) |
Obtain the next time to check the trigger, or std::nullopt if the trigger is not ready to report yet. | |
std::optional< double > | previous_trigger_time () const |
Reports the value of Tags::Time when the trigger most recently fired, except for the most recent call of is_triggered . More... | |
void | pup (PUP::er &p) override |
Static Public Attributes | |
static constexpr bool | factory_creatable = false |
Trigger for control system measurements.
This trigger is only intended to be used with the control_system::Event
event. A specialization of this trigger will be created during control system initialization for each unique measurement.
These triggers must be added to the factory_creation struct in the metavariables, even though they cannot be created from the input file. The control_system::control_system_triggers
metafunction provides the list of triggers to include.