SPH
|
#include <AggregateSolver.h>
Public Member Functions | |
AggregateSolver (IScheduler &scheduler, const RunSettings &settings) | |
~AggregateSolver () | |
void | createAggregateData (Storage &storage, const AggregateEnum source) |
virtual void | integrate (Storage &storage, Statistics &stats) override |
Computes derivatives of all time-dependent quantities. More... | |
virtual void | collide (Storage &storage, Statistics &stats, const Float dt) override |
Checks and resolves particle collisions. More... | |
virtual void | create (Storage &storage, IMaterial &material) const override |
Initializes all quantities needed by the solver in the storage. More... | |
![]() | |
HardSphereSolver (IScheduler &scheduler, const RunSettings &settings) | |
Creates the solver, using the gravity implementation specified by settings. More... | |
HardSphereSolver (IScheduler &scheduler, const RunSettings &settings, AutoPtr< IGravity > &&gravity) | |
Creates the solver by passing the user-defined gravity implementation. More... | |
HardSphereSolver (IScheduler &scheduler, const RunSettings &settings, AutoPtr< IGravity > &&gravity, AutoPtr< ICollisionHandler > &&collisionHandler, AutoPtr< IOverlapHandler > &&overlapHandler) | |
Creates the solver by specifying gravity and handlers for collision and overlaps. More... | |
~HardSphereSolver () override | |
![]() | |
virtual void | collide (Storage &UNUSED(storage), Statistics &UNUSED(stats), const Float UNUSED(dt)) |
Detects the collisions and computes new positions of particles. More... | |
![]() | |
virtual | ~Polymorphic () |
Definition at line 33 of file AggregateSolver.h.
AggregateSolver::AggregateSolver | ( | IScheduler & | scheduler, |
const RunSettings & | settings | ||
) |
Definition at line 645 of file AggregateSolver.cpp.
|
default |
|
overridevirtual |
Checks and resolves particle collisions.
Reimplemented from HardSphereSolver.
Definition at line 669 of file AggregateSolver.cpp.
Initializes all quantities needed by the solver in the storage.
When called, storage already contains particle positions and their masses. All remaining quantities must be created by the solver. The function is called once for every body in the run. The given storage is guaranteed to be homogeneous; it contains only a single material.
storage | Particle storage that shall be modified as needed by the solver. |
material | Material containing parameters of the body being created. The solver can also set up necessary timestepping parameters of the material (ranges and minimal values of quantities). |
Reimplemented from HardSphereSolver.
Definition at line 675 of file AggregateSolver.cpp.
void AggregateSolver::createAggregateData | ( | Storage & | storage, |
const AggregateEnum | source | ||
) |
Definition at line 683 of file AggregateSolver.cpp.
|
overridevirtual |
Computes derivatives of all time-dependent quantities.
The solver can also modify the quantities arbitrarily. It is however not recommended to perform the integration in the solver (using the time step stored in Statistics) as this is a job for timestepping. The solver can modify quantities using boundary conditions, inter-quantity relationships (such as the summation equation for density in SPH), clamping of values etc. It is also possible to add or remove particles in the storage and modify materials. Threads running concurrently with the solver must assume the solver can modify the storage at any time, so accessing the storage from different threads is only allowed before or after integrate; the is no locking for performance reasons.
All highest order derivatives are guaranteed to be set to zero when integrate is called (this is a responsibility of ITimeStepping implementation).
storage | Storage containing all quantities. |
stats | Object where the solver saves all computed statistics of the run. |
Reimplemented from HardSphereSolver.
Definition at line 656 of file AggregateSolver.cpp.