Lines Matching refs:r

32 PetscErrorCode PetscRandomDestroy(PetscRandom *r)  in PetscRandomDestroy()  argument
35 if (!*r) PetscFunctionReturn(PETSC_SUCCESS); in PetscRandomDestroy()
36 PetscValidHeaderSpecific(*r, PETSC_RANDOM_CLASSID, 1); in PetscRandomDestroy()
37 if (--((PetscObject)*r)->refct > 0) { in PetscRandomDestroy()
38 *r = NULL; in PetscRandomDestroy()
41 PetscTryTypeMethod(*r, destroy); in PetscRandomDestroy()
42 PetscCall(PetscHeaderDestroy(r)); in PetscRandomDestroy()
61 PetscErrorCode PetscRandomGetSeed(PetscRandom r, PetscInt64 *seed) in PetscRandomGetSeed() argument
64 PetscValidHeaderSpecific(r, PETSC_RANDOM_CLASSID, 1); in PetscRandomGetSeed()
67 *seed = (PetscInt64)r->seed; in PetscRandomGetSeed()
95 PetscErrorCode PetscRandomSetSeed(PetscRandom r, PetscInt64 seed) in PetscRandomSetSeed() argument
98 PetscValidHeaderSpecific(r, PETSC_RANDOM_CLASSID, 1); in PetscRandomSetSeed()
99 r->seed = (unsigned long)seed; in PetscRandomSetSeed()
214 PetscErrorCode PetscRandomSetOptionsPrefix(PetscRandom r, const char prefix[]) in PetscRandomSetOptionsPrefix() argument
217 PetscValidHeaderSpecific(r, PETSC_RANDOM_CLASSID, 1); in PetscRandomSetOptionsPrefix()
218 PetscCall(PetscObjectSetOptionsPrefix((PetscObject)r, prefix)); in PetscRandomSetOptionsPrefix()
353 PetscErrorCode PetscRandomCreate(MPI_Comm comm, PetscRandom *r) in PetscRandomCreate() argument
359 PetscAssertPointer(r, 2); in PetscRandomCreate()
370 *r = rr; in PetscRandomCreate()
396 PetscErrorCode PetscRandomSeed(PetscRandom r) in PetscRandomSeed() argument
399 PetscValidHeaderSpecific(r, PETSC_RANDOM_CLASSID, 1); in PetscRandomSeed()
400 PetscValidType(r, 1); in PetscRandomSeed()
402 PetscUseTypeMethod(r, seed); in PetscRandomSeed()
403 PetscCall(PetscObjectStateIncrease((PetscObject)r)); in PetscRandomSeed()