46 , _lastAction(startTime -
EPS) {}
54 if (t > _lastAction + _period) {
Simplified implementation of std::unique_ptr, using only default deleter.
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
#define NAMESPACE_SPH_END
Statistics gathered and periodically displayed during the run.
@ RUN_TIME
Current time of the simulation in code units. Does not necessarily have to be 0 when run starts.
@ REPEATING
Execute the trigger every time step.
@ ONE_TIME
Execute the trigger only once.
Wrapper of pointer that deletes the resource from destructor.
Interface for triggering generic actions during the run.
virtual TriggerEnum type() const =0
Returns the type of the trigger.
virtual bool condition(const Storage &storage, const Statistics &stats)=0
Returns true if the trigger should be executed.
virtual AutoPtr< ITrigger > action(Storage &storage, Statistics &stats)=0
Action executed when the condition is fulfilled.
Trigger executing given action every period.
virtual TriggerEnum type() const override
Returns the type of the trigger.
virtual bool condition(const Storage &UNUSED(storage), const Statistics &stats) override
PeriodicTrigger(const Float period, const Float startTime)
period Period in simulation time of triggered action.
Object holding various statistics about current run.
TValue get(const StatisticsId idx) const
Returns value of a statistic.
Container storing all quantities used within the simulations.
Base class for all polymorphic objects.