Unverified Commit f74c5fc9 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

add RanPark pRNG warmup also to fix evaporate and create_atoms

parent 0f9112d9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -58,8 +58,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
@@ -611,8 +611,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