double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
Base class for all particle materials.
#define NAMESPACE_SPH_END
QuantityId
Unique IDs of basic quantities of SPH particles.
INLINE bool tryRemove(const TKey &key)
Removes element with given key if present, otherwise it does nothing.
INLINE TValue & insert(const TKey &key, const TValue &value)
Adds a new element into the map or sets new value of element with the same key.
FlatMap< QuantityId, Interval > ranges
Allowed range of quantities.
static const Float DEFAULT_MINIMAL
FlatMap< QuantityId, Float > minimals
Minimal values used in timestepping, do not affect values of quantities themselves.
INLINE const Interval range(const QuantityId id) const
Returns the range of allowed quantity values.
INLINE Float minimal(const QuantityId id) const
Returns the scale value of the quantity.
static const Interval DEFAULT_RANGE
Default values.
void setRange(const QuantityId id, const Interval &range, const Float minimal)
Sets the timestepping parameters of given quantity.
Object representing a 1D interval of real numbers.
static Interval unbounded()
Returns an unbounded (infinite) interval.
Creating code components based on values from settings.
AutoPtr< IUvMapping > getUvMapping(const RunSettings &settings)
AutoPtr< IRng > getRng(const RunSettings &settings)
SharedPtr< IScheduler > getScheduler(const RunSettings &settings=RunSettings::getDefaults())
MaterialInitialContext()=default
SharedPtr< IScheduler > scheduler
AutoPtr< IUvMapping > uvMap
If used, texture mapping coordinates are generated provided mapping.
Float kernelRadius
Kernel radius in units of smoothing length.
AutoPtr< IRng > rng
Random number generator.