Lines Matching +full:- +full:r
4 static PetscErrorCode PetscRandomSeed_Rand48(PetscRandom r) in PetscRandomSeed_Rand48() argument
7 srand48(r->seed); in PetscRandomSeed_Rand48()
11 static PetscErrorCode PetscRandomGetValue_Rand48(PetscRandom r, PetscScalar *val) in PetscRandomGetValue_Rand48() argument
15 if (r->iset) { in PetscRandomGetValue_Rand48()
16 …RealPart(r->width) * (PetscReal)drand48() + PetscRealPart(r->low) + (PetscImaginaryPart(r->width) … in PetscRandomGetValue_Rand48()
21 if (r->iset) *val = r->width * drand48() + r->low; in PetscRandomGetValue_Rand48()
27 static PetscErrorCode PetscRandomGetValueReal_Rand48(PetscRandom r, PetscReal *val) in PetscRandomGetValueReal_Rand48() argument
31 if (r->iset) *val = PetscRealPart(r->width) * drand48() + PetscRealPart(r->low); in PetscRandomGetValueReal_Rand48()
34 if (r->iset) *val = r->width * (PetscReal)drand48() + r->low; in PetscRandomGetValueReal_Rand48()
51 PETSCRAND48 - access to the basic Unix `drand48()` random number generator
54 . -random_type <rand,rand48,sprng> - select the random number generator at runtime
64 PETSC_EXTERN PetscErrorCode PetscRandomCreate_Rand48(PetscRandom r) in PetscRandomCreate_Rand48() argument
67 r->ops[0] = PetscRandomOps_Values; in PetscRandomCreate_Rand48()
68 PetscCall(PetscObjectChangeTypeName((PetscObject)r, PETSCRAND48)); in PetscRandomCreate_Rand48()