1 parent 3141442 commit 39c7526Copy full SHA for 39c7526
1 file changed
source/source_estate/module_charge/charge_mixing_rho.cpp
@@ -96,8 +96,8 @@ void Charge_Mixing::mix_rho_recip(Charge* chr)
96
}
97
for (int ig = 0; ig < npw; ig++)
98
{
99
- chr->rhog[0][ig] = std::max(0.0, 0.5 * (rhog_mag[ig] + rhog_mag[ig+npw]));
100
- chr->rhog[1][ig] = std::max(0.0, 0.5 * (rhog_mag[ig] - rhog_mag[ig+npw]));
+ chr->rhog[0][ig] = 0.5 * (rhog_mag[ig] + rhog_mag[ig+npw]);
+ chr->rhog[1][ig] = 0.5 * (rhog_mag[ig] - rhog_mag[ig+npw]);
101
102
// delete
103
delete[] rhog_mag;
0 commit comments