diff --git a/source/module_hsolver/hsolver_pw_sdft.cpp b/source/module_hsolver/hsolver_pw_sdft.cpp index 2eec4fa6ca..34a17de4f7 100644 --- a/source/module_hsolver/hsolver_pw_sdft.cpp +++ b/source/module_hsolver/hsolver_pw_sdft.cpp @@ -28,30 +28,6 @@ void HSolverPW_SDFT::solve(hamilt::Hamilt* pHamilt, const int nbands = psi.get_nbands(); const int nks = psi.get_nk(); - //--------------------------------------------------------------------------------------------------------------- - //---------------------------------for psi init guess!!!!-------------------------------------------------------- - //--------------------------------------------------------------------------------------------------------------- - // if (!PARAM.inp.psi_initializer && !this->initialed_psi && this->basis_type == "pw") - // { - // for (int ik = 0; ik < nks; ++ik) - // { - // /// update H(k) for each k point - // pHamilt->updateHk(ik); - - // if (nbands > 0 && GlobalV::MY_STOGROUP == 0) - // { - // /// update psi pointer for each k point - // psi.fix_k(ik); - - // /// for psi init guess!!!! - // hamilt::diago_PAO_in_pw_k2(this->ctx, ik, psi, this->wfc_basis, this->pwf, pHamilt); - // } - // } - // } - //--------------------------------------------------------------------------------------------------------------- - //--------------------------------------------------------------------------------------------------------------- - //--------------------------------------------------------------------------------------------------------------- - // prepare for the precondition of diagonalization std::vector precondition(psi.get_nbasis(), 0.0); diff --git a/source/module_psi/psi_init.cpp b/source/module_psi/psi_init.cpp index 419a396cdf..d95f695a94 100644 --- a/source/module_psi/psi_init.cpp +++ b/source/module_psi/psi_init.cpp @@ -81,8 +81,12 @@ void PSIInit::prepare_init(Structure_Factor* p_sf, this->psi_init->initialize(p_sf, pw_wfc, p_ucell, random_seed, p_ppcell); #endif + + // always new->initialize->tabulate->allocate->proj_ao_onkG - this->psi_init->tabulate(); + // this->psi_init->tabulate(); + + ModuleBase::timer::tick("PSIInit", "prepare_init"); } @@ -138,7 +142,10 @@ void PSIInit::make_table(const int nks, Structure_Factor* p_sf) { if (this->use_psiinitializer) { - } // do not need to do anything because the interpolate table is unchanged + // do not need to do anything because the interpolate table is unchanged + // what ??? + this->psi_init->tabulate(); + } else // old initialization method, used in EXX calculation { this->wf_old.init_after_vc(nks); // reallocate wanf2, the planewave expansion of lcao diff --git a/source/module_psi/wf_atomic.cpp b/source/module_psi/wf_atomic.cpp index 484fc3b847..f247dd8a35 100644 --- a/source/module_psi/wf_atomic.cpp +++ b/source/module_psi/wf_atomic.cpp @@ -91,9 +91,11 @@ void WF_atomic::init_at_1(Structure_Factor *sf_in) int nmesh; if(PARAM.inp.pseudo_mesh) { nmesh = atom->ncpp.mesh; - } else { + } + else + { nmesh = atom->ncpp.msh; -} + } // check the unit condition double *inner_part = new double[nmesh];