modernize parsing of Velocities section of data files
This commit is contained in:
@ -1890,18 +1890,18 @@ void AtomVec::write_data(FILE *fp, int n, double **buf)
|
||||
unpack one line from Velocities section of data file
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AtomVec::data_vel(int ilocal, char **values)
|
||||
void AtomVec::data_vel(int ilocal, const std::vector<std::string> &values)
|
||||
{
|
||||
int m,n,datatype,cols;
|
||||
void *pdata;
|
||||
|
||||
double **v = atom->v;
|
||||
v[ilocal][0] = utils::numeric(FLERR,values[0],true,lmp);
|
||||
v[ilocal][1] = utils::numeric(FLERR,values[1],true,lmp);
|
||||
v[ilocal][2] = utils::numeric(FLERR,values[2],true,lmp);
|
||||
int ivalue = 1;
|
||||
v[ilocal][0] = utils::numeric(FLERR,values[ivalue++],true,lmp);
|
||||
v[ilocal][1] = utils::numeric(FLERR,values[ivalue++],true,lmp);
|
||||
v[ilocal][2] = utils::numeric(FLERR,values[ivalue++],true,lmp);
|
||||
|
||||
if (ndata_vel > 2) {
|
||||
int ivalue = 3;
|
||||
for (n = 2; n < ndata_vel; n++) {
|
||||
pdata = mdata_vel.pdata[n];
|
||||
datatype = mdata_vel.datatype[n];
|
||||
|
||||
Reference in New Issue
Block a user