Repository navigation
Refactor domain decomposition into focused source files - #8292
Merged
mohanchen merged 6 commits intoNov 6, 2026
Merged
Conversation
added 4 commits
November 5, 2026 14:12
ABACUS-PR-BOT
left a comment
Collaborator
There was a problem hiding this comment.
Static review at 0056698ef: no new correctness issue found in the source split. No builds or tests were run.
mohanchen
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reminder
AGENTS.mdanddocs/developers_guide/agent_governance.md.Linked Issue
None; requested refactor to keep each domain decomposition implementation file under 500 lines.
Unit Tests and/or Case Tests for my changes
cmake --build build_parallel_md1_current --target domain_decomposition MODULE_CELL_NEIGHBOR_mdcell_migrate_mpi -j8— passed after each extraction.cmake --build build_parallel_md1_current --target MODULE_CELL_NEIGHBOR_neighbor_search MODULE_CELL_NEIGHBOR_mdcell_reader MODULE_MD_LJ_pot -j8— passed.source toolchain/install/setup && export LD_LIBRARY_PATH=/tmp/abacus-domain-blas:$LD_LIBRARY_PATH && ctest --test-dir build_parallel_md1_current --output-on-failure -j2 -R 'MODULE_CELL_NEIGHBOR_(neighbor_search|mdcell_migrate_mpi|domain_decomposition_np1|domain_decomposition_np4|mdcell_reader_np4)|MODULE_MD_LJ_pot'— passed, 6/6. The temporary path maps bothlibblas.so.3andliblapack.so.3to the repository toolchain OpenBLAS library. The first run without this local workaround failed before test execution because the host BLAS/LAPACK libraries reportundefined symbol: gotoblas.python3 tools/03_code_analysis/agent_governance_check.py --base origin/develop --head HEAD --format text— exit 0; PR-body test-evidence and docs-note warnings addressed here.python3 tools/03_code_analysis/code_quality_score.py source/source_cell/dom_core.cpp source/source_cell/dom_ghost.cpp source/source_cell/dom_migrate.cpp source/source_cell/dom_force.cpp source/source_cell/dom_decomp.h— 5/5 passing.git diff --check origin/develop...HEAD— passed.What's changed?
Split the original 1,059-line implementation into
dom_core.cpp(386 lines),dom_ghost.cpp(402),dom_migrate.cpp(183), anddom_force.cpp(121). Renamed the header todom_decomp.h. Every renamed file is at most 15 characters including its extension. Updated all include paths, the main CMake OBJECT library, all direct test source lists, and the legacy Makefile object list. Kept theDomainDecompositionclass interface and algorithm behavior.Governance Notes
source_cellimplementation, include paths, and build wiring only; direct MPI calls remain in the original transport implementation.dom_migrate.cppdirectly includes<cassert>,<cmath>,<limits>, and<utility>;dom_ghost.cppdirectly includes<cassert>.md_test_fixture.his an include-path rename of the same header, not a new dependency.Latest develop synchronization
origin/developat3c1dddac06into the PR branch; no conflict.python3 tools/03_code_analysis/agent_governance_check.py --base origin/develop --head HEAD --format text— exit 0, with only the include-path rename and PR documentation-note warnings explained above.git diff --check origin/develop...HEAD— passed.