@@ -56,7 +56,7 @@ void Veff<OperatorPW<T, Device>>::act(
5656 const int current_spin = this ->isk [this ->ik ];
5757 const int psi_offset= max_npw * npol;
5858#ifdef __DSP
59- if (npol == 1 && this -> veff_col != 0 )
59+ if (npol == 1 )
6060 {
6161 ModulePW::FFT_Guard guard (wfcpw->fft_bundle );
6262 for (int ib = 0 ; ib < nbands; ib += npol)
@@ -71,7 +71,7 @@ void Veff<OperatorPW<T, Device>>::act(
7171 tmhpsi += psi_offset;
7272 tmpsi_in += psi_offset;
7373 }
74- }else if (npol == 2 && this -> veff_col != 0 )
74+ }else if (npol == 2 )
7575 {
7676 const Real* current_veff[4 ];
7777 for (int is = 0 ; is < 4 ; is++)
@@ -93,7 +93,7 @@ void Veff<OperatorPW<T, Device>>::act(
9393 ModuleBase::WARNING_QUIT (" VeffPW" , " npol should be 1 or 2 or veff_col equal to 0\n " );
9494 }
9595#else
96- if (npol == 1 && this -> veff_col != 0 )
96+ if (npol == 1 )
9797 {
9898 for (int ib = 0 ; ib < nbands; ib += npol)
9999 {
@@ -103,11 +103,11 @@ void Veff<OperatorPW<T, Device>>::act(
103103 // but the 3DFFT can not be skipped, it will cause hanging
104104 veff_op ()(this ->ctx , this ->veff_col , this ->porter , this ->veff + current_spin * this ->veff_col );
105105 wfcpw->real_to_recip <T, Device>(this ->porter , tmhpsi, this ->ik , true );
106- tmhpsi += psi_offset;
106+ tmhpsi += psi_offset;
107107 tmpsi_in += psi_offset;
108108 }
109109 }
110- else if (npol == 2 && this -> veff_col != 0 )
110+ else if (npol == 2 )
111111 {
112112 const Real* current_veff[4 ];
113113 for (int is = 0 ; is < 4 ; is++)
0 commit comments