77namespace ModuleDFTU
88{
99
10- void DFTU::cal_eff_pot_mat_complex (const int ik, std::complex <double >* eff_pot, const std::vector<int >& isk, const std::complex <double >* sk)
10+ void DFTU::cal_eff_pot_mat_complex (const int ik,
11+ const UnitCell& ucell,
12+ std::complex <double >* eff_pot,
13+ const std::vector<int >& isk,
14+ const std::complex <double >* sk)
1115{
1216 ModuleBase::TITLE (" DFTU" , " cal_eff_pot_mat" );
1317 ModuleBase::timer::tick (" DFTU" , " cal_eff_pot_mat" );
@@ -31,7 +35,7 @@ void DFTU::cal_eff_pot_mat_complex(const int ik, std::complex<double>* eff_pot,
3135 const std::complex <double > zero = 0.0 ;
3236
3337 std::vector<std::complex <double >> VU (this ->paraV ->nloc );
34- this ->cal_VU_pot_mat_complex (spin, true , &VU[0 ]);
38+ this ->cal_VU_pot_mat_complex (spin, true , ucell, &VU[0 ]);
3539
3640#ifdef __MPI
3741 pzgemm_ (&transN, &transN,
@@ -58,7 +62,11 @@ void DFTU::cal_eff_pot_mat_complex(const int ik, std::complex<double>* eff_pot,
5862 return ;
5963}
6064
61- void DFTU::cal_eff_pot_mat_real (const int ik, double * eff_pot, const std::vector<int >& isk, const double * sk)
65+ void DFTU::cal_eff_pot_mat_real (const int ik,
66+ const UnitCell& ucell,
67+ double * eff_pot,
68+ const std::vector<int >& isk,
69+ const double * sk)
6270{
6371 ModuleBase::TITLE (" DFTU" , " cal_eff_pot_mat" );
6472 ModuleBase::timer::tick (" DFTU" , " cal_eff_pot_mat" );
@@ -80,7 +88,7 @@ void DFTU::cal_eff_pot_mat_real(const int ik, double* eff_pot, const std::vector
8088 double alpha = 1.0 , beta = 0.0 , half = 0.5 , one = 1.0 ;
8189
8290 std::vector<double > VU (this ->paraV ->nloc );
83- this ->cal_VU_pot_mat_real (spin, 1 , &VU[0 ]);
91+ this ->cal_VU_pot_mat_real (spin, 1 , ucell, &VU[0 ]);
8492
8593#ifdef __MPI
8694 pdgemm_ (&transN, &transN,
@@ -107,14 +115,14 @@ void DFTU::cal_eff_pot_mat_real(const int ik, double* eff_pot, const std::vector
107115 return ;
108116}
109117
110- void DFTU::cal_eff_pot_mat_R_double (const int ispin, double * SR, double * HR)
118+ void DFTU::cal_eff_pot_mat_R_double (const int ispin, const UnitCell& ucell, double * SR, double * HR)
111119{
112120 const char transN = ' N' , transT = ' T' ;
113121 const int one_int = 1 ;
114122 const double alpha = 1.0 , beta = 0.0 , one = 1.0 , half = 0.5 ;
115123
116124 std::vector<double > VU (this ->paraV ->nloc );
117- this ->cal_VU_pot_mat_real (ispin, 1 , &VU[0 ]);
125+ this ->cal_VU_pot_mat_real (ispin, 1 , ucell, &VU[0 ]);
118126
119127#ifdef __MPI
120128 pdgemm_ (&transN, &transN,
@@ -137,14 +145,14 @@ void DFTU::cal_eff_pot_mat_R_double(const int ispin, double* SR, double* HR)
137145 return ;
138146}
139147
140- void DFTU::cal_eff_pot_mat_R_complex_double (const int ispin, std::complex <double >* SR, std::complex <double >* HR)
148+ void DFTU::cal_eff_pot_mat_R_complex_double (const int ispin, const UnitCell& ucell, std::complex <double >* SR, std::complex <double >* HR)
141149{
142150 const char transN = ' N' , transT = ' T' ;
143151 const int one_int = 1 ;
144152 const std::complex <double > zero = 0.0 , one = 1.0 , half = 0.5 ;
145153
146154 std::vector<std::complex <double >> VU (this ->paraV ->nloc );
147- this ->cal_VU_pot_mat_complex (ispin, 1 , &VU[0 ]);
155+ this ->cal_VU_pot_mat_complex (ispin, 1 , ucell, &VU[0 ]);
148156
149157#ifdef __MPI
150158 pzgemm_ (&transN, &transN,
0 commit comments