Actual source code: randomimpl.h
petsc-3.10.5 2019-03-28
5: #include <petsc/private/petscimpl.h>
7: PETSC_EXTERN PetscBool PetscRandomRegisterAllCalled;
8: PETSC_EXTERN PetscErrorCode PetscRandomRegisterAll(void);
10: typedef struct _PetscRandomOps *PetscRandomOps;
11: struct _PetscRandomOps {
12: /* 0 */
13: PetscErrorCode (*seed)(PetscRandom);
14: PetscErrorCode (*getvalue)(PetscRandom,PetscScalar*);
15: PetscErrorCode (*getvaluereal)(PetscRandom,PetscReal*);
16: PetscErrorCode (*destroy)(PetscRandom);
17: PetscErrorCode (*setfromoptions)(PetscOptionItems*,PetscRandom);
18: };
20: struct _p_PetscRandom {
21: PETSCHEADER(struct _PetscRandomOps);
22: void *data; /* implementation-specific data */
23: unsigned long seed;
24: PetscScalar low,width; /* lower bound and width of the interval over
25: which the random numbers are distributed */
26: PetscBool iset; /* if true, indicates that the user has set the interval */
27: /* array for shuffling ??? */
28: };
30: #endif