use alternate implementation of numeric conversion functions

these new functions allow to choose between aborting with Error::one()
and exiting with Error::all(). in the long run those should replace
all of the functions in Force.
This commit is contained in:
Axel Kohlmeyer
2019-07-08 17:40:30 -04:00
parent b469ff6791
commit cfaa537296
36 changed files with 479 additions and 248 deletions

View File

@ -21,6 +21,7 @@
#include "fix.h"
#include "memory.h"
#include "error.h"
#include "utils.h"
using namespace LAMMPS_NS;
@ -613,7 +614,7 @@ void AtomVecAtomic::data_atom(double *coord, imageint imagetmp, char **values)
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
type[nlocal] = force->inumeric(FLERR,values[1]);
type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp);
if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");