forked from lijiext/lammps
sync fix temp/rescale to upstream
This commit is contained in:
parent
d52c5435a7
commit
b252866393
|
@ -37,18 +37,18 @@ enum{CONSTANT,EQUAL};
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
FixTempRescale::FixTempRescale(LAMMPS *lmp, int narg, char **arg) :
|
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");
|
if (narg < 8) error->all(FLERR,"Illegal fix temp/rescale command");
|
||||||
|
|
||||||
dynamic_group_allow = 1;
|
|
||||||
|
|
||||||
nevery = force->inumeric(FLERR,arg[3]);
|
nevery = force->inumeric(FLERR,arg[3]);
|
||||||
if (nevery <= 0) error->all(FLERR,"Illegal fix temp/rescale command");
|
if (nevery <= 0) error->all(FLERR,"Illegal fix temp/rescale command");
|
||||||
|
|
||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
global_freq = nevery;
|
global_freq = nevery;
|
||||||
extscalar = 1;
|
extscalar = 1;
|
||||||
|
dynamic_group_allow = 1;
|
||||||
|
|
||||||
tstr = NULL;
|
tstr = NULL;
|
||||||
if (strstr(arg[4],"v_") == arg[4]) {
|
if (strstr(arg[4],"v_") == arg[4]) {
|
||||||
|
@ -140,7 +140,7 @@ void FixTempRescale::end_of_step()
|
||||||
|
|
||||||
if (temperature->dof < 1) return;
|
if (temperature->dof < 1) return;
|
||||||
|
|
||||||
// protect against division by zero.
|
// protect against division by zero
|
||||||
|
|
||||||
if (t_current == 0.0)
|
if (t_current == 0.0)
|
||||||
error->all(FLERR,"Computed temperature for fix temp/rescale cannot be 0.0");
|
error->all(FLERR,"Computed temperature for fix temp/rescale cannot be 0.0");
|
||||||
|
|
Loading…
Reference in New Issue