Skip to content

Commit

Permalink
Test if medium limits cause the problem
Browse files Browse the repository at this point in the history
  • Loading branch information
dronir committed Oct 2, 2014
1 parent 6009aaf commit cee3d36
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/lib/simulation/cnt_grid3d.f90
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,13 @@ subroutine cnt_grid3D_optimizeGrid(c, verbose)
do i = 1, c % nParts
pp = c%parts(i)%P

la(1:2) = floor((pp(1:2) - c%parts(i)%r + c%hwidth) * c%rw) + 1
lb(1:2) = floor((pp(1:2) + c%parts(i)%r + c%hwidth) * c%rw) + 1
la(1:2) = floor((pp(1:2) - c%parts(i)%r + c%hwidth) * c%rw)
lb(1:2) = floor((pp(1:2) + c%parts(i)%r + c%hwidth) * c%rw)

where(la < 1) la = 1
where(lb > c%res_xy) lb = c%res_xy
la = modulo(la, c%res_xy) + 1
lb = modulo(lb, c%res_xy) + 1
! where(la < 1) la = 1
! where(lb > c%res_xy) lb = c%res_xy

la(3) = floor((pp(3) - c%parts(i) % r) * c % rh) + 1
lb(3) = floor((pp(3) + c%parts(i) % r) * c % rh) + 1
Expand Down

0 comments on commit cee3d36

Please sign in to comment.