Skip to content

Commit 48fb734

Browse files
committed
change ucell in pwdft/force.cpp
1 parent 5f1b128 commit 48fb734

File tree

6 files changed

+103
-94
lines changed

6 files changed

+103
-94
lines changed

source/module_esolver/esolver_ks_pw.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,8 @@ void ESolver_KS_PW<T, Device>::cal_force(UnitCell& ucell, ModuleBase::matrix& fo
619619
: reinterpret_cast<psi::Psi<std::complex<double>, Device>*>(this->kspw_psi);
620620

621621
// Calculate forces
622-
ff.cal_force(force,
622+
ff.cal_force(ucell,
623+
force,
623624
*this->pelec,
624625
this->pw_rhod,
625626
&ucell.symm,

source/module_esolver/esolver_of.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ double ESolver_OF::cal_energy()
538538
void ESolver_OF::cal_force(UnitCell& ucell, ModuleBase::matrix& force)
539539
{
540540
Forces<double> ff(ucell.nat);
541-
ff.cal_force(force, *pelec, this->pw_rho, &ucell.symm, &sf, &this->locpp);
541+
ff.cal_force(ucell,force, *pelec, this->pw_rho, &ucell.symm, &sf, &this->locpp);
542542
}
543543

544544
/**

source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,11 +868,11 @@ void Force_Stress_LCAO<T>::calForcePwPart(const UnitCell& ucell,
868868
// local pseudopotential force:
869869
// use charge density; plane wave; local pseudopotential;
870870
//--------------------------------------------------------
871-
f_pw.cal_force_loc(fvl_dvl, rhopw, nlpp.vloc, chr);
871+
f_pw.cal_force_loc(ucell,fvl_dvl, rhopw, nlpp.vloc, chr);
872872
//--------------------------------------------------------
873873
// ewald force: use plane wave only.
874874
//--------------------------------------------------------
875-
f_pw.cal_force_ew(fewalds, rhopw, &sf); // remain problem
875+
f_pw.cal_force_ew(ucell,fewalds, rhopw, &sf); // remain problem
876876

877877
//--------------------------------------------------------
878878
// force due to core correlation.

0 commit comments

Comments
 (0)