merged in current master

This commit is contained in:
Steve Plimpton
2020-01-13 10:34:31 -07:00
parent bf20d72fc3
commit e8d11931ec
2720 changed files with 221313 additions and 28584 deletions

View File

@ -184,8 +184,11 @@ FixDeposit::FixDeposit(LAMMPS *lmp, int narg, char **arg) :
if (idnext) find_maxid();
// random number generator, same for all procs
// warm up the generator 30x to avoid correlations in first-particle
// positions if runs are repeated with consecutive seeds
random = new RanPark(lmp,seed);
for (int ii=0; ii < 30; ii++) random->uniform();
// set up reneighboring

View File

@ -56,8 +56,11 @@ FixEvaporate::FixEvaporate(LAMMPS *lmp, int narg, char **arg) :
if (seed <= 0) error->all(FLERR,"Illegal fix evaporate command");
// random number generator, same for all procs
// warm up the generator 30x to avoid correlations in first-particle
// positions if runs are repeated with consecutive seeds
random = new RanPark(lmp,seed);
for (int ii=0; ii < 30; ii++) random->uniform();
// optional args

View File

@ -26,6 +26,7 @@
#include "math_const.h"
#include "memory.h"
#include "error.h"
#include "utils.h"
using namespace LAMMPS_NS;
using namespace MathConst;
@ -318,15 +319,15 @@ void PairNMCut::read_restart(FILE *fp)
int me = comm->me;
for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp);
if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) {
if (me == 0) {
fread(&e0[i][j],sizeof(double),1,fp);
fread(&r0[i][j],sizeof(double),1,fp);
fread(&nn[i][j],sizeof(double),1,fp);
fread(&mm[i][j],sizeof(double),1,fp);
fread(&cut[i][j],sizeof(double),1,fp);
utils::sfread(FLERR,&e0[i][j],sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&r0[i][j],sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&nn[i][j],sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&mm[i][j],sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&cut[i][j],sizeof(double),1,fp,NULL,error);
}
MPI_Bcast(&e0[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&r0[i][j],1,MPI_DOUBLE,0,world);
@ -356,10 +357,10 @@ void PairNMCut::write_restart_settings(FILE *fp)
void PairNMCut::read_restart_settings(FILE *fp)
{
if (comm->me == 0) {
fread(&cut_global,sizeof(double),1,fp);
fread(&offset_flag,sizeof(int),1,fp);
fread(&mix_flag,sizeof(int),1,fp);
fread(&tail_flag,sizeof(int),1,fp);
utils::sfread(FLERR,&cut_global,sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
}
MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&offset_flag,1,MPI_INT,0,world);

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;
@ -369,16 +370,16 @@ void PairNMCutCoulCut::read_restart(FILE *fp)
int me = comm->me;
for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp);
if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) {
if (me == 0) {
fread(&e0[i][j],sizeof(double),1,fp);
fread(&r0[i][j],sizeof(double),1,fp);
fread(&nn[i][j],sizeof(double),1,fp);
fread(&mm[i][j],sizeof(double),1,fp);
fread(&cut_lj[i][j],sizeof(double),1,fp);
fread(&cut_coul[i][j],sizeof(double),1,fp);
utils::sfread(FLERR,&e0[i][j],sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&r0[i][j],sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&nn[i][j],sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&mm[i][j],sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&cut_lj[i][j],sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&cut_coul[i][j],sizeof(double),1,fp,NULL,error);
}
MPI_Bcast(&e0[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&r0[i][j],1,MPI_DOUBLE,0,world);
@ -410,11 +411,11 @@ void PairNMCutCoulCut::write_restart_settings(FILE *fp)
void PairNMCutCoulCut::read_restart_settings(FILE *fp)
{
if (comm->me == 0) {
fread(&cut_lj_global,sizeof(double),1,fp);
fread(&cut_coul_global,sizeof(double),1,fp);
fread(&offset_flag,sizeof(int),1,fp);
fread(&mix_flag,sizeof(int),1,fp);
fread(&tail_flag,sizeof(int),1,fp);
utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&cut_coul_global,sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
}
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul_global,1,MPI_DOUBLE,0,world);

View File

@ -28,6 +28,7 @@
#include "math_const.h"
#include "memory.h"
#include "error.h"
#include "utils.h"
using namespace LAMMPS_NS;
using namespace MathConst;
@ -413,15 +414,15 @@ void PairNMCutCoulLong::read_restart(FILE *fp)
int me = comm->me;
for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp);
if (me == 0) utils::sfread(FLERR,&setflag[i][j],sizeof(int),1,fp,NULL,error);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) {
if (me == 0) {
fread(&e0[i][j],sizeof(double),1,fp);
fread(&r0[i][j],sizeof(double),1,fp);
fread(&nn[i][j],sizeof(double),1,fp);
fread(&mm[i][j],sizeof(double),1,fp);
fread(&cut_lj[i][j],sizeof(double),1,fp);
utils::sfread(FLERR,&e0[i][j],sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&r0[i][j],sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&nn[i][j],sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&mm[i][j],sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&cut_lj[i][j],sizeof(double),1,fp,NULL,error);
}
MPI_Bcast(&e0[i][j],1,MPI_DOUBLE,0,world);
MPI_Bcast(&r0[i][j],1,MPI_DOUBLE,0,world);
@ -454,13 +455,13 @@ void PairNMCutCoulLong::write_restart_settings(FILE *fp)
void PairNMCutCoulLong::read_restart_settings(FILE *fp)
{
if (comm->me == 0) {
fread(&cut_lj_global,sizeof(double),1,fp);
fread(&cut_coul,sizeof(double),1,fp);
fread(&offset_flag,sizeof(int),1,fp);
fread(&mix_flag,sizeof(int),1,fp);
fread(&tail_flag,sizeof(int),1,fp);
fread(&ncoultablebits,sizeof(int),1,fp);
fread(&tabinner,sizeof(double),1,fp);
utils::sfread(FLERR,&cut_lj_global,sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&cut_coul,sizeof(double),1,fp,NULL,error);
utils::sfread(FLERR,&offset_flag,sizeof(int),1,fp,NULL,error);
utils::sfread(FLERR,&mix_flag,sizeof(int),1,fp,NULL,error);
utils::sfread(FLERR,&tail_flag,sizeof(int),1,fp,NULL,error);
utils::sfread(FLERR,&ncoultablebits,sizeof(int),1,fp,NULL,error);
utils::sfread(FLERR,&tabinner,sizeof(double),1,fp,NULL,error);
}
MPI_Bcast(&cut_lj_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_coul,1,MPI_DOUBLE,0,world);