replace ATOTAGINT() calls with utils::tnumeric() in AtomVec classes

This commit is contained in:
Axel Kohlmeyer
2019-07-10 00:27:31 -04:00
parent 691fc357a4
commit 054ff97a51
27 changed files with 42 additions and 42 deletions

View File

@ -781,7 +781,7 @@ void AtomVecDipole::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -1724,7 +1724,7 @@ void AtomVecDPDKokkos::data_atom(double *coord, tagint imagetmp,
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
h_tag[nlocal] = ATOTAGINT(values[0]);
h_tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
h_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");

View File

@ -976,7 +976,7 @@ void AtomVecHybridKokkos::data_atom(double *coord, imageint imagetmp, char **val
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
h_tag[nlocal] = ATOTAGINT(values[0]);
h_tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
h_type[nlocal] = utils::inumeric(FLERR,values[1],true,lmp);
if (h_type[nlocal] <= 0 || h_type[nlocal] > atom->ntypes)
error->one(FLERR,"Invalid atom h_type in Atoms section of data file");

View File

@ -2549,7 +2549,7 @@ void AtomVecSphereKokkos::data_atom(double *coord, imageint imagetmp, char **val
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -793,8 +793,8 @@ void AtomVecAngle::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
molecule[nlocal] = ATOTAGINT(values[1]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp);
type[nlocal] = utils::inumeric(FLERR,values[2],true,lmp);
if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");
@ -822,7 +822,7 @@ void AtomVecAngle::data_atom(double *coord, imageint imagetmp, char **values)
int AtomVecAngle::data_atom_hybrid(int nlocal, char **values)
{
molecule[nlocal] = ATOTAGINT(values[0]);
molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
num_bond[nlocal] = 0;
num_angle[nlocal] = 0;

View File

@ -739,8 +739,8 @@ void AtomVecBond::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
molecule[nlocal] = ATOTAGINT(values[1]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp);
type[nlocal] = utils::inumeric(FLERR,values[2],true,lmp);
if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");
@ -767,7 +767,7 @@ void AtomVecBond::data_atom(double *coord, imageint imagetmp, char **values)
int AtomVecBond::data_atom_hybrid(int nlocal, char **values)
{
molecule[nlocal] = ATOTAGINT(values[0]);
molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
num_bond[nlocal] = 0;

View File

@ -942,8 +942,8 @@ void AtomVecFull::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
molecule[nlocal] = ATOTAGINT(values[1]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp);
type[nlocal] = utils::inumeric(FLERR,values[2],true,lmp);
if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");
@ -975,7 +975,7 @@ void AtomVecFull::data_atom(double *coord, imageint imagetmp, char **values)
int AtomVecFull::data_atom_hybrid(int nlocal, char **values)
{
molecule[nlocal] = ATOTAGINT(values[0]);
molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
q[nlocal] = utils::numeric(FLERR,values[1],true,lmp);
num_bond[nlocal] = 0;

View File

@ -926,8 +926,8 @@ void AtomVecMolecular::data_atom(double *coord, imageint imagetmp,
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
molecule[nlocal] = ATOTAGINT(values[1]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp);
type[nlocal] = utils::inumeric(FLERR,values[2],true,lmp);
if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");
@ -957,7 +957,7 @@ void AtomVecMolecular::data_atom(double *coord, imageint imagetmp,
int AtomVecMolecular::data_atom_hybrid(int nlocal, char **values)
{
molecule[nlocal] = ATOTAGINT(values[0]);
molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
num_bond[nlocal] = 0;
num_angle[nlocal] = 0;

View File

@ -742,11 +742,11 @@ void AtomVecTemplate::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
if (tag[nlocal] <= 0)
error->one(FLERR,"Invalid atom ID in Atoms section of data file");
molecule[nlocal] = ATOTAGINT(values[1]);
molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp);
molindex[nlocal] = utils::inumeric(FLERR,values[2],true,lmp) - 1;
molatom[nlocal] = utils::inumeric(FLERR,values[3],true,lmp) - 1;
@ -781,7 +781,7 @@ void AtomVecTemplate::data_atom(double *coord, imageint imagetmp, char **values)
int AtomVecTemplate::data_atom_hybrid(int nlocal, char **values)
{
molecule[nlocal] = ATOTAGINT(values[0]);
molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
molindex[nlocal] = utils::inumeric(FLERR,values[1],true,lmp) - 1;
molatom[nlocal] = utils::inumeric(FLERR,values[2],true,lmp) - 1;
return 3;

View File

@ -793,7 +793,7 @@ void AtomVecPeri::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -813,7 +813,7 @@ void AtomVecSpin::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -916,7 +916,7 @@ void AtomVecWavepacket::data_atom(double *coord, imageint imagetmp,
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -815,7 +815,7 @@ void AtomVecDPD::data_atom(double *coord, tagint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -799,7 +799,7 @@ void AtomVecElectron::data_atom(double *coord, imageint imagetmp, char **values)
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -760,7 +760,7 @@ void AtomVecEDPD::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -799,7 +799,7 @@ void AtomVecMDPD::data_atom(double *coord, imageint imagetmp, char **values) {
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -792,7 +792,7 @@ void AtomVecTDPD::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -1028,13 +1028,13 @@ void AtomVecSMD::data_atom(double *coord, imageint imagetmp, char **values) {
if (nlocal == nmax)
grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");
molecule[nlocal] = ATOTAGINT(values[2]);
molecule[nlocal] = utils::tnumeric(FLERR,values[2],true,lmp);
if (molecule[nlocal] <= 0)
error->one(FLERR, "Invalid molecule in Atoms section of data file");

View File

@ -844,7 +844,7 @@ void AtomVecMeso::data_atom(double *coord, imageint imagetmp, char **values) {
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -613,7 +613,7 @@ void AtomVecAtomic::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -1279,7 +1279,7 @@ void AtomVecBody::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -664,7 +664,7 @@ void AtomVecCharge::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -1141,7 +1141,7 @@ void AtomVecEllipsoid::data_atom(double *coord, imageint imagetmp,
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -864,7 +864,7 @@ void AtomVecHybrid::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -1036,8 +1036,8 @@ void AtomVecLine::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
molecule[nlocal] = ATOTAGINT(values[1]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp);
type[nlocal] = utils::inumeric(FLERR,values[2],true,lmp);
if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");
@ -1081,7 +1081,7 @@ void AtomVecLine::data_atom(double *coord, imageint imagetmp, char **values)
int AtomVecLine::data_atom_hybrid(int nlocal, char **values)
{
molecule[nlocal] = ATOTAGINT(values[0]);
molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
line[nlocal] = utils::inumeric(FLERR,values[1],true,lmp);
if (line[nlocal] == 0) line[nlocal] = -1;

View File

@ -965,7 +965,7 @@ void AtomVecSphere::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
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");

View File

@ -1435,8 +1435,8 @@ void AtomVecTri::data_atom(double *coord, imageint imagetmp, char **values)
int nlocal = atom->nlocal;
if (nlocal == nmax) grow(0);
tag[nlocal] = ATOTAGINT(values[0]);
molecule[nlocal] = ATOTAGINT(values[1]);
tag[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
molecule[nlocal] = utils::tnumeric(FLERR,values[1],true,lmp);
type[nlocal] = utils::inumeric(FLERR,values[2],true,lmp);
if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");
@ -1483,7 +1483,7 @@ void AtomVecTri::data_atom(double *coord, imageint imagetmp, char **values)
int AtomVecTri::data_atom_hybrid(int nlocal, char **values)
{
molecule[nlocal] = ATOTAGINT(values[0]);
molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp);
tri[nlocal] = utils::inumeric(FLERR,values[1],true,lmp);
if (tri[nlocal] == 0) tri[nlocal] = -1;