Lines Matching +full:- +full:r
3 static PetscErrorCode PetscRandomSeed_Rand(PetscRandom r) in PetscRandomSeed_Rand() argument
6 srand((unsigned int)r->seed); in PetscRandomSeed_Rand()
11 static PetscErrorCode PetscRandomGetValue_Rand(PetscRandom r, PetscScalar *val) in PetscRandomGetValue_Rand() argument
15 …if (r->iset) *val = PetscRealPart(r->width) * RAND_WRAP + PetscRealPart(r->low) + (PetscImaginaryP… in PetscRandomGetValue_Rand()
18 if (r->iset) *val = r->width * RAND_WRAP + r->low; in PetscRandomGetValue_Rand()
24 static PetscErrorCode PetscRandomGetValueReal_Rand(PetscRandom r, PetscReal *val) in PetscRandomGetValueReal_Rand() argument
28 if (r->iset) *val = PetscRealPart(r->width) * RAND_WRAP + PetscRealPart(r->low); in PetscRandomGetValueReal_Rand()
31 if (r->iset) *val = r->width * RAND_WRAP + r->low; in PetscRandomGetValueReal_Rand()
48 PETSCRAND - access to the basic Unix random number generator
51 . -random_type <rand,rand48,sprng> - set the random number generator from the options database
61 PETSC_EXTERN PetscErrorCode PetscRandomCreate_Rand(PetscRandom r) in PetscRandomCreate_Rand() argument
64 r->ops[0] = PetscRandomOps_Values; in PetscRandomCreate_Rand()
65 PetscCall(PetscObjectChangeTypeName((PetscObject)r, PETSCRAND)); in PetscRandomCreate_Rand()