Skip to content

Commit 5b32de9

Browse files
committed
eliminate exd and exc from ctrl_iter_lcao input parameters
1 parent c7c8976 commit 5b32de9

File tree

4 files changed

+10
-31
lines changed

4 files changed

+10
-31
lines changed

source/source_esolver/esolver_ks_lcao.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -609,11 +609,7 @@ void ESolver_KS_LCAO<TK, TR>::iter_finish(UnitCell& ucell, const int istep, int&
609609
#ifdef __MLALGO
610610
this->ld,
611611
#endif
612-
#ifdef __EXX
613-
*this->exx_nao.exd,
614-
*this->exx_nao.exc,
615-
#endif
616-
iter, istep, conv_esolver, this->scf_ene_thr);
612+
exx_nao, iter, istep, conv_esolver, this->scf_ene_thr);
617613

618614
}
619615

source/source_io/ctrl_iter_lcao.cpp

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ void ctrl_iter_lcao(UnitCell& ucell, // unit cell *
2424
#ifdef __MLALGO
2525
LCAO_Deepks<TK>& ld,
2626
#endif
27-
#ifdef __EXX
28-
Exx_LRI_Interface<TK, double>& exd,
29-
Exx_LRI_Interface<TK, std::complex<double>>& exc,
30-
#endif
27+
Exx_NAO<TK> &exx_nao,
3128
int &iter,
3229
const int istep,
3330
bool &conv_esolver,
@@ -53,14 +50,15 @@ void ctrl_iter_lcao(UnitCell& ucell, // unit cell *
5350
if (GlobalC::exx_info.info_global.cal_exx)
5451
{
5552
GlobalC::exx_info.info_ri.real_number ?
56-
exd.exx_iter_finish(kv, ucell, *p_hamilt, *pelec,
53+
exx_nao.exd->exx_iter_finish(kv, ucell, *p_hamilt, *pelec,
5754
*p_chgmix, scf_ene_thr, iter, istep, conv_esolver) :
58-
exc.exx_iter_finish(kv, ucell, *p_hamilt, *pelec,
55+
exx_nao.exc->exx_iter_finish(kv, ucell, *p_hamilt, *pelec,
5956
*p_chgmix, scf_ene_thr, iter, istep, conv_esolver);
6057
}
6158
}
6259
#endif
6360

61+
6462
// for deepks, output labels during electronic steps (after conv_esolver is renewed)
6563
#ifdef __MLALGO
6664
if (inp.deepks_out_labels >0 && inp.deepks_out_freq_elec)
@@ -96,10 +94,7 @@ template void ctrl_iter_lcao<double, double>(UnitCell& ucell, // unit cell *
9694
#ifdef __MLALGO
9795
LCAO_Deepks<double>& ld,
9896
#endif
99-
#ifdef __EXX
100-
Exx_LRI_Interface<double, double>& exd,
101-
Exx_LRI_Interface<double, std::complex<double>>& exc,
102-
#endif
97+
Exx_NAO<double> &exx_nao,
10398
int &iter,
10499
const int istep,
105100
bool &conv_esolver,
@@ -120,10 +115,7 @@ template void ctrl_iter_lcao<std::complex<double>, double>(UnitCell& ucell, // u
120115
#ifdef __MLALGO
121116
LCAO_Deepks<std::complex<double>>& ld,
122117
#endif
123-
#ifdef __EXX
124-
Exx_LRI_Interface<std::complex<double>, double>& exd,
125-
Exx_LRI_Interface<std::complex<double>, std::complex<double>>& exc,
126-
#endif
118+
Exx_NAO<std::complex<double>> &exx_nao,
127119
int &iter,
128120
const int istep,
129121
bool &conv_esolver,
@@ -144,10 +136,7 @@ template void ctrl_iter_lcao<std::complex<double>, std::complex<double>>(UnitCel
144136
#ifdef __MLALGO
145137
LCAO_Deepks<std::complex<double>>& ld,
146138
#endif
147-
#ifdef __EXX
148-
Exx_LRI_Interface<std::complex<double>, double>& exd,
149-
Exx_LRI_Interface<std::complex<double>, std::complex<double>>& exc,
150-
#endif
139+
Exx_NAO<std::complex<double>> &exx_nao,
151140
int &iter,
152141
const int istep,
153142
bool &conv_esolver,

source/source_io/ctrl_iter_lcao.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
#include "source_estate/module_charge/charge.h" // use charge
99
#include "source_estate/module_charge/charge_mixing.h" // use charge mixing
1010
#include "source_lcao/hamilt_lcao.h" // use hamilt::HamiltLCAO<TK, TR>
11-
#ifdef __EXX
12-
#include "source_lcao/module_ri/Exx_LRI_interface.h" // use EXX codes
13-
#endif
11+
#include "source_lcao/setup_exx.h" // mohan add 20251008
1412

1513
namespace ModuleIO
1614
{
@@ -30,10 +28,7 @@ void ctrl_iter_lcao(UnitCell& ucell, // unit cell *
3028
#ifdef __MLALGO
3129
LCAO_Deepks<TK>& ld,
3230
#endif
33-
#ifdef __EXX
34-
Exx_LRI_Interface<TK, double>& exd,
35-
Exx_LRI_Interface<TK, std::complex<double>>& exc,
36-
#endif
31+
Exx_NAO<TK> &exx_nao,
3732
int &iter,
3833
const int istep,
3934
bool &conv_esolver,

source/source_lcao/setup_exx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class Exx_NAO
3535
const Parallel_Orbitals &pv, // parallel orbitals
3636
const Input_para& inp);
3737

38-
3938
};
4039

4140

0 commit comments

Comments
 (0)