Commit b2528663 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

sync fix temp/rescale to upstream

parent d52c5435
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -37,18 +37,18 @@ enum{CONSTANT,EQUAL};
/* ---------------------------------------------------------------------- */

FixTempRescale::FixTempRescale(LAMMPS *lmp, int narg, char **arg) :
  Fix(lmp, narg, arg)
  Fix(lmp, narg, arg),
  tstr(NULL), id_temp(NULL), tflag(0)
{
  if (narg < 8) error->all(FLERR,"Illegal fix temp/rescale command");

  dynamic_group_allow = 1;

  nevery = force->inumeric(FLERR,arg[3]);
  if (nevery <= 0) error->all(FLERR,"Illegal fix temp/rescale command");

  scalar_flag = 1;
  global_freq = nevery;
  extscalar = 1;
  dynamic_group_allow = 1;

  tstr = NULL;
  if (strstr(arg[4],"v_") == arg[4]) {
@@ -140,7 +140,7 @@ void FixTempRescale::end_of_step()

  if (temperature->dof < 1) return;

  // protect against division by zero.
  // protect against division by zero

  if (t_current == 0.0)
    error->all(FLERR,"Computed temperature for fix temp/rescale cannot be 0.0");