fold match_fields() back into read_header() function

This commit is contained in:
Axel Kohlmeyer
2021-12-11 21:17:41 -05:00
parent e23a2bfb55
commit 274b14618f
2 changed files with 5 additions and 21 deletions

View File

@ -317,25 +317,11 @@ bigint ReaderNative::read_header(double box[3][3], int &boxinfo, int &triclinic,
return 1;
}
match_fields(nfield, xflag, yflag, zflag, fieldtype, fieldlabel,
scaleflag, wrapflag, fieldflag, labels);
// match each field with a column of per-atom data
// if fieldlabel set, match with explicit column
// else infer one or more column matches from fieldtype
// xyz flag set by scaleflag + wrapflag (if fieldlabel set) or column label
return natoms;
}
/* ----------------------------------------------------------------------
match each field with a column of per-atom data
if fieldlabel set, match with explicit column
else infer one or more column matches from fieldtype
xyz flag set by scaleflag + wrapflag (if fieldlabel set) or column label
------------------------------------------------------------------------- */
void ReaderNative::match_fields(int nfield,
int &xflag, int &yflag, int &zflag,
int *fieldtype, char **fieldlabel,
int scaleflag, int wrapflag, int &fieldflag,
std::map<std::string, int> labels)
{
memory->create(fieldindex,nfield,"read_dump:fieldindex");
int s_index,u_index,su_index;
@ -456,6 +442,7 @@ void ReaderNative::match_fields(int nfield,
for (int i = 0; i < nfield; i++)
if (fieldindex[i] < 0) fieldflag = -1;
return natoms;
}
/* ----------------------------------------------------------------------