LinkCell pre-computation of nearest neighbor cells

Issue #194 new
Bradley Dice created an issue

If a user chooses to build a LinkCell object with a tiny value of r_cut, the constructor calls computeCellNeighbors() and it tries to build an enormous pre-computed array of nearest-neighbor cells in order to speed up future computations. However, when the particle density is small, most of this information isn't even used -- only cells with particles need their nearest neighbors referenced in most cases. Of course, users can choose to use a larger r_cut value, but interactive visualizations and other tools often won't compare the value of r_cut to the box size or system density to pick a better default choice.

A branch in progress aims to address this, and has a benchmark script. Performance is slower for most systems, but this may be resolved with a better algorithm / data structure. https://bitbucket.org/glotzer/freud/branch/linkcell_neighbors

Comments (2)

  1. Bradley Dice reporter

    The proper way to address this is with a TBB parallel data structure that will compute cell neighbors on demand and cache them.

  2. Log in to comment