petsc-3.15.0 2021-03-30
PetscRandomSeed
Seed the generator.
Synopsis
#include "petscsys.h"
PetscErrorCode PetscRandomSeed(PetscRandom r)
Not collective
Input Parameters
| r | - The random number generator context
|
Usage
PetscRandomSetSeed(r,a positive integer);
PetscRandomSeed(r); PetscRandomGetValue() will now start with the new seed.
PetscRandomSeed(r) without a call to PetscRandomSetSeed() re-initializes
the seed. The random numbers generated will be the same as before.
See Also
PetscRandomCreate(), PetscRandomGetSeed(), PetscRandomSetSeed()
Level
intermediate
Location
src/sys/classes/random/interface/randomc.c
Examples
src/sys/classes/random/tutorials/ex1.c.html
src/ksp/ksp/tutorials/ex70.c.html
src/snes/tutorials/ex12.c.html
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages