Merge pull request #2727 from akohlmey/refactor-read-lines-from-file

Move "read_lines_from_file" utility function from Comm class to utils namespace
This commit is contained in:
Axel Kohlmeyer
2021-04-26 13:24:24 -04:00
committed by GitHub
14 changed files with 142 additions and 108 deletions

View File

@ -2302,7 +2302,7 @@ void FixRigid::readfile(int which, double *vec,
int nread = 0;
while (nread < nlines) {
nchunk = MIN(nlines-nread,CHUNK);
eofflag = comm->read_lines_from_file(fp,nchunk,MAXLINE,buffer);
eofflag = utils::read_lines_from_file(fp,nchunk,MAXLINE,buffer,me,world);
if (eofflag) error->all(FLERR,"Unexpected end of fix rigid file");
buf = buffer;