Skip to content

Commit

Permalink
Fix electron bc cutoff at lower boundary
Browse files Browse the repository at this point in the history
Indexing error meant that half the time the cutoff did not interpolate
smoothly between grid points.
  • Loading branch information
johnomotani committed Nov 13, 2024
1 parent 2542ba0 commit 67ef845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moment_kinetics/src/electron_kinetic_equation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2394,7 +2394,7 @@ end
pdf[plus_vcut_ind+1,1,1,ir] *= vcut_fraction - 0.5
else
pdf[plus_vcut_ind+1,1,1,ir] = 0.0
pdf[plus_vcut_ind+1,1,1,ir] *= vcut_fraction + 0.5
pdf[plus_vcut_ind,1,1,ir] *= vcut_fraction + 0.5
end

# update the electrostatic potential at the boundary to be the value corresponding to the updated cutoff velocity
Expand Down

0 comments on commit 67ef845

Please sign in to comment.