PetscRandomSetInterval

Sets the interval over which the random numbers will be randomly distributed. By default, this interval is [0,1).

Synopsis

int PetscRandomSetInterval(PetscRandom r,Scalar low,Scalar high)
Collective on PetscRandom

Input Parameters

r -the random number generator context

Example of Usage

      PetscRandomCreate(PETSC_COMM_WORLD,RANDOM_DEFAULT,&r);
      PetscRandomSetInterval(RANDOM_DEFAULT,&r);
      PetscRandomGetValue(r,&value1);
      PetscRandomGetValue(r,&value2);
      PetscRandomDestroy(r);

Keywords

random, set, interval

See Also

PetscRandomCreate()

Location: src/sys/src/utilsrandom.c
System Index
Table of Contents