Skip to content

Commit 8d7e74f

Browse files
author
abacus_fixer
committed
fix: adapt onsite_proj_force_stress.cpp to renamed Plus_U_Base interface
Upstream PR #7873 split onsite_proj.cpp and introduced onsite_proj_force_stress.cpp, which still called the removed get_orbital_corr_data() (returning const int*). Our refactor PR had renamed it to get_orbital_corr_vec() (returning const std::vector<int>&). Fix by appending .data() at both call sites, matching the new interface.
1 parent ca281d6 commit 8d7e74f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/source_pw/module_pwdft/onsite_proj_force_stress.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void projectors::OnsiteProjector<T, Device>::cal_force_onsite_dftu(int ik, int n
1212
const std::complex<double>* pot_onsite_ptr = dftu.get_pot_uterm_pw_spin(isk_val);
1313
const int pot_onsite_size = dftu.get_size_pot_uterm_pw_spin();
1414
this->fs_tools->cal_force_dftu(ik, npm, force,
15-
dftu.get_orbital_corr_data(), pot_onsite_ptr, pot_onsite_size, wg_ik);
15+
dftu.get_orbital_corr_vec().data(), pot_onsite_ptr, pot_onsite_size, wg_ik);
1616
}
1717

1818
template <typename T, typename Device>
@@ -24,7 +24,7 @@ double projectors::OnsiteProjector<T, Device>::cal_stress_onsite_dftu(int ik, in
2424
const std::complex<double>* pot_onsite_ptr = dftu.get_pot_uterm_pw_spin(isk_val);
2525
const int pot_onsite_size = dftu.get_size_pot_uterm_pw_spin();
2626
return this->fs_tools->cal_stress_dftu(ik, npm,
27-
dftu.get_orbital_corr_data(), pot_onsite_ptr, pot_onsite_size, wg_ik);
27+
dftu.get_orbital_corr_vec().data(), pot_onsite_ptr, pot_onsite_size, wg_ik);
2828
}
2929

3030
template <typename T, typename Device>

0 commit comments

Comments
 (0)