m3g / CellListMap.jl

Flexible implementation of cell lists to map the calculations of particle-pair dependent functions, such as forces, energies, neighbor lists, etc.
https://m3g.github.io/CellListMap.jl/
MIT License
87 stars 4 forks source link

fix: signature for pairwise mapping #61

Closed drelatgithub closed 2 years ago

drelatgithub commented 2 years ago

Fixed signature for map_pairwise_serial! and map_pairwise_parallel! for CellListPair type.

Currently, the package fails for the following example:

using CellListMap

box = Box([100,100,100],20)
b1 = [[100,100,100] .* rand(3) for _ in 1:10]
b2 = [[100,100,100] .* rand(3) for _ in 1:10]
cl = CellList(b1, b2, box)

CellListMap.map_pairwise_serial!((x,y,i,j,d2,output)->output, nothing, box, cl)

because keyword show_progress is by default show_progress which is not defined elsewhere.

lmiq commented 2 years ago

Thanks for fixing this. I wander only how did you reach this issue, since these functions are not expected to be called directly.

drelatgithub commented 2 years ago

Thank you! Indeed, this was not a problem if only exported functions are used. I was trying out some package internal functions when I found this small issue.

lmiq commented 2 years ago

Please let me know if you experience any other issue. Thanks again.