Skip to content

Commit c2a101b

Browse files
author
abacus_fixer
committed
refactor(source_cell): fold KVectorUtils shim back into K_Vectors members
The KVectorUtils free functions were a migration-period compatibility shim (2026-08-14); with all call sites now migrated, the shim only added a second calling convention and two friend declarations. - Move the real logic into K_Vectors members, line-by-line unchanged: set_after_vc (public, was KVectorUtils::set_after_vc) and mpi_k (private, __MPI-guarded, was KVectorUtils::kvec_mpi_k) - Delete the four 1-line forwarders, of which kvec_d2c/kvec_c2d had no callers left, and delete k_vector_utils.h/.cpp entirely - Mechanical call-site updates: klist.cpp internal calls go straight to the members, esolver_fp.cpp uses kv.set_after_vc(), tests use kv-> methods (kvec_ibz_kpoint -> reduce_by_symmetry with the member parameter order), 12 test CMakeLists.txt and Makefile.Objects drop the k_vector_utils.cpp registration - Drop the two K_Vectors friend declarations; update two comments that referenced KVectorUtils::ibz_kpoint Global dependency budget: k_vector_utils.cpp contributed 12 GlobalV touches; the logic now lives inside the class that already carries the k-list globals, so the PR-level count decreases. Verified: make -j 30 (100%, incl. external module test targets); ctest MODULE_CELL_{klist,reciprocal_grid,qlist}_test and klist_test_para1/ para4 5/5 passed (MPI path covers the moved mpi_k); grep confirms no KVectorUtils references remain outside the two historical notes in reciprocal_grid.h/.cpp.
1 parent be4a82b commit c2a101b

23 files changed

Lines changed: 228 additions & 413 deletions

File tree

source/Makefile.Objects

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ OBJS_CELL=atom_pseudo.o\
211211
print_cell.o\
212212
setup_nonlocal.o\
213213
klist.o\
214-
k_vector_utils.o\
215214
reciprocal_grid.o\
216215
cell_index.o\
217216
cell_tools.o\

source/source_cell/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ add_library(
3333
read_stru.cpp
3434
print_cell.cpp
3535
read_atom_species.cpp
36-
k_vector_utils.cpp
3736
sep.cpp
3837
sep_cell.cpp
3938
qlist.cpp

source/source_cell/k_vector_utils.cpp

Lines changed: 0 additions & 209 deletions
This file was deleted.

source/source_cell/k_vector_utils.h

Lines changed: 0 additions & 140 deletions
This file was deleted.

0 commit comments

Comments
 (0)