SPH
|
Callbacks executed by the simulation to provide feedback to the user. More...
#include <IRun.h>
Public Member Functions | |
virtual void | onSetUp (const Storage &storage, Statistics &stats)=0 |
Called right before the run starts, i.e. after initial conditions are set up. More... | |
virtual void | onTimeStep (const Storage &storage, Statistics &stats)=0 |
Called every timestep. More... | |
virtual bool | shouldAbortRun () const =0 |
Returns whether current run should be aborted or not. More... | |
![]() | |
virtual | ~Polymorphic () |
Callbacks executed by the simulation to provide feedback to the user.
All functions are called from the same thread that called IRun::run.
|
pure virtual |
Called right before the run starts, i.e. after initial conditions are set up.
Implemented in NullRunCallbacks.
|
pure virtual |
Called every timestep.
This is a blocking call, run is paused until the function returns. This allows to safely access the storage and run statistics. Note that accessing the storage from different thread during run is generally unsafe, as the storage can be resized during the run.
Implemented in NullRunCallbacks.
|
pure virtual |
Returns whether current run should be aborted or not.
Can be called any time.
Implemented in NullJobCallbacks, and NullRunCallbacks.