fold match_fields() back into read_header() function
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -53,9 +53,6 @@ class ReaderNative : public Reader {
|
||||
int size_one; // number of double for one atom
|
||||
int maxbuf; // maximum buffer size
|
||||
|
||||
void match_fields(int, int &, int &, int &, int *, char **, int, int, int &,
|
||||
std::map<std::string, int>);
|
||||
|
||||
int find_label(const std::string &label, const std::map<std::string, int> &labels);
|
||||
void read_lines(int);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user