| /petsc/src/sys/classes/random/impls/rander48/ |
| H A D | rander48.c | 4 unsigned short seed[3]; member 22 accu = (unsigned long)r48->mult[0] * (unsigned long)r48->seed[0] + (unsigned long)r48->add; in _dorander48() 25 …ned long)r48->mult[0] * (unsigned long)r48->seed[1] + (unsigned long)r48->mult[1] * (unsigned long… in _dorander48() 28 …ned long)r48->mult[0] * r48->seed[2] + (unsigned long)r48->mult[1] * r48->seed[1] + (unsigned long… in _dorander48() 29 r48->seed[0] = temp[0]; in _dorander48() 30 r48->seed[1] = temp[1]; in _dorander48() 31 r48->seed[2] = (unsigned short)accu; in _dorander48() 32 …return ldexp((double)r48->seed[0], -48) + ldexp((double)r48->seed[1], -32) + ldexp((double)r48->se… in _dorander48() 40 r48->seed[0] = RANDER48_SEED_0; in PetscRandomSeed_Rander48() 41 r48->seed[1] = (unsigned short)r->seed; in PetscRandomSeed_Rander48() [all …]
|
| /petsc/src/sys/classes/random/interface/ |
| H A D | randomc.c | 61 PetscErrorCode PetscRandomGetSeed(PetscRandom r, PetscInt64 *seed) in PetscRandomGetSeed() argument 65 if (seed) { in PetscRandomGetSeed() 66 PetscAssertPointer(seed, 2); in PetscRandomGetSeed() 67 *seed = (PetscInt64)r->seed; in PetscRandomGetSeed() 95 PetscErrorCode PetscRandomSetSeed(PetscRandom r, PetscInt64 seed) in PetscRandomSetSeed() argument 99 r->seed = (unsigned long)seed; in PetscRandomSetSeed() 100 PetscCall(PetscInfo(NULL, "Setting seed to %d\n", (int)seed)); in PetscRandomSetSeed() 162 PetscInt seed; in PetscRandomSetFromOptions() local 174 …t("-random_seed", "Seed to use to generate random numbers", "PetscRandomSetSeed", 0, &seed, &set)); in PetscRandomSetFromOptions() 176 PetscCall(PetscRandomSetSeed(rnd, (unsigned long int)seed)); in PetscRandomSetFromOptions() [all …]
|
| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | Random.pyx | 167 """Return the random number generator seed. 176 cdef PetscInt64 seed = 0 177 CHKERR(PetscRandomGetSeed(self.rnd, &seed)) 178 return seed 180 def setSeed(self, seed: int | None = None) -> None: 181 """Set the seed of random number generator. 187 seed 188 The value for the seed. If `None`, it only seeds the generator. 195 if seed is not None: 196 CHKERR(PetscRandomSetSeed(self.rnd, seed)) [all …]
|
| /petsc/src/dm/impls/plex/tests/output/ |
| H A D | ex12_lb_0_ms.out | 23 random seed -1 34 random seed -1 45 random seed -1
|
| H A D | ex1_part_parmetis_0.out | 16 random seed -1 48 random seed -1
|
| /petsc/src/dm/partitioner/tests/output/ |
| H A D | ex33_parmetis_nsize-1_nparts-2.out | 11 random seed -1 34 random seed -1 61 random seed -1
|
| H A D | ex33_parmetis_nsize-1_nparts-1.out | 11 random seed -1 33 random seed -1 59 random seed -1
|
| H A D | ex33_parmetis_nsize-1_nparts-3.out | 11 random seed -1 35 random seed -1 63 random seed -1
|
| H A D | ex33_parmetis_nsize-2_nparts-1.out | 12 random seed -1 38 random seed -1 68 random seed -1
|
| H A D | ex33_parmetis_nsize-2_nparts-2.out | 12 random seed -1 40 random seed -1 72 random seed -1
|
| H A D | ex33_parmetis_nsize-2_nparts-3.out | 12 random seed -1 42 random seed -1 76 random seed -1
|
| H A D | ex33_parmetis_nsize-3_nparts-2.out | 13 random seed -1 46 random seed -1 87 random seed -1
|
| H A D | ex33_parmetis_nsize-3_nparts-1.out | 13 random seed -1 43 random seed -1 81 random seed -1
|
| H A D | ex33_parmetis_nsize-3_nparts-3.out | 13 random seed -1 49 random seed -1 93 random seed -1
|
| /petsc/include/petsc/private/ |
| H A D | randomimpl.h | 11 PetscErrorCode (*seed)(PetscRandom); member 23 unsigned long seed; member
|
| H A D | hashtable.h | 247 static inline PetscHash_t PetscHashCombine(PetscHash_t seed, PetscHash_t hash) in PetscHashCombine() argument 251 return seed ^ (hash + (seed << 6) + (seed >> 2)); in PetscHashCombine()
|
| /petsc/src/sys/classes/random/impls/sprng/ |
| H A D | sprng.c | 12 init_sprng(r->seed, SPRNG_DEFAULT); in PetscRandomSeed_Sprng() 46 PetscDesignatedInitializer(seed, PetscRandomSeed_Sprng),
|
| /petsc/src/sys/classes/random/impls/rand/ |
| H A D | rand.c | 6 srand((unsigned int)r->seed); in PetscRandomSeed_Rand() 38 PetscDesignatedInitializer(seed, PetscRandomSeed_Rand),
|
| /petsc/src/sys/classes/random/impls/rand48/ |
| H A D | rand48.c | 7 srand48(r->seed); in PetscRandomSeed_Rand48() 41 PetscDesignatedInitializer(seed, PetscRandomSeed_Rand48),
|
| /petsc/src/dm/partitioner/impls/chaco/ |
| H A D | partchaco.c | 37 … int global_method, int local_method, int rqi_flag, int vmax, int ndims, double eigtol, long seed); 66 long seed = 123636512; /* for random graph mutations */ in PetscPartitionerPartition_Chaco() local 116 …ure, ndims_tot, mesh_dims, goal, global_method, local_method, rqi_flag, vmax, ndims, eigtol, seed); in PetscPartitionerPartition_Chaco()
|
| /petsc/src/sys/classes/random/impls/curand/ |
| H A D | curand.c | 14 PetscCallCURAND(curandSetPseudoRandomGeneratorSeed(curand->gen, r->seed)); in PetscRandomSeed_CURAND() 58 PetscDesignatedInitializer(seed, PetscRandomSeed_CURAND),
|
| /petsc/src/dm/tests/output/ |
| H A D | ex8_glvis.out | 1 Hello from rank 0 -> vector name seed, size 1
|
| /petsc/src/ksp/ksp/tutorials/network/ |
| H A D | ex2.c | 37 …t nvertex, PetscInt *pnbranch, Node **pnode, Branch **pbranch, PetscInt **pedgelist, PetscInt seed) in random_network() argument 53 PetscCall(PetscRandomSetSeed(rnd, seed)); in random_network() 267 PetscInt seed = 0, nnode = 0; in main() local 284 PetscCall(PetscOptionsGetInt(NULL, NULL, "-seed", &seed, NULL)); in main() 295 PetscCall(random_network(nnode, &nbranch, &node, &branch, &edgelist, seed)); in main()
|
| /petsc/src/sys/classes/random/tests/output/ |
| H A D | ex3_1.out | 5 [0] Random type rander48, seed 305419896
|
| /petsc/src/dm/impls/plex/tutorials/ |
| H A D | ex20.c | 192 unsigned long seed = 123456789; in main() local 201 seed = (1103515245 * seed + 12345) % 2147483648; in main() 202 noise = (PetscReal)seed / 2147483648.0; in main()
|