Skip to content

Commit fa71000

Browse files
committed
remove useless code
1 parent b3c252b commit fa71000

File tree

2 files changed

+0
-50
lines changed

2 files changed

+0
-50
lines changed

source/module_esolver/esolver_ks_pw.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -368,27 +368,6 @@ void ESolver_KS_PW<T, Device>::hamilt2density_single(const int istep, const int
368368
}
369369
bool skip_charge = PARAM.inp.calculation == "nscf" ? true : false;
370370

371-
//---------------------------------------------------------------------------------------------------------------
372-
//---------------------------------for psi init guess!!!!--------------------------------------------------------
373-
//---------------------------------------------------------------------------------------------------------------
374-
// if (!PARAM.inp.psi_initializer && PARAM.inp.basis_type == "pw" && this->already_initpsi == false)
375-
// {
376-
// for (int ik = 0; ik < this->pw_wfc->nks; ++ik)
377-
// {
378-
// //! Update Hamiltonian from other kpoint to the given one
379-
// this->p_hamilt->updateHk(ik);
380-
381-
// //! Fix the wavefunction to initialize at given kpoint
382-
// this->kspw_psi->fix_k(ik);
383-
384-
// /// for psi init guess!!!!
385-
// hamilt::diago_PAO_in_pw_k2(this->ctx, ik, *(this->kspw_psi), this->pw_wfc, &this->wf, this->p_hamilt);
386-
// }
387-
// }
388-
//---------------------------------------------------------------------------------------------------------------
389-
//---------------------------------END: for psi init guess!!!!--------------------------------------------------------
390-
//---------------------------------------------------------------------------------------------------------------
391-
392371
hsolver::HSolverPW<T, Device> hsolver_pw_obj(this->pw_wfc,
393372
PARAM.inp.calculation,
394373
PARAM.inp.basis_type,
@@ -409,8 +388,6 @@ void ESolver_KS_PW<T, Device>::hamilt2density_single(const int istep, const int
409388
GlobalV::NPROC_IN_POOL,
410389
skip_charge);
411390

412-
// this->already_initpsi = true;
413-
414391
Symmetry_rho srho;
415392
for (int is = 0; is < PARAM.inp.nspin; is++)
416393
{

source/module_esolver/esolver_sdft_pw.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -190,32 +190,6 @@ void ESolver_SDFT_PW<T, Device>::hamilt2density_single(int istep, int iter, doub
190190
hsolver::DiagoIterAssist<T, Device>::PW_DIAG_THR = ethr;
191191
hsolver::DiagoIterAssist<T, Device>::PW_DIAG_NMAX = PARAM.inp.pw_diag_nmax;
192192

193-
//---------------------------------------------------------------------------------------------------------------
194-
//---------------------------------for psi init guess!!!!--------------------------------------------------------
195-
//---------------------------------------------------------------------------------------------------------------
196-
// if (!PARAM.inp.psi_initializer && PARAM.inp.basis_type == "pw" && this->already_initpsi == false)
197-
// {
198-
// for (int ik = 0; ik < this->pw_wfc->nks; ++ik)
199-
// {
200-
// //! Update Hamiltonian from other kpoint to the given one
201-
// this->p_hamilt->updateHk(ik);
202-
203-
// if (this->kspw_psi->get_nbands() > 0 && GlobalV::MY_STOGROUP == 0)
204-
// {
205-
// //! Fix the wavefunction to initialize at given kpoint
206-
// this->kspw_psi->fix_k(ik);
207-
208-
// /// for psi init guess!!!!
209-
// hamilt::diago_PAO_in_pw_k2(this->ctx, ik, *(this->kspw_psi), this->pw_wfc, &this->wf, this->p_hamilt);
210-
// }
211-
212-
// }
213-
// }
214-
//---------------------------------------------------------------------------------------------------------------
215-
//---------------------------------END: for psi init guess!!!!--------------------------------------------------------
216-
//---------------------------------------------------------------------------------------------------------------
217-
218-
219193
// hsolver only exists in this function
220194
hsolver::HSolverPW_SDFT<T, Device> hsolver_pw_sdft_obj(&this->kv,
221195
this->pw_wfc,
@@ -242,7 +216,6 @@ void ESolver_SDFT_PW<T, Device>::hamilt2density_single(int istep, int iter, doub
242216
istep,
243217
iter,
244218
skip_charge);
245-
// this->already_initpsi = true;
246219

247220
// set_diagethr need it
248221
this->esolver_KS_ne = hsolver_pw_sdft_obj.stoiter.KS_ne;

0 commit comments

Comments
 (0)