tChange regular indexing method to contain lower grid edge - Granular.jl - Julia package for granular dynamics simulation
 (HTM) git clone git://src.adamsgaard.dk/Granular.jl
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 3a804499104abb325af7654f1a52048c4edadec4
 (DIR) parent f663f572c7f1b0e5aee6157f2925eeee508c4eef
 (HTM) Author: Anders Damsgaard <andersd@riseup.net>
       Date:   Fri,  5 Jan 2018 10:40:43 -0500
       
       Change regular indexing method to contain lower grid edge
       
       Diffstat:
         M src/grid.jl                         |       6 +++---
       
       1 file changed, 3 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/src/grid.jl b/src/grid.jl
       t@@ -164,8 +164,8 @@ function sortGrainsInGrid!(simulation::Simulation, grid::Any; verbose=true)
                else
        
                    if grid.regular_grid
       -                i, j = Int.(ceil.(simulation.grains[idx].lin_pos
       -                                  ./ grid.dx[1:2]))
       +                i, j = Int.(floor.(simulation.grains[idx].lin_pos
       +                                   ./ grid.dx[1:2])) + [1,1]
                    else
        
                        # Search for point in 8 neighboring cells
       t@@ -299,7 +299,7 @@ function isPointInCell(grid::Any, i::Int, j::Int,
                               method::String="Conformal")
        
            if grid.regular_grid
       -        if [i,j] == Int.(ceil.(point ./ grid.dx[1:2]))
       +        if [i,j] == Int.(floor.(point ./ grid.dx[1:2])) + [1,1]
                    return true
                else
                    return false