Particle-Mesh coupling

SpinGEMPIC.ParticleMeshCouplingType
ParticleMeshCoupling( mesh,
                      no_particles, spline_degree, 
                      smoothing_type )

Kernel smoother with splines of arbitrary degree placed on a uniform mesh. Spline with index i starts at point i

  • delta_x : Value of grid spacing along both directions.
  • xmin, xmax, dimx : Definition of the domain
  • nx : Array containing number ofpoints along each direction
  • no_particles : Number of particles of underlying PIC method
  • spline_degree : Degree of smoothing kernel spline
  • n_span : Number of intervals where spline non zero (spline_degree + 1)
  • scaling : Scaling factor depending on whether :galerkin or :collocation
  • n_quad_points : Number of quadrature points
  • spline_val: scratch data for spline evaluation
  • spline_val_more : more scratch data for spline evaluation
  • quad_x, quad_w : quadrature weights and points
Note

This version for Spin problem is very close to functions implemented in GEMPIC.jl

source
SpinGEMPIC.add_charge!Method
add_charge!( rho, p, position, marker_charge)

Add charge of one particle

  • p : kernel smoother object
  • position : Position of the particle
  • marker_charge : Particle weights time charge
  • rho_dofs : Coefficient vector of the charge distribution
source
SpinGEMPIC.add_current_update_v!Method
add_current_update_v!( j_dofs, p, 
                       position_old, position_new, 
                       marker_charge, qoverm, 
                       vi)

Add current for one particle and update v (according to $H_{p1}$ part in Hamiltonian splitting)

  • Read out particle position and velocity
  • Compute index_old, the index of the last DoF on the grid the

particle contributes to, and r_old, its position (normalized to cell size one).

source
SpinGEMPIC.evaluateMethod
evaluate(p, position, field_dofs)

Evaluate field at position

  • p : Kernel smoother object
  • position : Position of the particle
  • field_dofs : Coefficient vector for the field DoFs
  • field_value : Value(s) of the electric fields at given position
source
SpinGEMPIC.update_jv!Method
update_jv!(j_dofs, p, 
           lower, upper, index, marker_charge, 
           qoverm, sign, vi, bfield_dofs)

Helper function for add_current_update_v.

source