SPH
|
Generating random positions withing the domain. More...
#include <Distribution.h>
Public Member Functions | |
RandomDistribution (AutoPtr< IRng > &&rng) | |
Creates a random distribution given random number generator. More... | |
RandomDistribution (const Size seed) | |
Creates a random distribution with uniform sampling. More... | |
virtual Array< Vector > | generate (IScheduler &scheduler, const Size n, const IDomain &domain) const override |
Generates the requested number of particles in the domain. More... | |
![]() | |
virtual | ~Polymorphic () |
Generating random positions withing the domain.
Definition at line 38 of file Distribution.h.
|
explicit |
Creates a random distribution given random number generator.
Definition at line 20 of file Distribution.cpp.
|
explicit |
Creates a random distribution with uniform sampling.
seed | Seed for the uniform RNG. |
Definition at line 23 of file Distribution.cpp.
|
overridevirtual |
Generates the requested number of particles in the domain.
Function shall also set the smoothing lenghts of the generated particles in the 4th components of the returned vectors.
scheduler | Scheduler that can be used for parallelization. |
n | Expected number of generated particles. |
domain | Computational domain where the vertices are distributed |
Implements IDistribution.
Definition at line 26 of file Distribution.cpp.