SPH
|
Parameters of DiehlDistribution. More...
#include <Distribution.h>
Public Types | |
using | DensityFunc = Function< Float(const Vector &position)> |
Public Attributes | |
DensityFunc | particleDensity = [](const Vector&) { return 1._f; } |
Function specifies the particle density in space. More... | |
Size | maxDifference = 10 |
Allowed difference between the expected and actual number of particles. More... | |
Size | numOfIters = 50 |
Number of iterations. More... | |
Float | strength = 0.1_f |
Magnitude of a repulsive force between particles that moves them to their final locations. More... | |
Float | small = 0.1_f |
Normalization value to prevent division by zero for overlapping particles. More... | |
Function< bool(Size iter, ArrayView< const Vector > r)> | onIteration = nullptr |
Optional callback executed once every iteration. More... | |
Parameters of DiehlDistribution.
Definition at line 108 of file Distribution.h.
using DiehlParams::DensityFunc = Function<Float(const Vector& position)> |
Definition at line 109 of file Distribution.h.
Size DiehlParams::maxDifference = 10 |
Allowed difference between the expected and actual number of particles.
Lower value generates number of particles closer to required value, but takes longer to compute.
Definition at line 120 of file Distribution.h.
Size DiehlParams::numOfIters = 50 |
Number of iterations.
For zero, distribution of particles is simply random, higher values lead to more evenly distributed particles (less discrepancy), but also take longer to compute.
Definition at line 126 of file Distribution.h.
Optional callback executed once every iteration.
The generator passes the iteration number and the current particle distribution as parameters. Functor may return false to cancel the iterative algorithm prematurely and return the current particle distribution.
Definition at line 143 of file Distribution.h.
DensityFunc DiehlParams::particleDensity = [](const Vector&) { return 1._f; } |
Function specifies the particle density in space.
Does not have to be normalized, only a relative number of particles at different places is relevant. It has to be strictly non-negative in the domain.
Definition at line 115 of file Distribution.h.
Float DiehlParams::small = 0.1_f |
Normalization value to prevent division by zero for overlapping particles.
Keep default, only for testing.
Definition at line 136 of file Distribution.h.
Float DiehlParams::strength = 0.1_f |
Magnitude of a repulsive force between particles that moves them to their final locations.
Larger values mean faster convergence but less stable particle grid.
Definition at line 131 of file Distribution.h.