]> https://gitweb.dealii.org/ - dealii.git/commit
Use a different random number generator. 247/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 13 Nov 2014 17:14:14 +0000 (11:14 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 13 Nov 2014 17:14:14 +0000 (11:14 -0600)
commite5addc4f8307132b07321142aa6d213c3007940b
tree4dc4407cebbebc89f2c7d2619b417f99d196e23e
parent23a290bff3516a3f7831f6ab39dd5f99562ce6ff
Use a different random number generator.

For historical reason, GridTools::distort_random() is not deterministic in that if
you call it twice on the same mesh, it will produce different results. This is because
we call rand() which carries around internal state. On the other hand, for the newly
implemented parallel algorithm, we can ensure that this isn't the case by creating
our own random number generator that we start from the same seed every time.
source/grid/grid_tools.cc
tests/mpi/distort_random_01.mpirun=2.output
tests/mpi/distort_random_01.mpirun=4.output
tests/mpi/distort_random_01.mpirun=8.output
tests/mpi/distort_random_02.mpirun=2.output
tests/mpi/distort_random_02.mpirun=4.output
tests/mpi/distort_random_02.mpirun=8.output

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.