PetscRandomType — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscRandomType

String with the name of a PETSc randomizer

## Synopsis

    typedef const char *PetscRandomType;
    #define PETSCRAND      "rand"
    #define PETSCRAND48    "rand48"
    #define PETSCSPRNG     "sprng"
    #define PETSCRANDER48  "rander48"
    #define PETSCRANDOM123 "random123"
    #define PETSCCURAND    "curand"

## Note

To use `PETSCSPRNG` or `PETSCRANDOM123` you must have ./configure PETSc with the option `--download-sprng` or `--download-random123`. We recommend the default provided with PETSc.

## See Also

`PetscRandomSetType()`, `PetscRandom`, `PetscRandomCreate()`

## Level

beginner

## Location

include/petscsys.h

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages