Skip to content

Commit e258cec

Browse files
author
abacus_fixer
committed
refactor(pwdft): clean up vnl_pw.cpp after split, drop unused includes
Step 6 of vnl_pw.cpp split (final): - Keep only ctor/dtor, release_memory(), init(), print_vnl(), rescale_vnl() and the get_*_data<T>() template specializations - Drop now-unused includes (clebsch_gordan, math_integral, math_polyint, math_sphbes, math_ylmreal, parallel_reduce, vnl_op, parallel_comm) - Add file-level doxygen comment describing the new module layout Verified: make -j 30 in build_max_para_test passes.
1 parent 160ddb9 commit e258cec

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

source/source_pw/module_pwdft/vnl_pw.cpp

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
11
#include "vnl_pw.h"
22

33
#include "source_io/module_parameter/parameter.h"
4-
#include "source_base/clebsch_gordan_coeff.h"
54
#include "source_base/global_function.h"
65
#include "source_base/global_variable.h"
7-
#include "source_base/math_integral.h"
8-
#include "source_base/math_polyint.h"
96
#include "source_base/output.h"
10-
#include "source_base/math_sphbes.h"
11-
#include "source_base/math_ylmreal.h"
127
#include "source_base/memory_recorder.h"
13-
#include "source_base/parallel_reduce.h"
148
#include "source_base/module_device/device.h"
159
#include "source_base/timer.h"
16-
#include "source_pw/module_pwdft/kernels/vnl_op.h"
1710

18-
#include "source_base/parallel_comm.h" // use POOL_WORLD
11+
#include <cmath>
12+
13+
/**
14+
* @file vnl_pw.cpp
15+
* @brief Core resource management for pseudopot_cell_vnl.
16+
*
17+
* This file now keeps only the central lifecycle and accessor glue:
18+
* - ctor / dtor / release_memory(): device buffer cleanup
19+
* - init(): allocate and wire vkb, tab, tab_at, deeq, qq_nt/qq_so, nhtol etc.
20+
* - print_vnl(): dump tab to stream
21+
* - rescale_vnl(): rescale tab/tab_at/qrad when the cell volume changes
22+
* - get_*_data<T>() template specializations for CPU/GPU typed pointer access
23+
*
24+
* Heavy logic (getvnl, init_vnl, qrad, deeq, alpha channel) lives in:
25+
* vnl_pw_getvnl.cpp, vnl_pw_init_vnl.cpp, vnl_pw_qrad.cpp,
26+
* vnl_pw_deeq.cpp, vnl_pw_alpha.cpp, vnl_pw_grad.cpp
27+
*/
1928

2029

2130
pseudopot_cell_vnl::pseudopot_cell_vnl()

0 commit comments

Comments
 (0)