diff --git a/source/Makefile.Objects b/source/Makefile.Objects index 8d7f3b5437..73ed59a563 100644 --- a/source/Makefile.Objects +++ b/source/Makefile.Objects @@ -410,7 +410,6 @@ OBJS_LCAO=DM_gamma.o\ center2_orb-orb11.o\ center2_orb-orb21.o\ center2_orb-orb22.o\ - global_fp.o\ local_orbital_charge.o\ local_orbital_wfc.o\ record_adj.o\ diff --git a/source/driver.cpp b/source/driver.cpp index d51e1f8520..3d95101cfb 100644 --- a/source/driver.cpp +++ b/source/driver.cpp @@ -3,9 +3,6 @@ #include "module_io/input.h" #include "module_io/input_conv.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#ifdef __LCAO -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" -#endif #include "module_base/memory.h" #include "module_base/timer.h" #include "module_esolver/esolver.h" diff --git a/source/module_cell/module_neighbor/sltk_grid_driver.cpp b/source/module_cell/module_neighbor/sltk_grid_driver.cpp index b609814bd3..91a9efb8d5 100644 --- a/source/module_cell/module_neighbor/sltk_grid_driver.cpp +++ b/source/module_cell/module_neighbor/sltk_grid_driver.cpp @@ -7,6 +7,11 @@ #include #endif +namespace GlobalC +{ +Grid_Driver GridD(GlobalV::test_deconstructor, GlobalV::test_grid_driver, GlobalV::test_grid); +} + Grid_Driver::Grid_Driver( const int &test_d_in, const int &test_gd_in, diff --git a/source/module_cell/module_neighbor/sltk_grid_driver.h b/source/module_cell/module_neighbor/sltk_grid_driver.h index 512124d10e..7268ca0b7c 100644 --- a/source/module_cell/module_neighbor/sltk_grid_driver.h +++ b/source/module_cell/module_neighbor/sltk_grid_driver.h @@ -125,4 +125,8 @@ class Grid_Driver : public Grid )const; }; +namespace GlobalC +{ +extern Grid_Driver GridD; +} #endif diff --git a/source/module_elecstate/elecstate_exx.cpp b/source/module_elecstate/elecstate_exx.cpp index b2ab96d312..c4ea0ad87d 100644 --- a/source/module_elecstate/elecstate_exx.cpp +++ b/source/module_elecstate/elecstate_exx.cpp @@ -1,5 +1,4 @@ #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" namespace elecstate { diff --git a/source/module_esolver/esolver_ks_lcao.cpp b/source/module_esolver/esolver_ks_lcao.cpp index 6f464e7ed2..12d476882d 100644 --- a/source/module_esolver/esolver_ks_lcao.cpp +++ b/source/module_esolver/esolver_ks_lcao.cpp @@ -14,9 +14,9 @@ //--------------temporary---------------------------- #include "module_base/global_function.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_elecstate/module_charge/symmetry_rho.h" #include "module_elecstate/occupy.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" #include "module_hamilt_lcao/module_dftu/dftu.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_io/print_info.h" diff --git a/source/module_esolver/esolver_ks_lcao_elec.cpp b/source/module_esolver/esolver_ks_lcao_elec.cpp index ee04146dc2..2d1274a9b2 100644 --- a/source/module_esolver/esolver_ks_lcao_elec.cpp +++ b/source/module_esolver/esolver_ks_lcao_elec.cpp @@ -1,18 +1,17 @@ -#include "module_esolver/esolver_ks_lcao.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" #include "module_elecstate/module_charge/symmetry_rho.h" +#include "module_esolver/esolver_ks_lcao.h" #include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h" #include "module_hamilt_lcao/module_dftu/dftu.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" // +#include "module_base/timer.h" #include "module_cell/module_neighbor/sltk_atom_arrange.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" +#include "module_io/berryphase.h" #include "module_io/istate_charge.h" #include "module_io/istate_envelope.h" -#include "module_io/write_HS_R.h" - -#include "module_io/berryphase.h" #include "module_io/to_wannier90.h" -#include "module_base/timer.h" +#include "module_io/write_HS_R.h" #ifdef __DEEPKS #include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" #endif diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/CMakeLists.txt b/source/module_hamilt_lcao/hamilt_lcaodft/CMakeLists.txt index 8789e3cb1a..5d5a9ad7da 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/CMakeLists.txt +++ b/source/module_hamilt_lcao/hamilt_lcaodft/CMakeLists.txt @@ -28,7 +28,6 @@ if(ENABLE_LCAO) center2_orb-orb22.cpp DM_gamma.cpp DM_k.cpp - global_fp.cpp local_orbital_charge.cpp local_orbital_wfc.cpp dm_2d.cpp diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.cpp index 1aa8feb38d..b72c9e26c1 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.cpp @@ -1,10 +1,10 @@ #include "FORCE_STRESS.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" #include "module_hamilt_lcao/module_dftu/dftu.h" //Quxin add for DFT+U on 20201029 #include "module_hamilt_pw/hamilt_pwdft/global.h" // new #include "module_base/timer.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_elecstate/potentials/efield.h" // liuyu add 2022-05-18 #include "module_elecstate/potentials/gatefield.h" // liuyu add 2022-09-13 #include "module_hamilt_general/module_surchem/surchem.h" //sunml add 2022-08-10 diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.cpp index 5b21865fb0..c397e64c2a 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.cpp @@ -3,7 +3,7 @@ #include "module_base/memory.h" #include "module_base/parallel_reduce.h" #include "module_base/timer.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #ifdef __DEEPKS #include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" //caoyu add for deepks on 20210813 diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_tvnl.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_tvnl.cpp index 865e95a826..6995435d50 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_tvnl.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_tvnl.cpp @@ -1,6 +1,6 @@ #include "FORCE_gamma.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" #include #include "module_base/timer.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp index 2d02a5adf5..9bdb399d65 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp @@ -4,7 +4,7 @@ #include "module_base/timer.h" #include "module_base/parallel_reduce.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_elecstate/cal_dm.h" #include "module_base/tool_threading.h" #include "module_io/write_HS.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_gen_fixedH.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_gen_fixedH.cpp index f2d5958672..43d58cc75f 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_gen_fixedH.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_gen_fixedH.cpp @@ -1,7 +1,7 @@ #include "LCAO_gen_fixedH.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_hamilt_pw/hamilt_pwdft/wavefunc.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" #include #include #include diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.cpp index 67a763e414..b4f5bef128 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.cpp @@ -1,10 +1,11 @@ -#include "module_hamilt_pw/hamilt_pwdft/global.h" #include "LCAO_hamilt.h" -#include "module_cell/module_neighbor/sltk_atom_arrange.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" // mohan add 2021-01-30 -#include "module_hamilt_lcao/module_dftu/dftu.h" + #include "module_base/parallel_reduce.h" +#include "module_cell/module_neighbor/sltk_atom_arrange.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_general/module_xc/xc_functional.h" +#include "module_hamilt_lcao/module_dftu/dftu.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" #ifdef __DEEPKS #include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" //caoyu add 2021-07-26 #endif diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.cpp index 843d7d0107..0b0863d2cb 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.cpp @@ -1,5 +1,5 @@ #include "LCAO_matrix.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_base/tool_threading.h" #ifdef __DEEPKS diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_nnr.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_nnr.cpp index f15c5e6cb9..4b29879b27 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_nnr.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_nnr.cpp @@ -1,5 +1,5 @@ #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" #include "record_adj.h" //mohan add 2012-07-06 #include "module_base/timer.h" #include "module_base/tool_threading.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/dm_2d.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/dm_2d.cpp index b556db606e..baf93268e8 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/dm_2d.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/dm_2d.cpp @@ -7,7 +7,6 @@ #include "module_base/blas_connector.h" #include "module_base/scalapack_connector.h" #include "module_base/timer.h" -#include "global_fp.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_hamilt_lcao/hamilt_lcaodft/local_orbital_charge.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/global_fp.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/global_fp.cpp deleted file mode 100644 index 259d0adb06..0000000000 --- a/source/module_hamilt_lcao/hamilt_lcaodft/global_fp.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "global_fp.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" - -namespace GlobalC -{ -Grid_Driver GridD(GlobalV::test_deconstructor, GlobalV::test_grid_driver,GlobalV::test_grid); -} diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/global_fp.h b/source/module_hamilt_lcao/hamilt_lcaodft/global_fp.h deleted file mode 100644 index 9be3ec5ec9..0000000000 --- a/source/module_hamilt_lcao/hamilt_lcaodft/global_fp.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef GLOBAL_FP_H -#define GLOBAL_FP_H - -#include "module_cell/module_neighbor/sltk_grid_driver.h" -#include "module_hamilt_lcao/module_gint/grid_technique.h" -#include "local_orbital_wfc.h" -#include "local_orbital_charge.h" -#include "module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.h" -#include "module_hamilt_lcao/hamilt_lcaodft/LCAO_gen_fixedH.h" -#include "module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.h" -#include "module_basis/module_ao/ORB_read.h" -#include "module_basis/module_ao/ORB_gen_tables.h" - -namespace GlobalC -{ -extern Grid_Driver GridD; -} -#endif diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp index fe048884bc..5fb8b438f6 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp @@ -3,7 +3,6 @@ #include "module_base/global_variable.h" #include "module_base/timer.h" #include "module_hamilt_lcao/module_dftu/dftu.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #ifdef __DEEPKS #include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.cpp index e949778e02..b0f9eb7881 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.cpp @@ -6,8 +6,6 @@ #include "module_base/memory.h" #include "module_base/timer.h" -#include "global_fp.h" // mohan add 2021-01-30 - Local_Orbital_wfc::Local_Orbital_wfc() { allocate_flag = false; diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/deepks_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/deepks_lcao.cpp index ef7c7fecfe..487c3d5895 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/deepks_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/deepks_lcao.cpp @@ -5,7 +5,7 @@ #include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" #endif #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" namespace hamilt { diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.cpp index e6bed16c5e..57cdace1e1 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.cpp @@ -3,7 +3,6 @@ #include "module_base/timer.h" #include "module_base/tool_title.h" #include "module_hamilt_general/module_xc/xc_functional.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_ri/RI_2D_Comm.h" diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/record_adj.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/record_adj.cpp index 8c8ba89d1b..db7dd47117 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/record_adj.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/record_adj.cpp @@ -1,8 +1,8 @@ #include "record_adj.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" + #include "module_base/timer.h" #include "module_cell/module_neighbor/sltk_grid_driver.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" Record_adj::Record_adj() : iat2ca(nullptr) {} Record_adj::~Record_adj(){ if(info_modified) diff --git a/source/module_hamilt_lcao/module_deepks/LCAO_deepks.cpp b/source/module_hamilt_lcao/module_deepks/LCAO_deepks.cpp index 7cce33a80b..9533920cf8 100644 --- a/source/module_hamilt_lcao/module_deepks/LCAO_deepks.cpp +++ b/source/module_hamilt_lcao/module_deepks/LCAO_deepks.cpp @@ -21,7 +21,6 @@ #ifdef __DEEPKS #include "LCAO_deepks.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" namespace GlobalC diff --git a/source/module_hamilt_lcao/module_dftu/dftu.cpp b/source/module_hamilt_lcao/module_dftu/dftu.cpp index 9efbcd54ea..37d8d8b035 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu.cpp @@ -10,7 +10,6 @@ #include "module_base/memory.h" #include "module_base/timer.h" #include "module_basis/module_ao/ORB_gen_tables.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" #include "module_elecstate/module_charge/charge.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_elecstate/magnetism.h" diff --git a/source/module_hamilt_lcao/module_dftu/dftu_folding.cpp b/source/module_hamilt_lcao/module_dftu/dftu_folding.cpp index c17ca6448d..1297d34d5d 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu_folding.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu_folding.cpp @@ -1,7 +1,7 @@ #include "dftu.h" #include "module_base/timer.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" namespace ModuleDFTU { diff --git a/source/module_hamilt_lcao/module_dftu/dftu_force.cpp b/source/module_hamilt_lcao/module_dftu/dftu_force.cpp index cd77916bec..dd297b7c06 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu_force.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu_force.cpp @@ -22,7 +22,6 @@ #include "module_elecstate/magnetism.h" #include "module_elecstate/module_charge/charge.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" extern "C" diff --git a/source/module_hamilt_lcao/module_dftu/dftu_yukawa.cpp b/source/module_hamilt_lcao/module_dftu/dftu_yukawa.cpp index 339c2f60cc..3e6399e1b9 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu_yukawa.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu_yukawa.cpp @@ -6,7 +6,6 @@ #include "module_base/global_function.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" #include "dftu.h" #include diff --git a/source/module_hamilt_lcao/module_gint/gint_fvl.cpp b/source/module_hamilt_lcao/module_gint/gint_fvl.cpp index c5a30e2aaf..359af57d17 100644 --- a/source/module_hamilt_lcao/module_gint/gint_fvl.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_fvl.cpp @@ -1,9 +1,7 @@ #include "gint_k.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" // mohan add 2021-01-30 - -#include "module_base/ylm.h" #include "module_base/timer.h" +#include "module_base/ylm.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" void Gint::gint_kernel_force( const int na_grid, diff --git a/source/module_hamilt_lcao/module_gint/gint_gamma_vl.cpp b/source/module_hamilt_lcao/module_gint/gint_gamma_vl.cpp index f3b9ac75fb..099b66ee1c 100644 --- a/source/module_hamilt_lcao/module_gint/gint_gamma_vl.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_gamma_vl.cpp @@ -4,13 +4,12 @@ #include "gint_gamma.h" #include "gint_tools.h" #include "grid_technique.h" -#include "module_basis/module_ao/ORB_read.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_base/blas_connector.h" #include "module_base/memory.h" #include "module_base/timer.h" - -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" // mohan add 2021-01-30 +#include "module_basis/module_ao/ORB_read.h" +#include "module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" #ifdef _OPENMP #include diff --git a/source/module_hamilt_lcao/module_gint/gint_k_pvdpr.cpp b/source/module_hamilt_lcao/module_gint/gint_k_pvdpr.cpp index b0e083a00a..a38104fb03 100644 --- a/source/module_hamilt_lcao/module_gint/gint_k_pvdpr.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_k_pvdpr.cpp @@ -1,15 +1,14 @@ -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_reduce.h" #include "gint_k.h" -#include "module_basis/module_ao/ORB_read.h" #include "grid_technique.h" -#include "module_base/ylm.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" // mohan add 2021-01-30 +#include "module_base/global_function.h" +#include "module_base/global_variable.h" #include "module_base/memory.h" +#include "module_base/parallel_reduce.h" #include "module_base/timer.h" #include "module_base/tool_threading.h" +#include "module_base/ylm.h" +#include "module_basis/module_ao/ORB_read.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" void Gint_k::allocate_pvdpR(void) { diff --git a/source/module_hamilt_lcao/module_gint/gint_k_pvpr.cpp b/source/module_hamilt_lcao/module_gint/gint_k_pvpr.cpp index 8b7f5f8ef3..8346e259d4 100644 --- a/source/module_hamilt_lcao/module_gint/gint_k_pvpr.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_k_pvpr.cpp @@ -1,16 +1,16 @@ -#include "module_base/global_function.h" -#include "module_base/global_variable.h" -#include "module_base/parallel_reduce.h" #include "gint_k.h" -#include "module_basis/module_ao/ORB_read.h" #include "grid_technique.h" -#include "module_base/ylm.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" // mohan add 2021-01-30 +#include "module_base/global_function.h" +#include "module_base/global_variable.h" +#include "module_base/libm/libm.h" #include "module_base/memory.h" +#include "module_base/parallel_reduce.h" #include "module_base/timer.h" #include "module_base/tool_threading.h" -#include "module_base/libm/libm.h" +#include "module_base/ylm.h" +#include "module_basis/module_ao/ORB_read.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" void Gint_k::allocate_pvpR(void) { diff --git a/source/module_hamilt_lcao/module_gint/gint_k_sparse.cpp b/source/module_hamilt_lcao/module_gint/gint_k_sparse.cpp index 1e57bf9801..a829126be1 100644 --- a/source/module_hamilt_lcao/module_gint/gint_k_sparse.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_k_sparse.cpp @@ -1,14 +1,14 @@ +#include "gint_k.h" +#include "grid_technique.h" #include "module_base/global_function.h" #include "module_base/global_variable.h" +#include "module_base/memory.h" #include "module_base/parallel_reduce.h" -#include "gint_k.h" -#include "module_basis/module_ao/ORB_read.h" -#include "grid_technique.h" +#include "module_base/timer.h" #include "module_base/ylm.h" +#include "module_basis/module_ao/ORB_read.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" // mohan add 2021-01-30 -#include "module_base/memory.h" -#include "module_base/timer.h" void Gint_k::distribute_pvpR_sparseMatrix( const int current_spin, diff --git a/source/module_hamilt_lcao/module_gint/gint_k_sparse1.cpp b/source/module_hamilt_lcao/module_gint/gint_k_sparse1.cpp index 1cf82c255d..f3a66da604 100644 --- a/source/module_hamilt_lcao/module_gint/gint_k_sparse1.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_k_sparse1.cpp @@ -1,14 +1,14 @@ +#include "gint_k.h" +#include "grid_technique.h" #include "module_base/global_function.h" #include "module_base/global_variable.h" +#include "module_base/memory.h" #include "module_base/parallel_reduce.h" -#include "gint_k.h" -#include "module_basis/module_ao/ORB_read.h" -#include "grid_technique.h" +#include "module_base/timer.h" #include "module_base/ylm.h" +#include "module_basis/module_ao/ORB_read.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" // mohan add 2021-01-30 -#include "module_base/memory.h" -#include "module_base/timer.h" void Gint_k::distribute_pvdpR_sparseMatrix( const int current_spin, diff --git a/source/module_hamilt_lcao/module_gint/gint_rho.cpp b/source/module_hamilt_lcao/module_gint/gint_rho.cpp index 8cab0980a0..70f38df759 100644 --- a/source/module_hamilt_lcao/module_gint/gint_rho.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_rho.cpp @@ -7,7 +7,6 @@ #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_base/blas_connector.h" #include "module_base/timer.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" // mohan add 2021-01-30 #include "gint_tools.h" void Gint::gint_kernel_rho( diff --git a/source/module_hamilt_lcao/module_gint/gint_tau.cpp b/source/module_hamilt_lcao/module_gint/gint_tau.cpp index 7bc36bcc4e..3e234473a0 100644 --- a/source/module_hamilt_lcao/module_gint/gint_tau.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_tau.cpp @@ -7,7 +7,6 @@ #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_base/blas_connector.h" #include "module_base/timer.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" // mohan add 2021-01-30 #include "gint_tools.h" void Gint::gint_kernel_tau( diff --git a/source/module_hamilt_lcao/module_gint/gint_tools.cpp b/source/module_hamilt_lcao/module_gint/gint_tools.cpp index 6be5c90cf8..ada81a0271 100644 --- a/source/module_hamilt_lcao/module_gint/gint_tools.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_tools.cpp @@ -2,12 +2,14 @@ //REFACTOR : Peize Lin, 2021.06.28 //========================================================= #include "gint_tools.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" -#include "module_base/ylm.h" -#include "module_base/timer.h" + #include +#include "module_base/timer.h" +#include "module_base/ylm.h" +#include "module_basis/module_ao/ORB_read.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" + namespace Gint_Tools { int* get_vindex( diff --git a/source/module_hamilt_lcao/module_gint/grid_bigcell.cpp b/source/module_hamilt_lcao/module_gint/grid_bigcell.cpp index 591778df12..d02a397fac 100644 --- a/source/module_hamilt_lcao/module_gint/grid_bigcell.cpp +++ b/source/module_hamilt_lcao/module_gint/grid_bigcell.cpp @@ -1,9 +1,9 @@ #include "grid_bigcell.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" // mohan add 2021-01-30 #include "module_base/memory.h" #include "module_base/timer.h" +#include "module_basis/module_ao/ORB_read.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" Grid_BigCell::Grid_BigCell() { diff --git a/source/module_hamilt_lcao/module_gint/grid_technique.cpp b/source/module_hamilt_lcao/module_gint/grid_technique.cpp index 1aed956ff9..3800963a46 100644 --- a/source/module_hamilt_lcao/module_gint/grid_technique.cpp +++ b/source/module_hamilt_lcao/module_gint/grid_technique.cpp @@ -1,10 +1,9 @@ #include "grid_technique.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_base/parallel_reduce.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" // mohan add 2021-01-30 #include "module_base/memory.h" +#include "module_base/parallel_reduce.h" #include "module_base/timer.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" Grid_Technique::Grid_Technique() { diff --git a/source/module_io/cal_r_overlap_R.cpp b/source/module_io/cal_r_overlap_R.cpp index 512dffbab6..35d7218393 100644 --- a/source/module_io/cal_r_overlap_R.cpp +++ b/source/module_io/cal_r_overlap_R.cpp @@ -1,8 +1,9 @@ #include "cal_r_overlap_R.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" + #include "module_base/parallel_reduce.h" #include "module_base/timer.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" cal_r_overlap_R::cal_r_overlap_R(){} diff --git a/source/module_io/input_conv.cpp b/source/module_io/input_conv.cpp index ca5b31ea76..ca378a2302 100644 --- a/source/module_io/input_conv.cpp +++ b/source/module_io/input_conv.cpp @@ -18,7 +18,6 @@ #include "module_basis/module_ao/ORB_read.h" #include "module_elecstate/potentials/H_TDDFT_pw.h" #include "module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" #include "module_hamilt_lcao/hamilt_lcaodft/local_orbital_charge.h" #include "module_hamilt_lcao/module_dftu/dftu.h" #include "module_hamilt_lcao/module_tddft/evolve_elec.h" diff --git a/source/module_io/to_wannier90.cpp b/source/module_io/to_wannier90.cpp index 30fafabe0b..4f81096edd 100644 --- a/source/module_io/to_wannier90.cpp +++ b/source/module_io/to_wannier90.cpp @@ -1,9 +1,6 @@ #include "to_wannier90.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#ifdef __LCAO -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" // mohan add 2021-01-30, this module should be modified -#endif #include "module_base/math_integral.h" #include "module_base/math_polyint.h" #include "module_base/math_sphbes.h" diff --git a/source/module_io/unk_overlap_lcao.cpp b/source/module_io/unk_overlap_lcao.cpp index 1dc7764a3f..09657984c0 100644 --- a/source/module_io/unk_overlap_lcao.cpp +++ b/source/module_io/unk_overlap_lcao.cpp @@ -1,9 +1,9 @@ #include "unk_overlap_lcao.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" + #include "ctime" #include "module_base/scalapack_connector.h" - +#include "module_cell/module_neighbor/sltk_grid_driver.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" unkOverlap_lcao::unkOverlap_lcao() { diff --git a/source/module_io/write_HS.cpp b/source/module_io/write_HS.cpp index 0509c89769..f5536c76a9 100644 --- a/source/module_io/write_HS.cpp +++ b/source/module_io/write_HS.cpp @@ -2,7 +2,7 @@ #include "module_base/parallel_reduce.h" #include "module_base/timer.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" void ModuleIO::saving_HS(const double *Hloc, diff --git a/source/module_io/write_HS_sparse.cpp b/source/module_io/write_HS_sparse.cpp index 821593c9c0..a70dd2772c 100644 --- a/source/module_io/write_HS_sparse.cpp +++ b/source/module_io/write_HS_sparse.cpp @@ -1,8 +1,8 @@ #include "write_HS_sparse.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" + #include "module_base/parallel_reduce.h" #include "module_base/timer.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" #include "single_R_io.h" void ModuleIO::save_HSR_sparse( diff --git a/source/module_io/write_dm_sparse.cpp b/source/module_io/write_dm_sparse.cpp index ef71512c8a..69db806d9e 100644 --- a/source/module_io/write_dm_sparse.cpp +++ b/source/module_io/write_dm_sparse.cpp @@ -1,9 +1,10 @@ #include "module_io/write_dm_sparse.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" -#include "module_base/parallel_reduce.h" + #include "module_base/blas_connector.h" +#include "module_base/parallel_reduce.h" #include "module_base/timer.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" void ModuleIO::write_dm1(const int &is, const int &istep, double** dm2d, const Parallel_Orbitals* ParaV, std::map, std::map>> &DMR_sparse) diff --git a/source/module_io/write_dos_lcao.cpp b/source/module_io/write_dos_lcao.cpp index a48cc29350..1157965a0e 100644 --- a/source/module_io/write_dos_lcao.cpp +++ b/source/module_io/write_dos_lcao.cpp @@ -10,7 +10,7 @@ #include "module_cell/module_neighbor/sltk_atom_arrange.h" //qifeng-2019-01-21 #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_gen_fixedH.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_lcao/hamilt_lcaodft/local_orbital_charge.h" #endif #include diff --git a/source/module_ri/RPA_LRI.hpp b/source/module_ri/RPA_LRI.hpp index 7941422a9e..5f806c2495 100644 --- a/source/module_ri/RPA_LRI.hpp +++ b/source/module_ri/RPA_LRI.hpp @@ -10,7 +10,6 @@ #include #include #include -// #include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" using namespace std; template void RPA_LRI::init(const MPI_Comm &mpi_comm_in, const K_Vectors &kv_in) diff --git a/source/module_ri/exx_abfs-construct_orbs.cpp b/source/module_ri/exx_abfs-construct_orbs.cpp index eab84d9430..ceec117dfd 100644 --- a/source/module_ri/exx_abfs-construct_orbs.cpp +++ b/source/module_ri/exx_abfs-construct_orbs.cpp @@ -1,13 +1,11 @@ #include "exx_abfs-construct_orbs.h" -#include "exx_abfs-pca.h" -#include "module_basis/module_ao/ORB_read.h" -#include "module_base/gram_schmidt_orth.h" +#include "exx_abfs-pca.h" #include "module_base/gram_schmidt_orth-inl.h" - -#include "module_ri/test_code/exx_abfs-construct_orbs-test.h" // Peize Lin test -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" -#include "module_hamilt_pw/hamilt_pwdft/global.h" //for ucell +#include "module_base/gram_schmidt_orth.h" +#include "module_basis/module_ao/ORB_read.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" //for ucell +#include "module_ri/test_code/exx_abfs-construct_orbs-test.h" // Peize Lin test std::vector>> Exx_Abfs::Construct_Orbs::change_orbs( const LCAO_Orbitals &orbs_in, diff --git a/source/module_ri/exx_abfs-pca.cpp b/source/module_ri/exx_abfs-pca.cpp index 520702e6be..918955a650 100644 --- a/source/module_ri/exx_abfs-pca.cpp +++ b/source/module_ri/exx_abfs-pca.cpp @@ -12,7 +12,6 @@ #include "../module_ri/test_code/element_basis_index-test.h" // Peize Lin test #include // Peize Lin test -#include "../module_hamilt_lcao/hamilt_lcaodft/global_fp.h" // Peize Lin test static inline void tensor_dsyev(const char jobz, const char uplo, RI::Tensor& a, double* w, int& info) { diff --git a/source/module_ri/exx_opt_orb.cpp b/source/module_ri/exx_opt_orb.cpp index af54e6220e..5c2f7f1df8 100644 --- a/source/module_ri/exx_opt_orb.cpp +++ b/source/module_ri/exx_opt_orb.cpp @@ -1,6 +1,5 @@ #include "exx_opt_orb.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -#include "module_hamilt_lcao/hamilt_lcaodft/global_fp.h" #include "module_basis/module_ao/ORB_atomic_lm.h" #include "exx_abfs.h" #include "exx_abfs-abfs_index.h"