Outcome doRun(Storage &storage, const RunSettings &settings)
Runs a simulation using provided storage as initial conditions.
Integrals of motion and other integral quantities.
Object representing interval of real values.
#define NAMESPACE_SPH_END
Generic dynamically allocated resizable storage.
Base class of diagnostics of the run.
Base class for objects logging run statistics.
Interface for saving quantities of SPH particles to a file.
Callbacks executed by the simulation to provide feedback to the user.
virtual bool shouldAbortRun() const =0
Returns whether current run should be aborted or not.
virtual void onSetUp(const Storage &storage, Statistics &stats)=0
Called right before the run starts, i.e. after initial conditions are set up.
virtual void onTimeStep(const Storage &storage, Statistics &stats)=0
Called every timestep.
Defines the interface for a run.
SharedPtr< IScheduler > scheduler
Scheduler used for parallelization.
AutoPtr< ILogWriter > logWriter
Writes statistics into logger every timestep.
AutoPtr< ITimeStepping > timeStepping
Timestepping.
SharedPtr< ILogger > logger
Logging.
AutoPtr< IOutput > output
Data output.
void tearDownInternal(const Storage &storage, const Statistics &stats)
Statistics run(Storage &storage)
Runs the simulation.
virtual void setUp(SharedPtr< Storage > storage)=0
Prepares the run, creates logger, output, ...
List< AutoPtr< ITrigger > > triggers
Triggers.
AutoPtr< ISolver > solver
Solver.
void setNullToDefaults(SharedPtr< Storage > storage)
Array< AutoPtr< IDiagnostic > > diagnostics
Diagnostics.
virtual void tearDown(const Storage &storage, const Statistics &stats)=0
Called after the run.
Interface that allows unified implementation of sequential and parallelized versions of algorithms.
Interface for triggering generic actions during the run.
Object holding various statistics about current run.
Container storing all quantities used within the simulations.
Generic storage and input/output routines of settings.
Base class for all polymorphic objects.