Skip to content

Commit

Permalink
remove padding in charge deposition
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherMayes committed Apr 10, 2021
1 parent 6b08df4 commit a012dde
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions code/open_spacecharge_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,8 @@ subroutine deposit_particles(xa, ya, za, mesh3d, qa, total_charge, resize_mesh)
if (resize) then
min = [minval(xa), minval(ya), minval(za)]
max = [maxval(xa), maxval(ya), maxval(za)]
delta =(max(:) - min(:) ) / (mesh3d%nhi(:) - mesh3d%nlo(:) + 1)
! Pad by by 1.1 bins
pad = delta*1.1
min = min !- pad
max = max + pad
delta =(max(:) - min(:) ) / (mesh3d%nhi(:) - mesh3d%nlo(:) + 1)

delta =(max(:) - min(:) ) / (mesh3d%nhi(:) - mesh3d%nlo(:) )

mesh3d%min = min
mesh3d%max = max
mesh3d%delta = delta
Expand Down Expand Up @@ -239,8 +234,6 @@ subroutine deposit_particles(xa, ya, za, mesh3d, qa, total_charge, resize_mesh)

n_particles = size(xa)



if (present(qa)) then
mesh3d%charge = sum(qa)
elseif (present(total_charge) .and. .not. present(qa)) then
Expand Down

0 comments on commit a012dde

Please sign in to comment.