Unverified Commit 4da8ff3d authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

avoid division by zero

parent fc1be785
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -520,8 +520,8 @@ void FixQBMSST::initial_integrate(int /*vflag*/)
  // decide if the qtb temperature need to be updated or not
  if (counter_l == 0) {
    t_current -= dtv*fric_coef*eta*beta*(old_eavg-e0)/(3*ntotal*boltz);
    if (t_current <= 0.0) break;
    old_eavg = 0;//clear old energy average
    if (t_current < 0.0) t_current=0;

    // load omega_H with calculated spectrum at a specific temperature (corrected spectrum), omega_H is the Fourier transformation of time_H
    for (int k = 0; k < 2*N_f; k++) {