Particle-Mesh coupling
SpinGEMPIC.ParticleMeshCoupling — TypeParticleMeshCoupling( 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 domainnx: Array containing number ofpoints along each directionno_particles: Number of particles of underlying PIC methodspline_degree: Degree of smoothing kernel splinen_span: Number of intervals where spline non zero (spline_degree + 1)scaling: Scaling factor depending on whether :galerkin or :collocationn_quad_points: Number of quadrature pointsspline_val: scratch data for spline evaluationspline_val_more: more scratch data for spline evaluationquad_x, quad_w: quadrature weights and points
This version for Spin problem is very close to functions implemented in GEMPIC.jl
SpinGEMPIC.add_charge! — Methodadd_charge!( rho, p, position, marker_charge)Add charge of one particle
p: kernel smoother objectposition: Position of the particlemarker_charge: Particle weights time chargerho_dofs: Coefficient vector of the charge distribution
SpinGEMPIC.add_current_update_v! — Methodadd_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).
SpinGEMPIC.evaluate — Methodevaluate(p, position, field_dofs)Evaluate field at position
p: Kernel smoother objectposition: Position of the particlefield_dofs: Coefficient vector for the field DoFsfield_value: Value(s) of the electric fields at given position
SpinGEMPIC.update_jv! — Methodupdate_jv!(j_dofs, p,
lower, upper, index, marker_charge,
qoverm, sign, vi, bfield_dofs)Helper function for add_current_update_v.