Lines Matching refs:rnd

116 static PetscErrorCode PetscRandomSetTypeFromOptions_Private(PetscRandom rnd, PetscOptionItems Petsc…  in PetscRandomSetTypeFromOptions_Private()  argument
123 if (((PetscObject)rnd)->type_name) { in PetscRandomSetTypeFromOptions_Private()
124 defaultType = ((PetscObject)rnd)->type_name; in PetscRandomSetTypeFromOptions_Private()
132 PetscCall(PetscRandomSetType(rnd, typeName)); in PetscRandomSetTypeFromOptions_Private()
134 PetscCall(PetscRandomSetType(rnd, defaultType)); in PetscRandomSetTypeFromOptions_Private()
159 PetscErrorCode PetscRandomSetFromOptions(PetscRandom rnd) in PetscRandomSetFromOptions() argument
165 PetscValidHeaderSpecific(rnd, PETSC_RANDOM_CLASSID, 1); in PetscRandomSetFromOptions()
167 PetscObjectOptionsBegin((PetscObject)rnd); in PetscRandomSetFromOptions()
170 PetscCall(PetscRandomSetTypeFromOptions_Private(rnd, PetscOptionsObject)); in PetscRandomSetFromOptions()
173 PetscTryTypeMethod(rnd, setfromoptions, PetscOptionsObject); in PetscRandomSetFromOptions()
176 PetscCall(PetscRandomSetSeed(rnd, (unsigned long int)seed)); in PetscRandomSetFromOptions()
177 PetscCall(PetscRandomSeed(rnd)); in PetscRandomSetFromOptions()
184 PetscCall(PetscRandomGetInterval(rnd, &low, &high)); in PetscRandomSetFromOptions()
187 PetscCall(PetscRandomSetInterval(rnd, low, high)); in PetscRandomSetFromOptions()
192 PetscCall(PetscRandomViewFromOptions(rnd, NULL, "-random_view")); in PetscRandomSetFromOptions()
269 PetscErrorCode PetscRandomView(PetscRandom rnd, PetscViewer viewer) in PetscRandomView() argument
277 PetscValidHeaderSpecific(rnd, PETSC_RANDOM_CLASSID, 1); in PetscRandomView()
278 PetscValidType(rnd, 1); in PetscRandomView()
279 if (!viewer) PetscCall(PetscViewerASCIIGetStdout(PetscObjectComm((PetscObject)rnd), &viewer)); in PetscRandomView()
281 PetscCheckSameComm(rnd, 1, viewer, 2); in PetscRandomView()
288 PetscCall(PetscObjectPrintClassNamePrefixType((PetscObject)rnd, viewer)); in PetscRandomView()
289 PetscCallMPI(MPI_Comm_rank(PetscObjectComm((PetscObject)rnd), &rank)); in PetscRandomView()
291 …Printf(viewer, "[%d] Random type %s, seed %lu\n", rank, ((PetscObject)rnd)->type_name, rnd->seed)); in PetscRandomView()
299 PetscCall(PetscObjectGetName((PetscObject)rnd, &name)); in PetscRandomView()
301 if (!((PetscObject)rnd)->amsmem && rank == 0) { in PetscRandomView()
304 PetscCall(PetscObjectViewSAWs((PetscObject)rnd, viewer)); in PetscRandomView()
306 PetscCallSAWs(SAWs_Register, (dir, &rnd->low, 1, SAWs_READ, SAWs_DOUBLE)); in PetscRandomView()