From 0606706c1975fe3321fbde79adf44ce804e7fa7c Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Thu, 29 Aug 2024 16:21:43 -0600 Subject: [PATCH] temporarily use first dimension for calculating E field location This is correct for node centered electric fields where all components are located at the same place in a cell, but wrong for edge electric fields. --- src/particle_updaters/electrostatic.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/particle_updaters/electrostatic.jl b/src/particle_updaters/electrostatic.jl index 29bb943..9390798 100644 --- a/src/particle_updaters/electrostatic.jl +++ b/src/particle_updaters/electrostatic.jl @@ -56,7 +56,7 @@ function step!(step::ElectrostaticParticlePush) ) for I in Is - grid_cell_coord = cell_index_to_cell_coords(step.E, I) + grid_cell_coord = cell_index_to_cell_coords(step.E, I, 1) dist = Tuple(particle_cell_coord .- grid_cell_coord) interp_weights = step.interpolation_function.(dist) interp_weight = prod(interp_weights)