Commit fe7927af authored by Jun-Chieh Wang's avatar Jun-Chieh Wang
Browse files

move it after the generator is constructed

parent 9c376006
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -184,8 +184,14 @@ 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);
  double tmp_rand;
  for (int ii=0; ii < 30; ii++) {
    tmp_rand = random->uniform();      
  }

  // set up reneighboring

@@ -193,14 +199,6 @@ FixDeposit::FixDeposit(LAMMPS *lmp, int narg, char **arg) :
  next_reneighbor = update->ntimestep + 1;
  nfirst = next_reneighbor;
  ninserted = 0;

  // throw away the first few numbers to avoid the unexpected correlations 

  double tmp_rand;
  for (int ii=0; ii < 30; ii++) {
    tmp_rand = random->uniform();      
  }

}

/* ---------------------------------------------------------------------- */