97 template <
template <
typename>
class Tls>
Generic dynamically allocated resizable storage.
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
std::ostream & operator<<(std::ostream &stream, const CriterionId id)
@ MAX_CHANGE
Timestep is limited by the maximum allowed change from previous timestep.
@ INITIAL_VALUE
Timestep is not computed, using given initial value.
@ MAXIMAL_VALUE
Timestep given by selected maximal value.
@ CFL_CONDITION
Timestep computed using CFL condition.
@ DERIVATIVE
Timestep based on value-to-derivative ratio.
Criterion setting time step based on computed acceleration of particles.
AccelerationCriterion(const RunSettings &settings)
virtual TimeStep compute(IScheduler &scheduler, Storage &storage, Float maxStep, Statistics &stats) override
Computes the value of the time step.
Generic dynamically allocated resizable storage.
Time step based on CFL criterion.
virtual TimeStep compute(IScheduler &scheduler, Storage &storage, Float maxStep, Statistics &stats) override
Storage must contain at least positions of particles and sound speed, checked by assert.
CourantCriterion(const RunSettings &settings)
Criterion setting time step based on value-to-derivative ratio for time-dependent quantities.
virtual TimeStep compute(IScheduler &scheduler, Storage &storage, Float maxStep, Statistics &stats) override
Computes the value of the time step.
DerivativeCriterion(const RunSettings &settings)
Criterion computing time step from velocity divergence.
virtual TimeStep compute(IScheduler &scheduler, Storage &storage, Float maxStep, Statistics &stats) override
Computes the value of the time step.
DivergenceCriterion(const RunSettings &settings)
Interface that allows unified implementation of sequential and parallelized versions of algorithms.
Base class for timestep setters.
virtual TimeStep compute(IScheduler &scheduler, Storage &storage, Float maxStep, Statistics &stats)=0
Computes the value of the time step.
Helper criterion, wrapping multiple criteria under ITimeStepCriterion interface.
virtual TimeStep compute(IScheduler &scheduler, Storage &storage, const Float maxStep, Statistics &stats) override
Computes the value of the time step.
MultiCriterion(const RunSettings &settings)
Object holding various statistics about current run.
Container storing all quantities used within the simulations.
@ DIVERGENCE
Time step computed from velocity divergence.
@ ACCELERATION
Time step computed from ratio of acceleration and smoothing length.
Base class for all polymorphic objects.
Float value
Value of the time step in code units (currently SI).
CriterionId id
Criterion applied to compute the time step;.