Particle sampling

GEMPIC.ParticleSamplerType
ParticleSampler{D,V}( sampling_type, symmetric, dims, n_particles)

Particle initializer class with various functions to initialize a particle.

  • sampling_type : :random or :sobol
  • symmetric : true or false
  • n_particles : number of particles
GEMPIC.sample!Method
sample!(d, pg)

Sampling from a probability distribution to initialize a Landau damping in 1D1V space.

\[f_0(x,v,t) = \frac{n_0}{2π v_{th}^2} ( 1 + \alpha cos(k_x x)) exp( - \frac{v^2}{2 v_{th}^2})\]

GEMPIC.sample!Method
sample!( pg, ps, df, mesh)

Sample from a Particle sampler

  • pg : Particle group
  • ps : Particle sampler
  • df : Distribution function
  • xmin : lower bound of the domain
  • dimx : length of the domain.
GEMPIC.sample_allMethod
sample_all( ps, pg, df, mesh )

Helper function for pure sampling

GEMPIC.sample_symMethod
sample_sym( ps, pg, df, mesh )

Helper function for antithetic sampling in 1d2v

Special case of the Landau Damping

GEMPIC.LandauDampingType
Landau( α, kx)

Test structure to initialize a particles distribtion for Landau damping test case in 1D1V and 1D2V

GEMPIC.sample!Method
sample!(d, pg)

Sampling from a probability distribution to initialize a Landau damping in 1D2V space.

\[f_0(x,v,t) = \frac{n_0}{2π v_{th}^2} ( 1 + \alpha cos(k_x x)) exp( - \frac{v_x^2+v_y^2}{2 v_{th}^2})\]

The newton function solves the equation $P(x)-r=0$ with Newton’s method

\[x^{n+1} = x^n – (P(x)-(2\pi r / k)/f(x) \]

with

\[P(x) = \int_0^x (1 + \alpha cos(k_x y)) dy = x + \frac{\alpha}{k_x} sin(k_x x)\]