Skip to content

Commit

Permalink
Fix: bug of cal_ux (#5165)
Browse files Browse the repository at this point in the history
* Fix bug of cal_ux

* update results
  • Loading branch information
Qianruipku authored Sep 24, 2024
1 parent ca5cc95 commit fb5beba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/module_esolver/esolver_ks_pw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ void ESolver_KS_PW<T, Device>::before_scf(const int istep)

//! cal_ux should be called before init_scf because
//! the direction of ux is used in noncoline_rho
if (PARAM.inp.nspin == 4 && PARAM.globalv.domag)
if (PARAM.inp.nspin == 4)
{
GlobalC::ucell.cal_ux();
}
Expand Down
2 changes: 1 addition & 1 deletion source/module_esolver/lcao_before_scf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void ESolver_KS_LCAO<TK, TR>::beforesolver(const int istep)
// cal_ux should be called before init_scf because
// the direction of ux is used in noncoline_rho
//=========================================================
if (PARAM.inp.nspin == 4 && PARAM.globalv.domag)
if (PARAM.inp.nspin == 4)
{
GlobalC::ucell.cal_ux();
}
Expand Down
6 changes: 3 additions & 3 deletions tests/integrate/140_PW_15_SO/result.ref
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
etotref -1668.616835067548
etotperatomref -834.3084175338
totaltimeref 6.35
etotref -1668.616833271131
etotperatomref -834.3084166356
totaltimeref 5.15

0 comments on commit fb5beba

Please sign in to comment.