Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions source/module_hsolver/hsolver_pw_sdft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,6 @@ void HSolverPW_SDFT<T, Device>::solve(hamilt::Hamilt<T, Device>* 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<double> precondition(psi.get_nbasis(), 0.0);

Expand Down
11 changes: 9 additions & 2 deletions source/module_psi/psi_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@ void PSIInit<T, Device>::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");
}

Expand Down Expand Up @@ -138,7 +142,10 @@ void PSIInit<T, Device>::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
Expand Down
6 changes: 4 additions & 2 deletions source/module_psi/wf_atomic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Loading