#include "petscsys.h" PetscErrorCode PetscRandomRegister(const char sname[], PetscErrorCode (*function)(PetscRandom))Not Collective Many br
name | - The name of a new user-defined creation routine Many br | |
create_func | - The creation routine itself Many br |
PetscRandomRegister("my_rand", MyPetscRandomtorCreate);Many br
Then, your random type can be chosen with the procedural interface via Many br
PetscRandomCreate(MPI_Comm, PetscRandom *); PetscRandomSetType(PetscRandom,"my_random_name");Many bror at runtime via the option Many br
-random_type my_random_nameMany br
Notes: For an example of the code needed to interface your own random number generator see Many brsrc/sys/random/impls/rand/rand.c Many br
Many br
Level:advanced
Location:src/sys/classes/random/interface/randreg.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages