Skip to content

Commit

Permalink
Fix in get_ave_background_density()
Browse files Browse the repository at this point in the history
  • Loading branch information
ceschoon committed Nov 3, 2023
1 parent d02f969 commit af9d4aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Density.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,11 @@ double Density::get_ave_background_density() const
{d += get(ix,iy,0); n++;}

for(int ix=0;ix<Nx_;ix++)
for(int iz=0;iz<Nz_;iz++)
for(int iz=1;iz<Nz_;iz++) // Cedric: start from Nz=1 so that the Ny=Nz=0 boundary points are counted twice in the average. Same remark below.
{d += get(ix,0,iz); n++;}

for(int iy=0;iy<Ny_;iy++)
for(int iz=0;iz<Nz_;iz++)
for(int iy=1;iy<Ny_;iy++)
for(int iz=1;iz<Nz_;iz++)
{d += get(0,iy,iz); n++;}


Expand Down

0 comments on commit af9d4aa

Please sign in to comment.