add docs for new utility function

This commit is contained in:
Axel Kohlmeyer
2021-04-24 21:31:01 -04:00
parent 539ab02365
commit 8e5e995188
4 changed files with 20 additions and 11 deletions

View File

@ -97,19 +97,19 @@ namespace LAMMPS_NS {
* This function uses repeated calls to fread() to fill a buffer with
* newline terminated text. If a line does not end in a newline (e.g.
* at the end of a file), it is added. The caller has to allocate an
* nlines by maxline sized buffer for storing the text data.
* nlines by nmax sized buffer for storing the text data.
* Reading is done by MPI rank 0 of the given communicator only, and
* thus only MPI rank 0 needs to provide a valid file pointer.
*
* \param fp file pointer used by fread
* \param nlines number of lines to be read
* \param maxline maximum length of a single line
* \param nmax maximum length of a single line
* \param buffer buffer for storing the data.
* \param me MPI rank of calling process in MPI communicator
* \param comm MPI communicator for broadcast
* \return 1 if the read was short, 0 if read was succesful */
* \return 1 if the read was short, 0 if read was successful */
int read_lines_from_file(FILE *fp, int nlines, int maxline,
int read_lines_from_file(FILE *fp, int nlines, int nmax,
char *buffer, int me, MPI_Comm comm);
/** Report if a requested style is in a package or may have a typo