Skip to content

Fix bug in contact kdtree when the container particles contains inactive particles.

Benoit Fabreges requested to merge fix_contact_kdtree into master

The function kdtree_get_point_count returns the total number of particles (including inactive ones) but the function kdtree_get_pt automatically add the o ffset for inactive particles. The number of particles should be the number of active particles. Also, internally, the index of the particles in the library nanoflann start at 0. Thus, the offset of inactive particles should be added to the result of a search to point to the right particle in scopi.

Remove useless call: buildIndex() is already called in constructor of index. Remove useless variables.

Merge request reports