aboutsummaryrefslogtreecommitdiff
path: root/Docs/source/running_cpp/parameters.rst
diff options
context:
space:
mode:
authorGravatar Yinjian Zhao <yinjianzhao@lbl.gov> 2020-02-20 09:22:30 -0800
committerGravatar GitHub <noreply@github.com> 2020-02-20 09:22:30 -0800
commit4fe858ae90dee5355fbb6c90d496ab85ac31d77b (patch)
tree13ca39262851fee22c4a28415a290c435fac0f67 /Docs/source/running_cpp/parameters.rst
parent6e5b96e3219807c97a1161ed9dd28a22ea802d85 (diff)
downloadWarpX-4fe858ae90dee5355fbb6c90d496ab85ac31d77b.tar.gz
WarpX-4fe858ae90dee5355fbb6c90d496ab85ac31d77b.tar.zst
WarpX-4fe858ae90dee5355fbb6c90d496ab85ac31d77b.zip
Add Reset Random Seed Feature (#717)
* Add ResetRandomSeed * Add doc * Modify and change location of the code. * Small fix * Try to fix an alert * Try to fix an alert * Modify based on suggestions * Use INT_MAX * Modify based on suggestions. * Modify based on suggestions.
Diffstat (limited to 'Docs/source/running_cpp/parameters.rst')
-rw-r--r--Docs/source/running_cpp/parameters.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/Docs/source/running_cpp/parameters.rst b/Docs/source/running_cpp/parameters.rst
index 73f613a73..0d599a261 100644
--- a/Docs/source/running_cpp/parameters.rst
+++ b/Docs/source/running_cpp/parameters.rst
@@ -44,6 +44,19 @@ Overall simulation parameters
* ``warpx.verbose`` (`0` or `1`)
Controls how much information is printed to the terminal, when running WarpX.
+* ``warpx.random_seed`` (`string` or `int` > 0) optional
+ If provided ``warpx.random_seed = random``, the random seed will be determined
+ using `std::random_device` and `std::clock()`,
+ thus every simulation run produces different random numbers.
+ If provided ``warpx.random_seed = n``, and it is required that `n > 0`,
+ the random seed for each MPI rank is `(mpi_rank+1) * n`,
+ where `mpi_rank` starts from 0.
+ `n = 1` and ``warpx.random_seed = default``
+ produce the default random seed.
+ Note that when GPU threading is used,
+ one should not expect to obtain the same random numbers,
+ even if a fixed ``warpx.random_seed`` is provided.
+
Setting up the field mesh
-------------------------