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

Box constructor is type-unstable #57

Open lmiq opened 2 years ago

lmiq commented 2 years ago

The Box constructor is type-unstable, because of the two types of unit cells and the two dimensions that are possible.

This type instability is benign, as it does not propagate to the performance-critical functions, but anyway it is annoying sometimes, if it is being used from within a larger code base, because it causes some minor allocations.