Initial particle loading.
More...
◆ Particles_LoadRandom()
void Particles_LoadRandom |
( |
double * |
qbeg, |
|
|
double * |
qend, |
|
|
double(*)(double, double, double) |
DistribFunc, |
|
|
double * |
q |
|
) |
| |
Compute particle coordinate (space or velocity) assuming a a given distribution function using the acceptance-rejection method.
- Parameters
-
[in] | qbeg | an array specifying the coordinate lower bound |
[in] | qend | an array specifying the coordinate upper bound |
[in] | DistribFunc | Particle Distribution function. |
[out] | q | the output coordinate |
◆ Particles_LoadUniform()
void Particles_LoadUniform |
( |
int |
i, |
|
|
int |
ntot, |
|
|
double * |
xbeg, |
|
|
double * |
xend, |
|
|
double * |
coor |
|
) |
| |
Compute particles coordinate assuming a regular spacing given by l = 1/(n)^(1/d) where d is the number of spatial dimensions.
- Parameters
-
[in] | i | an integer giving the particle counter inside the region [xbeg, xend] |
[in] | ntot | the total number of particles inside the region [xbeg, xend] |
[in] | xbeg | an array specifying the coordinates of the lower bound in the domain to be filled |
[in] | xend | an array specifying the coordinates of the upper bound in the domain to be filled |
[out] | coor | an array containing the particle position |