Add new search algorithm#7331
Conversation
… search_algorithm
There was a problem hiding this comment.
Pull request overview
This PR introduces a new cell neighbor-search implementation (bin-based neighbor list) under source_cell/module_neighbor_search and integrates it into the Lennard-Jones ESolver path, with accompanying build wiring and unit tests. It also adjusts an existing PW float test threshold to account for precision differences.
Changes:
- Added
module_neighbor_search(NeighborSearch + BinManager + NeighborList/PageAllocator) and hooked it into the build (CMake + Makefile.Objects). - Updated
UnitCellto implement a newIAtomProviderinterface; addedUnitCellPlusadapter. - Switched
ESolver_LJneighbor iteration from the legacy grid neighbor search to the new NeighborSearch implementation and added unit tests for the new module.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/01_PW/208_PW_CG_float/threshold | Loosened integration threshold for float PW CG test. |
| source/source_esolver/esolver_lj.h | Included UnitCellPlus and added conversion helper declaration. |
| source/source_esolver/esolver_lj.cpp | Integrated new NeighborSearch into LJ runner (replacing legacy neighbor driver code path). |
| source/source_cell/unitcell.h | Made UnitCell implement IAtomProvider by adding accessor overrides. |
| source/source_cell/module_neighbor_search/unitcell_interface.h | Added IAtomProvider interface for neighbor search inputs. |
| source/source_cell/module_neighbor_search/unitcell_plus.h | Added UnitCellPlus adapter implementing IAtomProvider. |
| source/source_cell/module_neighbor_search/neighbor_atom.h | Added neighbor atom/value types used by the new neighbor search. |
| source/source_cell/module_neighbor_search/neighbor_list.h | Added NeighborList + PageAllocator for adjacency storage. |
| source/source_cell/module_neighbor_search/bin_manager.h | Added binning manager interface. |
| source/source_cell/module_neighbor_search/bin_manager.cpp | Implemented bin construction, binning, and neighbor list building. |
| source/source_cell/module_neighbor_search/neighbor_search.h | Added NeighborSearch API and internal state. |
| source/source_cell/module_neighbor_search/neighbor_search.cpp | Implemented neighbor search initialization, expansion, and domain logic. |
| source/source_cell/module_neighbor_search/CMakeLists.txt | Added object library target and conditional test subdir. |
| source/source_cell/module_neighbor_search/test/CMakeLists.txt | Added test targets for new module. |
| source/source_cell/module_neighbor_search/test/neighbor_search_test.cpp | Added gtest coverage for NeighborSearch. |
| source/source_cell/module_neighbor_search/test/bin_manager_test.cpp | Added gtest coverage for BinManager. |
| source/source_cell/module_neighbor_search/test/neighbor_list_test.cpp | Added gtest coverage for PageAllocator/NeighborList. |
| source/source_cell/module_neighbor_search/test/test_neighbor_search.cpp | Added additional tests file (currently not built). |
| source/source_cell/CMakeLists.txt | Added module_neighbor_search subdirectory to cell build. |
| source/Makefile.Objects | Added neighbor_search objects to Makefile build graph. |
| CMakeLists.txt | Linked neighbor_search into main executable. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
this seems not relevant to this PR
There was a problem hiding this comment.
This is the changes from the previous PR. I forgot to clean up the old commit history.
Reminder
Linked Issue
Fix #...
Unit Tests and/or Case Tests for my changes
What's changed?
Any changes of core modules? (ignore if not applicable)