log labelmap reading from data file and improve error messages

This commit is contained in:
Axel Kohlmeyer
2022-09-09 06:11:22 -04:00
parent 97717d7cba
commit 2e6526b8f7
3 changed files with 33 additions and 17 deletions

View File

@ -1066,11 +1066,11 @@ void Atom::data_atoms(int n, char *buf, tagint id_offset, tagint mol_offset,
break;
}
}
*next = '\n';
if ((nwords != avec->size_data_atom) && (nwords != avec->size_data_atom + 3))
error->all(FLERR,"Incorrect atom format in {}: {}", location, utils::trim(buf));
error->all(FLERR,"Incorrect format in {}: {}", location, utils::trim(buf));
*next = '\n';
// set bounds for my proc
// if periodic and I am lo/hi proc, adjust bounds by EPSILON
// insures all data atoms will be owned even with round-off
@ -1149,7 +1149,7 @@ void Atom::data_atoms(int n, char *buf, tagint id_offset, tagint mol_offset,
// skip over empty or comment lines
} else if ((nvalues < nwords) ||
((nvalues > nwords) && (!utils::strmatch(values[nwords],"^#")))) {
error->all(FLERR, "Incorrect atom format in {}: {}", location, utils::trim(buf));
error->all(FLERR, "Incorrect format in {}: {}", location, utils::trim(buf));
} else {
int imx = 0, imy = 0, imz = 0;
if (imageflag) {