PLUTO  4.4-patch2
Functions
particles_load.c File Reference

Initial particle loading. More...

#include "pluto.h"

Functions

void Particles_LoadRandom (double *qbeg, double *qend, double(*DistribFunc)(double, double, double), double *q)
 
void Particles_LoadUniform (int i, int ntot, double *xbeg, double *xend, double *coor)
 

Detailed Description

Author
A. Mignone (migno.nosp@m.ne@t.nosp@m.o.inf.nosp@m.n.it)
Date
July 10, 2019

Function Documentation

◆ 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]qbegan array specifying the coordinate lower bound
[in]qendan array specifying the coordinate upper bound
[in]DistribFuncParticle Distribution function.
[out]qthe 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]ian integer giving the particle counter inside the region [xbeg, xend]
[in]ntotthe total number of particles inside the region [xbeg, xend]
[in]xbegan array specifying the coordinates of the lower bound in the domain to be filled
[in]xendan array specifying the coordinates of the upper bound in the domain to be filled
[out]cooran array containing the particle position