diff --git a/src/fix_temp_rescale.cpp b/src/fix_temp_rescale.cpp index cc16a9a6e616cb80e9998db0098826cecd35b30d..52e2da7b3de2b35e7afb35fae4746f404041c214 100644 --- a/src/fix_temp_rescale.cpp +++ b/src/fix_temp_rescale.cpp @@ -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");