Skip to content

Commit 559c0a4

Browse files
committed
update +U
1 parent aea6568 commit 559c0a4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

source/source_lcao/module_operator_lcao/dftu_lcao.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ hamilt::DFTU<hamilt::OperatorLCAO<TK, TR>>::DFTU(HS_Matrix_K<TK>* hsk_in,
1919
const Grid_Driver* GridD_in,
2020
const TwoCenterIntegrator* intor,
2121
const std::vector<double>& orb_cutoff,
22-
Plus_U* dftu_in)
22+
Plus_U* p_dftu)
2323
: hamilt::OperatorLCAO<TK, TR>(hsk_in, kvec_d_in, hR_in), intor_(intor), orb_cutoff_(orb_cutoff)
2424
{
2525
this->cal_type = calculation_type::lcao_dftu;
2626
this->ucell = &ucell_in;
27-
this->dftu = dftu_in;
27+
this->dftu = p_dftu;
2828
#ifdef __DEBUG
2929
assert(this->ucell != nullptr);
3030
#endif
@@ -273,7 +273,8 @@ void hamilt::DFTU<hamilt::OperatorLCAO<TK, TR>>::contributeHR()
273273
const double u_value = this->dftu->U[T0];
274274
std::vector<double> VU_tmp(occ.size());
275275

276-
double u_energy = 0.0;
276+
// mohan add 2025-11-08
277+
double u_energy = Plus_U::get_energy();
277278
this->cal_v_of_u(occ, tlp1, u_value, VU_tmp.data(), u_energy);
278279
Plus_U::set_energy(u_energy);
279280

source/source_lcao/module_operator_lcao/dftu_lcao.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class DFTU<OperatorLCAO<TK, TR>> : public OperatorLCAO<TK, TR>
3333
const Grid_Driver* gridD_in,
3434
const TwoCenterIntegrator* intor,
3535
const std::vector<double>& orb_cutoff,
36-
Plus_U* dftu_in);
36+
Plus_U* p_dftu);
3737
~DFTU<OperatorLCAO<TK, TR>>();
3838

3939
/**

0 commit comments

Comments
 (0)