git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@7003 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -35,10 +35,10 @@ enum{NOBIAS,BIAS};
|
||||
FixTempRescale::FixTempRescale(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg)
|
||||
{
|
||||
if (narg < 8) error->all("Illegal fix temp/rescale command");
|
||||
if (narg < 8) error->all(FLERR,"Illegal fix temp/rescale command");
|
||||
|
||||
nevery = atoi(arg[3]);
|
||||
if (nevery <= 0) error->all("Illegal fix temp/rescale command");
|
||||
if (nevery <= 0) error->all(FLERR,"Illegal fix temp/rescale command");
|
||||
|
||||
scalar_flag = 1;
|
||||
global_freq = nevery;
|
||||
@ -94,7 +94,7 @@ void FixTempRescale::init()
|
||||
{
|
||||
int icompute = modify->find_compute(id_temp);
|
||||
if (icompute < 0)
|
||||
error->all("Temperature ID for fix temp/rescale does not exist");
|
||||
error->all(FLERR,"Temperature ID for fix temp/rescale does not exist");
|
||||
temperature = modify->compute[icompute];
|
||||
|
||||
if (temperature->tempbias) which = BIAS;
|
||||
@ -107,7 +107,7 @@ void FixTempRescale::end_of_step()
|
||||
{
|
||||
double t_current = temperature->compute_scalar();
|
||||
if (t_current == 0.0)
|
||||
error->all("Computed temperature for fix temp/rescale cannot be 0.0");
|
||||
error->all(FLERR,"Computed temperature for fix temp/rescale cannot be 0.0");
|
||||
|
||||
double delta = update->ntimestep - update->beginstep;
|
||||
delta /= update->endstep - update->beginstep;
|
||||
@ -157,7 +157,7 @@ void FixTempRescale::end_of_step()
|
||||
int FixTempRescale::modify_param(int narg, char **arg)
|
||||
{
|
||||
if (strcmp(arg[0],"temp") == 0) {
|
||||
if (narg < 2) error->all("Illegal fix_modify command");
|
||||
if (narg < 2) error->all(FLERR,"Illegal fix_modify command");
|
||||
if (tflag) {
|
||||
modify->delete_compute(id_temp);
|
||||
tflag = 0;
|
||||
@ -168,13 +168,13 @@ int FixTempRescale::modify_param(int narg, char **arg)
|
||||
strcpy(id_temp,arg[1]);
|
||||
|
||||
int icompute = modify->find_compute(id_temp);
|
||||
if (icompute < 0) error->all("Could not find fix_modify temperature ID");
|
||||
if (icompute < 0) error->all(FLERR,"Could not find fix_modify temperature ID");
|
||||
temperature = modify->compute[icompute];
|
||||
|
||||
if (temperature->tempflag == 0)
|
||||
error->all("Fix_modify temperature ID does not compute temperature");
|
||||
error->all(FLERR,"Fix_modify temperature ID does not compute temperature");
|
||||
if (temperature->igroup != igroup && comm->me == 0)
|
||||
error->warning("Group for fix_modify temp != fix group");
|
||||
error->warning(FLERR,"Group for fix_modify temp != fix group");
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user