Functions
GEMPIC.add_charge!
— Methodadd_charge!(pic, position, marker_charge)
Add charge from one particle
- self : Pic Poisson solver object
- position : Position of the particle
- marker_charge : Particle weight times charge
GEMPIC.add_charge!
— Methodadd_charge!(pic, position, marker_charge)
Add charge from one particle
- self : Pic Poisson solver object
- position : Position of the particle
- marker_charge : Particle weight times charge
ParticleInCell.compute_e_from_rho!
— Methodcompute_e_from_rho!( ex, poisson, rho )
computes electric field e
from rho
by solving Poisson equation.
ParticleInCell.compute_field_energy
— Methodcompute_field_energy
Compute the squared l2 norm of electric field
ParticleInCell.compute_field_energy
— Methodcompute_field_energy
Compute the squared l2 norm of electric field
ParticleInCell.evaluate_rho!
— Methodevaluate_rho!(pic, position)
Evaluate charge density at rho at one position
- self : Pic Poisson solver object
- position : Position of the particle
- func_value : Value of rho at given position
ParticleInCell.evaluate_rho!
— Methodevaluate_rho!(pic, position)
Evaluate charge density at rho at one position
- self : Pic Poisson solver object
- position : Position of the particle
- func_value : Value of rho at given position
ParticleInCell.evaluate_rho
— Methodevaluate_phi!(pic, position)
Evaluate potential at one position
- self : Pic Poisson solver object
- position : Position of the particle
- func_value : Value of phi at given position
ParticleInCell.operator_t!
— Methodoperator_t(split, dt)
Push x
- split :: time splitting object
- dt :: time step
ParticleInCell.operator_t!
— Methodoperator_t(split, dt)
Push x
- split :: time splitting object
- dt :: time step
ParticleInCell.sample!
— Methodsample!(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})\]
ParticleInCell.sample!
— Methodsample!(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)\]
ParticleInCell.sample!
— Methodsample!(d, pg)
Sampling from a probability distribution to initialize a Landau damping in 2D2V 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})\]
ParticleInCell.solve!
— Methodsolve!( ex, ey, poisson, rho )
solves Poisson equation to compute electric fields
\[E(x,y) = -\nabla \phi(x,y) \\ -\Delta \phi(x,y) = \rho(x,y)\]
ParticleInCell.solve!
— Methodsolve!( poisson, phi, rho )
computes phi
from rho
\[-\Delta phi(x,y) = rho(x,y)\]
ParticleInCell.solve!
— Methodpoisson!( fields )
Solve the equation Δ Φ = - fields.ρ
fields.ex = ∂ Φ / ∂ x fields.ey = ∂ Φ / ∂ y
ParticleInCell.solve!
— Methodsolve!( pic )
Solve for phi and fields
- poisson : Pic Poisson solver object
ParticleInCell.solve_fields!
— Methodsolve_fields!( pic )
Solve efields from rho
ParticleInCell.solve_fields!
— MethodSolve Poisson's equation for the electric field
ParticleInCell.solve_fields!
— MethodSolve Poisson's equation for the electric field
ParticleInCell.solve_fields!
— Methodsolve_fields!( pic )
Solve efields from rho
ParticleInCell.solve_phi!
— Methodsolve_phi!( pic )
Solve for potential
ParticleInCell.strang_splitting!
— Methodstrang_splitting!(split, dt)
Strang splitting
- split :: time splitting object
- dt :: time step
ParticleInCell.strang_splitting!
— MethodStrang splitting
- split :: time splitting object
- dt :: time step