Skip to content

Commit

Permalink
temporarily use first dimension for calculating E field location
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
adamslc committed Aug 29, 2024
1 parent 3caa19b commit 62dc367
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/particle_updaters/electrostatic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 62dc367

Please sign in to comment.