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

throw away random numbers in /src/MISC/fix_deposit.cpp

parent 19d7cd63
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -343,6 +343,11 @@ void FixDeposit::pre_exchange()

    // choose random position for new particle within region
    if (distflag == DIST_UNIFORM) {
      // 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();      
      }
      do {
        coord[0] = xlo + random->uniform() * (xhi-xlo);
        coord[1] = ylo + random->uniform() * (yhi-ylo);