small tweaks

This commit is contained in:
Axel Kohlmeyer
2022-08-09 14:47:58 -04:00
parent 247a2b12b3
commit ba7507c9e5
2 changed files with 2 additions and 3 deletions

View File

@ -68,7 +68,7 @@ ComputePairLocal::ComputePairLocal(LAMMPS *lmp, int narg, char **arg) :
pstyle[nvalues++] = DZ;
else if (arg[iarg][0] == 'p') {
int n = atoi(&arg[iarg][1]);
if (n <= 0) error->all(FLERR, "Invalid keyword in compute pair/local command");
if (n <= 0) error->all(FLERR, "Invalid keyword {} in compute pair/local command", arg[iarg]);
pstyle[nvalues] = PN;
pindex[nvalues++] = n - 1;

View File

@ -179,8 +179,7 @@ void ReaderXYZ::read_atoms(int n, int nfield, double **fields)
++nid;
rv = sscanf(line,"%*s%lg%lg%lg", &myx, &myy, &myz);
if (rv != 3)
error->one(FLERR,"Dump file is incorrectly formatted");
if (rv != 3) error->one(FLERR,"Dump file is incorrectly formatted");
// XXX: we could insert an element2type translation here
// XXX: for now we flag unrecognized types as type 0,