mass replace calls to fread() with utils::sfread()
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user