Skip to content

Commit b6beea2

Browse files
committed
Refactor: remove global variable GlobalC::exx_info.info_ri.abfs_Lmax
1 parent e25e2bd commit b6beea2

File tree

4 files changed

+3
-8
lines changed

4 files changed

+3
-8
lines changed

source/source_hamilt/module_xc/exx_info.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ struct Exx_Info
6969
double kmesh_times = 4;
7070
double Cs_inv_thr = -1;
7171

72-
int abfs_Lmax = 0; // tmp
73-
7472
Exx_Info_RI(const Exx_Info::Exx_Info_Global& info_global)
7573
: coulomb_param(info_global.coulomb_param)
7674
{
@@ -80,7 +78,7 @@ struct Exx_Info
8078

8179
struct Exx_Info_Opt_ABFs
8280
{
83-
int abfs_Lmax = 0; // tmp
81+
int abfs_Lmax = 0;
8482
double ecut_exx = 60;
8583
double tolerence = 1E-12;
8684
std::vector<std::string> files_jles;

source/source_lcao/module_ri/Exx_LRI.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ void Exx_LRI<Tdata>::init(const MPI_Comm &mpi_comm_in,
5050
Exx_Abfs::Construct_Orbs::filter_empty_orbs(this->abfs);
5151
Exx_Abfs::Construct_Orbs::print_orbs_size(ucell, this->abfs, GlobalV::ofs_running);
5252

53-
for( size_t T=0; T!=this->abfs.size(); ++T )
54-
{ GlobalC::exx_info.info_ri.abfs_Lmax = std::max( GlobalC::exx_info.info_ri.abfs_Lmax, static_cast<int>(this->abfs[T].size())-1 ); }
55-
5653
this->coulomb_settings = RI_Util::update_coulomb_settings(this->info.coulomb_param, ucell, this->p_kv);
5754

5855
std::shared_ptr<ORB_gaunt_table> MGT = std::make_shared<ORB_gaunt_table>();

source/source_lcao/module_ri/Exx_LRI_interface.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void Exx_LRI_Interface<T, Tdata>::exx_before_all_runners(
111111
this->symrot_.find_irreducible_sector(
112112
ucell.symm, ucell.atoms, ucell.st,
113113
RI_Util::get_Born_von_Karmen_cells(period), period, ucell.lat);
114-
this->symrot_.set_abfs_Lmax(GlobalC::exx_info.info_ri.abfs_Lmax);
114+
this->symrot_.set_abfs_Lmax(Exx_Abfs::get_Lmax(this->exx_ptr->abfs));
115115
this->symrot_.cal_Ms(kv, ucell, pv);
116116
}
117117
}

source/source_lcao/module_ri/RPA_LRI.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void RPA_LRI<T, Tdata>::cal_postSCF_exx(const elecstate::DensityMatrix<T, Tdata>
9595
symrot.find_irreducible_sector(ucell.symm, ucell.atoms, ucell.st,
9696
Rs, period, ucell.lat);
9797
// set Lmax of the rotation matrices to max(l_ao, l_abf), to support rotation under ABF
98-
symrot.set_abfs_Lmax(GlobalC::exx_info.info_ri.abfs_Lmax);
98+
symrot.set_abfs_Lmax(Exx_Abfs::get_Lmax(exx_lri_rpa.abfs));
9999
symrot.cal_Ms(kv, ucell, *dm.get_paraV_pointer());
100100
// output Ts (symrot_R.txt) and Ms (symrot_k.txt)
101101
ModuleSymmetry::print_symrot_info_R(symrot, ucell.symm, ucell.lmax, Rs);

0 commit comments

Comments
 (0)