apply utils::logical() to more commands
This commit is contained in:
@ -220,9 +220,7 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"compress") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal compute chunk/atom command");
|
||||
else if (strcmp(arg[iarg+1],"no") == 0) compress = 0;
|
||||
else if (strcmp(arg[iarg+1],"yes") == 0) compress = 1;
|
||||
else error->all(FLERR,"Illegal compute chunk/atom command");
|
||||
compress = utils::logical(FLERR,arg[iarg+1],false,lmp);
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"discard") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal compute chunk/atom command");
|
||||
@ -255,9 +253,7 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
iarg += 2;
|
||||
} else if (strcmp(arg[iarg],"pbc") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal compute chunk/atom command");
|
||||
if (strcmp(arg[iarg+1],"no") == 0) pbcflag = 0;
|
||||
else if (strcmp(arg[iarg+1],"yes") == 0) pbcflag = 1;
|
||||
else error->all(FLERR,"Illegal compute chunk/atom command");
|
||||
pbcflag = utils::logical(FLERR,arg[iarg+1],false,lmp);
|
||||
iarg += 2;
|
||||
} else error->all(FLERR,"Illegal compute chunk/atom command");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user