Unverified Commit fed1a72b authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1569 from JunChiehWang/random_deposit

throw away random numbers to avoid unexpected correlations
parents 224ea418 f864a527
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -167,8 +167,11 @@ FixPour::FixPour(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();

  // allgather arrays

+3 −0
Original line number Diff line number Diff line
@@ -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

+3 −0
Original line number Diff line number Diff line
@@ -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

+3 −0
Original line number Diff line number Diff line
@@ -606,8 +606,11 @@ void CreateAtoms::add_random()
  double *boxlo,*boxhi;

  // 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

  RanPark *random = new RanPark(lmp,seed);
  for (int ii=0; ii < 30; ii++) random->uniform();

  // bounding box for atom creation
  // in real units, even if triclinic