Hi,
in the documentation of the method read_data (http://www.cfdem.com/media/DEM/docu/read_data.html) it is mentioned how the fix keyword can be used to process a specific portion of the data file through a pre-defined fix.
Trying to apply this functionality, however, fails. When I look through the source code I end up at the function ReadData::fix :
/* ----------------------------------------------------------------------
read fix section, pass lines to fix to process
n = index of fix
------------------------------------------------------------------------- */
void ReadData::fix(int ifix, char *keyword)
{
int nchunk,eof;
bigint nlines = modify->fix[ifix]->read_data_skip_lines(keyword);
bigint nread = 0;
while (nread < nlines) {
nchunk = MIN(nlines-nread,CHUNK);
eof = comm->read_lines_from_file(fp,nchunk,MAXLINE,buffer);
if (eof) error->all(FLERR,"Unexpected end of data file");
modify->fix[ifix]->read_data_section(keyword,nchunk,buffer);
nread += nchunk;
}
}
This function contains read_data_skip_lines and read_data_section, but the only occurrences I found for these functions are in fix.h, where they are just defined (or return 0 resp.).
So, is this a bug and the functionality of using read_data with the fix keyword not applicable in LIGGGHTS?
Best,
Tobias
Daniel Queteschiner | Thu, 03/03/2016 - 12:40
Not a bug
Of course the fix class in question needs to implement read_data_skip_lines and read_data_section. None of the fixes currently available in LIGGGHTS uses/supports this feature as far as I know. The manual gives the fix property/atom as an example but this refers to the LAMMPS implementation of the command (which differs from the LIGGGHTS implementation) and indeed implements this functionality, see
https://github.com/lammps/lammps/blob/master/src/fix_property_atom.cpp#L188