manodeep / Corrfunc

⚡️⚡️⚡️Blazing fast correlation functions on the CPU.
https://corrfunc.readthedocs.io
MIT License
163 stars 50 forks source link

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

Closed manodeep closed 1 year ago

manodeep commented 4 years ago

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

manodeep commented 4 years ago

@JonLoveday I pushed a fix via e53bce3050139337dae5723a3601e707f1f37920. Should not be too long before we can merge this into master.

If possible, would you please checkout the code_quality branch and see if the issue is resolved?

manodeep commented 4 years ago

@JonLoveday The fix is now on the master branch - I am closing this issue.

If the fix does not solve your case, please feel free to re-open this issue.

manodeep commented 4 years ago

This is not fixed - see #210

manodeep commented 1 year ago

This is done / superseded by #277