Skip to content

Commit

Permalink
update esolver
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanchen committed Jul 28, 2024
1 parent 876e20c commit 5dc5125
Showing 1 changed file with 0 additions and 76 deletions.
76 changes: 0 additions & 76 deletions source/module_esolver/esolver_ks_lcao_elec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,82 +37,6 @@
namespace ModuleESolver
{

template <typename TK, typename TR>
void ESolver_KS_LCAO<TK, TR>::set_matrix_grid(Record_adj& ra)
{
ModuleBase::TITLE("ESolver_KS_LCAO", "set_matrix_grid");
ModuleBase::timer::tick("ESolver_KS_LCAO", "set_matrix_grid");

// (1) Find adjacent atoms for each atom.
GlobalV::SEARCH_RADIUS = atom_arrange::set_sr_NL(GlobalV::ofs_running,
GlobalV::OUT_LEVEL,
GlobalC::ORB.get_rcutmax_Phi(),
GlobalC::ucell.infoNL.get_rcutmax_Beta(),
GlobalV::GAMMA_ONLY_LOCAL);

atom_arrange::search(PARAM.inp.search_pbc,
GlobalV::ofs_running,
GlobalC::GridD,
GlobalC::ucell,
GlobalV::SEARCH_RADIUS,
GlobalV::test_atom_input);

// ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running,"SEARCH ADJACENT
// ATOMS");

// (3) Periodic condition search for each grid.
double dr_uniform = 0.001;
std::vector<double> rcuts;
std::vector<std::vector<double>> psi_u;
std::vector<std::vector<double>> dpsi_u;
std::vector<std::vector<double>> d2psi_u;

Gint_Tools::init_orb(dr_uniform, rcuts, GlobalC::ucell, psi_u, dpsi_u, d2psi_u);

this->GridT.set_pbc_grid(this->pw_rho->nx,
this->pw_rho->ny,
this->pw_rho->nz,
this->pw_big->bx,
this->pw_big->by,
this->pw_big->bz,
this->pw_big->nbx,
this->pw_big->nby,
this->pw_big->nbz,
this->pw_big->nbxx,
this->pw_big->nbzp_start,
this->pw_big->nbzp,
this->pw_rho->ny,
this->pw_rho->nplane,
this->pw_rho->startz_current,
GlobalC::ucell,
dr_uniform,
rcuts,
psi_u,
dpsi_u,
d2psi_u,
PARAM.inp.nstream);
psi_u.clear();
psi_u.shrink_to_fit();
dpsi_u.clear();
dpsi_u.shrink_to_fit();
d2psi_u.clear();
d2psi_u.shrink_to_fit();
// (2)For each atom, calculate the adjacent atoms in different cells
// and allocate the space for H(R) and S(R).
// If k point is used here, allocate HlocR after atom_arrange.
Parallel_Orbitals* pv = &this->ParaV;
ra.for_2d(*pv, GlobalV::GAMMA_ONLY_LOCAL);
if (!GlobalV::GAMMA_ONLY_LOCAL)
{
// need to first calculae lgd.
// using GridT.init.
this->GridT.cal_nnrg(pv);
}

ModuleBase::timer::tick("ESolver_KS_LCAO", "set_matrix_grid");
return;
}

template <typename TK, typename TR>
void ESolver_KS_LCAO<TK, TR>::beforesolver(const int istep)
{
Expand Down

0 comments on commit 5dc5125

Please sign in to comment.