use new utils::sfread() utility function in several classes

This commit is contained in:
Axel Kohlmeyer
2019-10-17 11:29:08 -04:00
parent 7d1cd63e1d
commit cad6293078
22 changed files with 169 additions and 127 deletions

View File

@ -24,6 +24,7 @@
#include "math_const.h"
#include "memory.h"
#include "error.h"
#include "utils.h"
using namespace LAMMPS_NS;
using namespace MathConst;
@ -128,7 +129,7 @@ void AngleZero::read_restart(FILE *fp)
allocate();
if (comm->me == 0) {
fread(&theta0[1],sizeof(double),atom->nangletypes,fp);
utils::sfread(FLERR,&theta0[1],sizeof(double),atom->nangletypes,fp,NULL,error);
}
MPI_Bcast(&theta0[1],atom->nangletypes,MPI_DOUBLE,0,world);