SpECTRE  v2022.01.03
DenseTrigger Class Reference

Base class for checking whether to run an Event at arbitrary times. More...

#include <DenseTrigger.hpp>

Classes

struct  Result
 Result type for the is_triggered method. More...
 

Public Member Functions

template<typename DbTags >
Result is_triggered (const db::DataBox< DbTags > &box)
 Check whether the trigger fires.
 
template<typename DbTags , typename Metavariables , typename ArrayIndex , typename Component >
bool is_ready (const db::DataBox< DbTags > &box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const Component *const component) const
 Check whether all data required to evaluate the trigger is available. 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.
 
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
 

Detailed Description

Base class for checking whether to run an Event at arbitrary times.

The DataBox passed to the member functions will have Tags::Time, and therefore any compute tags depending on that value, set to the time to be tested. Any discrete properties of steps or slabs, such as the step size, may have the values from times off by one step. The evolved variables will be in an unspecified state.

Member Function Documentation

◆ previous_trigger_time()

std::optional< double > DenseTrigger::previous_trigger_time ( ) const
inline

Reports the value of Tags::Time when the trigger most recently fired, except for the most recent call of is_triggered.

Details

The most recent call of is_triggered is not used for reporting the previous trigger so that the time reported to the event is actually the previous time value on which the trigger fired and activated the event. Without ignoring the most recent call of is_triggered, we'd just always be reporting the current time to the event, because events always run after their associated triggers fire via a call to is_triggered.


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