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