Skip to content
Merged
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
8 changes: 5 additions & 3 deletions source/module_esolver/esolver_gets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,15 @@ void ESolver_GetS::runner(UnitCell& ucell, const int istep)
PARAM.inp.test_atom_input);

Record_adj RA;
RA.for_2d(this->pv, PARAM.globalv.gamma_only_local, orb_.cutoffs());
RA.for_2d(ucell,this->pv, PARAM.globalv.gamma_only_local, orb_.cutoffs());

if (this->p_hamilt == nullptr)
{
if (PARAM.inp.nspin == 4)
{
this->p_hamilt
= new hamilt::HamiltLCAO<std::complex<double>, std::complex<double>>(&this->pv,
= new hamilt::HamiltLCAO<std::complex<double>, std::complex<double>>(ucell,
&this->pv,
this->kv,
*(two_center_bundle_.overlap_orb),
orb_.cutoffs());
Expand All @@ -117,7 +118,8 @@ void ESolver_GetS::runner(UnitCell& ucell, const int istep)
}
else
{
this->p_hamilt = new hamilt::HamiltLCAO<std::complex<double>, double>(&this->pv,
this->p_hamilt = new hamilt::HamiltLCAO<std::complex<double>, double>(ucell,
&this->pv,
this->kv,
*(two_center_bundle_.overlap_orb),
orb_.cutoffs());
Expand Down
3 changes: 2 additions & 1 deletion source/module_esolver/esolver_ks_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(UnitCell& ucell, const Input_pa
// 5) initialize Hamilt in LCAO
// * allocate H and S matrices according to computational resources
// * set the 'trace' between local H/S and global H/S
LCAO_domain::divide_HS_in_frag(PARAM.globalv.gamma_only_local, pv, this->kv.get_nks(), orb_);
LCAO_domain::divide_HS_in_frag(PARAM.globalv.gamma_only_local, ucell , pv, this->kv.get_nks(), orb_);

#ifdef __EXX
// 6) initialize exx
Expand Down Expand Up @@ -294,6 +294,7 @@ void ESolver_KS_LCAO<TK, TR>::cal_force(UnitCell& ucell, ModuleBase::matrix& for
PARAM.inp.cal_stress,
PARAM.inp.test_force,
PARAM.inp.test_stress,
ucell,
this->pv,
this->pelec,
this->psi,
Expand Down
5 changes: 3 additions & 2 deletions source/module_esolver/lcao_before_scf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(UnitCell& ucell, const int istep)
// (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.
this->RA.for_2d(this->pv, PARAM.globalv.gamma_only_local, orb_.cutoffs());
this->RA.for_2d(ucell,this->pv, PARAM.globalv.gamma_only_local, orb_.cutoffs());

// 2. density matrix extrapolation

Expand Down Expand Up @@ -174,7 +174,7 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(UnitCell& ucell, const int istep)
}

// prepare grid in Gint
LCAO_domain::grid_prepare(this->GridT, this->GG, this->GK, orb_, *this->pw_rho, *this->pw_big);
LCAO_domain::grid_prepare(this->GridT, this->GG, this->GK, ucell, orb_, *this->pw_rho, *this->pw_big);

// init Hamiltonian
if (this->p_hamilt != nullptr)
Expand All @@ -188,6 +188,7 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(UnitCell& ucell, const int istep)
this->p_hamilt = new hamilt::HamiltLCAO<TK, TR>(
PARAM.globalv.gamma_only_local ? &(this->GG) : nullptr,
PARAM.globalv.gamma_only_local ? nullptr : &(this->GK),
ucell,
&this->pv,
this->pelec->pot,
this->kv,
Expand Down
5 changes: 3 additions & 2 deletions source/module_esolver/lcao_others.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
// (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.
this->RA.for_2d(this->pv, PARAM.globalv.gamma_only_local, orb_.cutoffs());
this->RA.for_2d(ucell,this->pv, PARAM.globalv.gamma_only_local, orb_.cutoffs());

// 2. density matrix extrapolation

Expand Down Expand Up @@ -175,7 +175,7 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
}

// prepare grid in Gint
LCAO_domain::grid_prepare(this->GridT, this->GG, this->GK, orb_, *this->pw_rho, *this->pw_big);
LCAO_domain::grid_prepare(this->GridT, this->GG, this->GK, ucell,orb_, *this->pw_rho, *this->pw_big);

// init Hamiltonian
if (this->p_hamilt != nullptr)
Expand All @@ -189,6 +189,7 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep)
this->p_hamilt = new hamilt::HamiltLCAO<TK, TR>(
PARAM.globalv.gamma_only_local ? &(this->GG) : nullptr,
PARAM.globalv.gamma_only_local ? nullptr : &(this->GK),
ucell,
&this->pv,
this->pelec->pot,
this->kv,
Expand Down
3 changes: 2 additions & 1 deletion source/module_hamilt_lcao/hamilt_lcaodft/FORCE.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ class Force_LCAO
Record_adj* ra = nullptr);

// get the ds, dt, dvnl.
void allocate(const Parallel_Orbitals& pv,
void allocate(const UnitCell& ucell,
const Parallel_Orbitals& pv,
ForceStressArrays& fsr, // mohan add 2024-06-15
const TwoCenterBundle& two_center_bundle,
const LCAO_Orbitals& orb,
Expand Down
Loading
Loading