From a012ddee981ae22cdf8eeedc89ceeff61f8ecf79 Mon Sep 17 00:00:00 2001 From: ChristopherMayes <31023527+ChristopherMayes@users.noreply.github.com> Date: Sat, 10 Apr 2021 16:52:55 -0700 Subject: [PATCH] remove padding in charge deposition --- code/open_spacecharge_mod.f90 | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/code/open_spacecharge_mod.f90 b/code/open_spacecharge_mod.f90 index fab1de5..6f8e32d 100644 --- a/code/open_spacecharge_mod.f90 +++ b/code/open_spacecharge_mod.f90 @@ -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 @@ -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