Skip to content

Commit e1eda2c

Browse files
committed
fix a bug
1 parent 18bd89f commit e1eda2c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/module_lr/lr_spectrum.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ elecstate::DensityMatrix<T, T> LR::LR_Spectrum<T>::cal_transition_density_matrix
3535
return DM_trans;
3636
}
3737

38+
#ifndef __NEW_GINT
39+
template<typename T>
40+
void LR::LR_Spectrum<T>::cal_gint_rho(double** rho, const int& nrxx)
41+
{
42+
ModuleBase::GlobalFunc::ZEROS(rho[0], nrxx);
43+
Gint_inout inout_rho(rho, Gint_Tools::job_type::rho, 1, false);
44+
this->gint->cal_gint(&inout_rho);
45+
}
46+
#endif
47+
3848
inline void check_sum_rule(const double& osc_tot)
3949
{
4050
if (std::abs(osc_tot - 1.0) > 1e-3) {

0 commit comments

Comments
 (0)