mass replace calls to fread() with utils::sfread()

This commit is contained in:
Axel Kohlmeyer
2019-10-19 08:26:31 -04:00
parent e2988c5c20
commit 73892711a5
120 changed files with 1082 additions and 968 deletions

View File

@ -27,6 +27,7 @@
#include "math_const.h"
#include "memory.h"
#include "error.h"
#include "utils.h"
using namespace LAMMPS_NS;
using namespace MathConst;
@ -325,8 +326,8 @@ void DihedralQuadratic::read_restart(FILE *fp)
allocate();
if (comm->me == 0) {
fread(&k[1],sizeof(double),atom->ndihedraltypes,fp);
fread(&phi0[1],sizeof(double),atom->ndihedraltypes,fp);
utils::sfread(FLERR,&k[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
utils::sfread(FLERR,&phi0[1],sizeof(double),atom->ndihedraltypes,fp,NULL,error);
}
MPI_Bcast(&k[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);
MPI_Bcast(&phi0[1],atom->ndihedraltypes,MPI_DOUBLE,0,world);