petsc-3.7.1 2016-05-15
Report Typos and Errors

PetscRandomSetSeed

Sets the random seed. You MUST call PetscRandomSeed() after this call to have the new seed used.

Synopsis

#include "petscsys.h" 
PetscErrorCode  PetscRandomSetSeed(PetscRandom r,unsigned long seed)
Not collective Many br

Input Parameters

r - The random number generator context Many br
seed - The random seed Many br

Many br

Usage

PetscRandomSetSeed(r,a positive integer); Many brPetscRandomSeed(r); PetscRandomGetValue() will now start with the new seed. Many br

PetscRandomSeed(r) without a call to PetscRandomSetSeed() re-initializes Many brthe seed. The random numbers generated will be the same as before. Many br

See Also

PetscRandomCreate(), PetscRandomGetSeed(), PetscRandomSeed()

Level:intermediate
Location:
src/sys/classes/random/interface/randomc.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages