simplify
This commit is contained in:
@ -849,15 +849,11 @@ void Velocity::options(int narg, char **arg)
|
|||||||
iarg += 2;
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg],"temp") == 0) {
|
} else if (strcmp(arg[iarg],"temp") == 0) {
|
||||||
if (iarg+2 > narg) error->all(FLERR,"Illegal velocity command");
|
if (iarg+2 > narg) error->all(FLERR,"Illegal velocity command");
|
||||||
int icompute;
|
int icompute = modify->find_compute(arg[iarg+1]);
|
||||||
for (icompute = 0; icompute < modify->ncompute; icompute++)
|
if (icompute < 0) error->all(FLERR,"Could not find velocity temperature ID");
|
||||||
if (strcmp(arg[iarg+1],modify->compute[icompute]->id) == 0) break;
|
|
||||||
if (icompute == modify->ncompute)
|
|
||||||
error->all(FLERR,"Could not find velocity temperature ID");
|
|
||||||
temperature = modify->compute[icompute];
|
temperature = modify->compute[icompute];
|
||||||
if (temperature->tempflag == 0)
|
if (temperature->tempflag == 0)
|
||||||
error->all(FLERR,
|
error->all(FLERR,"Velocity temperature ID does not compute temperature");
|
||||||
"Velocity temperature ID does not compute temperature");
|
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg],"bias") == 0) {
|
} else if (strcmp(arg[iarg],"bias") == 0) {
|
||||||
if (iarg+2 > narg) error->all(FLERR,"Illegal velocity command");
|
if (iarg+2 > narg) error->all(FLERR,"Illegal velocity command");
|
||||||
|
|||||||
Reference in New Issue
Block a user