PetscRandomSetOptionsPrefix — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscRandomSetOptionsPrefix

Sets the prefix used for searching for all `PetscRandom` options in the database.

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscRandomSetOptionsPrefix(PetscRandom r, const char prefix[])

Logically Collective

## Input Parameters

- r - the random number generator context

- prefix - the prefix to prepend to all option names

## Note

A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.

## See Also

`PetscRandom`, `PetscRandomSetFromOptions()`

## Level

advanced

## Location

src/sys/classes/random/interface/randomc.c

## Examples

src/ts/tutorials/ex30.c

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