77#include " source_pw/module_pwdft/VSep_in_pw.h"
88
99template <typename T, typename Device>
10- void setup_pot (const int istep,
10+ void pw:: setup_pot (const int istep,
1111 UnitCell& ucell, // unitcell
1212 const K_Vectors &kv, // kpoints
1313 Structure_Factor &sf, // structure factors
@@ -18,7 +18,8 @@ void setup_pot(const int istep,
1818 pseudopot_cell_vnl &ppcell, // non-local pseudopotentials
1919 VSep* vsep_cell, // U-1/2 method
2020 psi::Psi<T, Device>* kspw_psi, // electronic wave functions
21- const ModulePW::PW_Basis_K *pw_wfc, // pw for wfc
21+ hamilt::Hamilt<T, Device>* p_hamilt, // hamiltonian
22+ ModulePW::PW_Basis_K *pw_wfc, // pw for wfc
2223 const ModulePW::PW_Basis *pw_rhod, // pw for rhod
2324 const Input_para& inp) // input parameters
2425{
@@ -28,7 +29,7 @@ void setup_pot(const int istep,
2829 pelec->init_scf (istep,
2930 ucell,
3031 para_grid,
31- sf,
32+ sf. strucFac ,
3233 locpp.numeric ,
3334 ucell.symm ,
3435 (void *)pw_wfc);
@@ -66,14 +67,14 @@ void setup_pot(const int istep,
6667 onsite_p->init (PARAM.inp .orbital_dir ,
6768 &ucell,
6869 *(kspw_psi),
69- this -> kv ,
70+ kv,
7071 *(pw_wfc),
71- this -> sf ,
72+ sf,
7273 PARAM.inp .onsite_radius ,
7374 PARAM.globalv .nqx ,
7475 PARAM.globalv .dq ,
75- this -> pelec ->wg ,
76- this -> pelec ->ekb );
76+ pelec->wg ,
77+ pelec->ekb );
7778 }
7879
7980 // ----------------------------------------------------------
@@ -92,11 +93,11 @@ void setup_pot(const int istep,
9293 ucell,
9394 nullptr ,
9495 PARAM.inp .nspin ,
95- this -> kv ,
96- this -> p_hamilt ,
97- this -> kspw_psi ,
98- this -> pelec ,
99- this -> pw_wfc );
96+ kv,
97+ p_hamilt,
98+ kspw_psi,
99+ pelec,
100+ pw_wfc);
100101 }
101102
102103 // ----------------------------------------------------------
@@ -105,7 +106,7 @@ void setup_pot(const int istep,
105106 if (PARAM.inp .dft_plus_u )
106107 {
107108 auto * dftu = ModuleDFTU::DFTU::get_instance ();
108- dftu->init (ucell, nullptr , this -> kv .get_nks ());
109+ dftu->init (ucell, nullptr , kv.get_nks ());
109110 }
110111
111112 // ----------------------------------------------------------
@@ -114,13 +115,13 @@ void setup_pot(const int istep,
114115 // ----------------------------------------------------------
115116 if (PARAM.inp .dfthalf_type > 0 )
116117 {
117- this -> vsep_cell ->generate_vsep_r (this -> pw_rhod [0 ], this -> sf .strucFac , ucell.sep_cell );
118+ vsep_cell->generate_vsep_r (pw_rhod[0 ], sf.strucFac , ucell.sep_cell );
118119 }
119120
120121 return ;
121122}
122123
123- template void setup_pot<std::complex <float >, base_device::DEVICE_CPU>(
124+ template void pw:: setup_pot<std::complex <float >, base_device::DEVICE_CPU>(
124125 const int istep, // ionic step
125126 UnitCell& ucell, // unitcell
126127 const K_Vectors &kv, // kpoints
@@ -131,13 +132,14 @@ template void setup_pot<std::complex<float>, base_device::DEVICE_CPU>(
131132 pseudopot_cell_vl &locpp, // local pseudopotentials
132133 pseudopot_cell_vnl &ppcell, // non-local pseudopotentials
133134 VSep* vsep_cell, // U-1/2 method
134- psi::Psi<std::complex <float >, base_devcie::DEVICE_CPU>* kspw_psi, // electronic wave functions
135- const ModulePW::PW_Basis_K *pw_wfc, // pw for wfc
135+ psi::Psi<std::complex <float >, base_device::DEVICE_CPU>* kspw_psi, // electronic wave functions
136+ hamilt::Hamilt<std::complex <float >, base_device::DEVICE_CPU>* p_hamilt, // hamiltonian
137+ ModulePW::PW_Basis_K *pw_wfc, // pw for wfc
136138 const ModulePW::PW_Basis *pw_rhod, // pw for rhod
137139 const Input_para& inp); // input parameters
138140
139141
140- template void setup_pot<std::complex <double >, base_device::DEVICE_CPU>(
142+ template void pw:: setup_pot<std::complex <double >, base_device::DEVICE_CPU>(
141143 const int istep, // ionic step
142144 UnitCell& ucell, // unitcell
143145 const K_Vectors &kv, // kpoints
@@ -148,7 +150,8 @@ template void setup_pot<std::complex<double>, base_device::DEVICE_CPU>(
148150 pseudopot_cell_vl &locpp, // local pseudopotentials
149151 pseudopot_cell_vnl &ppcell, // non-local pseudopotentials
150152 VSep* vsep_cell, // U-1/2 method
151- psi::Psi<std::complex <double >, base_devcie::DEVICE_CPU>* kspw_psi, // electronic wave functions
152- const ModulePW::PW_Basis_K *pw_wfc, // pw for wfc
153+ psi::Psi<std::complex <double >, base_device::DEVICE_CPU>* kspw_psi, // electronic wave functions
154+ hamilt::Hamilt<std::complex <double >, base_device::DEVICE_CPU>* p_hamilt, // hamiltonian
155+ ModulePW::PW_Basis_K *pw_wfc, // pw for wfc
153156 const ModulePW::PW_Basis *pw_rhod, // pw for rhod
154157 const Input_para& inp); // input parameters
0 commit comments