Skip to content

Add a check for duplicate neighbouring cells within the theory pair counters (periodic) #192

@manodeep

Description

@manodeep

Is your feature request related to a problem? Please describe.
When periodic boundary conditions are enabled, Corrfunc should be able to calculate separations out to the maximum possible separation. Instead, Corrfunc might fail with the following error message

*Error message:
../../utils/gridlink_utils_float.c> ERROR: nlattice = 4 is so small that with periodic wrapping the same cells will be counted twice ....exiting
../../utils/gridlink_utils_float.c> Please reduce Rmax = 100.000000 to be a smaller fraction of the particle distribution region = 205.000000

Describe the solution you'd like
While adding a new neighbouring cell, add a check for duplicate neighbouring cells. A similar check is already performed here. Easiest option would be to package those lines of code into a function within gridlink_utils.c.src and call that function from all relevant assign_ngb calls.

Describe alternatives you've considered
N/A

Additional context
Reported by @JonLoveday in #69

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions