SPH
Classes | Public Member Functions | List of all members
StabilizationSolver Class Reference

Helper solver used to converge into stable initial conditions. More...

#include <StabilizationSolver.h>

Inheritance diagram for StabilizationSolver:
ISolver Polymorphic

Public Member Functions

 StabilizationSolver (const Interval timeRange, const Float delta, AutoPtr< ISolver > &&solver)
 
 StabilizationSolver (const RunSettings &settings, AutoPtr< ISolver > &&solver)
 
 StabilizationSolver (IScheduler &scheduler, const RunSettings &settings, AutoPtr< IBoundaryCondition > &&bc)
 
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
 
virtual void create (Storage &storage, IMaterial &material) const override
 Initializes all quantities needed by the solver in the storage. More...
 
- Public Member Functions inherited from ISolver
virtual void collide (Storage &UNUSED(storage), Statistics &UNUSED(stats), const Float UNUSED(dt))
 Detects the collisions and computes new positions of particles. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Helper solver used to converge into stable initial conditions.

It is a wrapper of another solver (assumed SPH solver, but it can be theoretically anything). StabilizationSolver forwards calls to the underlying solver, but it also damps particle velocities and additionally resets all material fracture every timestep, provided the underlying solver uses fracture.

Definition at line 24 of file StabilizationSolver.h.

Constructor & Destructor Documentation

◆ StabilizationSolver() [1/3]

StabilizationSolver::StabilizationSolver ( const Interval  timeRange,
const Float  delta,
AutoPtr< ISolver > &&  solver 
)
inline

Definition at line 44 of file StabilizationSolver.h.

◆ StabilizationSolver() [2/3]

StabilizationSolver::StabilizationSolver ( const RunSettings settings,
AutoPtr< ISolver > &&  solver 
)
inline

Definition at line 49 of file StabilizationSolver.h.

◆ StabilizationSolver() [3/3]

StabilizationSolver::StabilizationSolver ( IScheduler scheduler,
const RunSettings settings,
AutoPtr< IBoundaryCondition > &&  bc 
)
inline

Definition at line 56 of file StabilizationSolver.h.

Member Function Documentation

◆ collide()

virtual void StabilizationSolver::collide ( Storage storage,
Statistics stats,
const Float  dt 
)
inlineoverridevirtual

Definition at line 108 of file StabilizationSolver.h.

◆ create()

virtual void StabilizationSolver::create ( Storage storage,
IMaterial material 
) const
inlineoverridevirtual

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.

Parameters
storageParticle storage that shall be modified as needed by the solver.
materialMaterial 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).

Implements ISolver.

Definition at line 113 of file StabilizationSolver.h.

◆ integrate()

virtual void StabilizationSolver::integrate ( Storage storage,
Statistics stats 
)
inlineoverridevirtual

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).

Parameters
storageStorage containing all quantities.
statsObject where the solver saves all computed statistics of the run.

Implements ISolver.

Definition at line 59 of file StabilizationSolver.h.


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