Lines Matching refs:p

30   PetscPartitioner_ParMetis *p = (PetscPartitioner_ParMetis *)part->data;
33 PetscCallMPI(MPI_Comm_free(&p->pcomm));
40 PetscPartitioner_ParMetis *p = (PetscPartitioner_ParMetis *)part->data;
44 PetscCall(PetscViewerASCIIPrintf(viewer, "ParMetis type: %s\n", ptypes[p->ptype]));
45 PetscCall(PetscViewerASCIIPrintf(viewer, "load imbalance ratio %g\n", (double)p->imbalanceRatio));
46 PetscCall(PetscViewerASCIIPrintf(viewer, "debug flag %" PetscInt_FMT "\n", p->debugFlag));
47 PetscCall(PetscViewerASCIIPrintf(viewer, "random seed %" PetscInt_FMT "\n", p->randomSeed));
66 PetscPartitioner_ParMetis *p = (PetscPartitioner_ParMetis *)part->data;
70 PetscCall(PetscOptionsEList("-petscpartitioner_parmetis_type", "Partitioning method", "", ptypes, 2, ptypes[p->ptype], &p->ptype, NULL));
71 PetscCall(PetscOptionsReal("-petscpartitioner_parmetis_imbalance_ratio", "Load imbalance ratio limit", "", p->imbalanceRatio, &p->imbalanceRatio, NULL));
72 PetscCall(PetscOptionsInt("-petscpartitioner_parmetis_debug", "Debugging flag", "", p->debugFlag, &p->debugFlag, NULL));
73 PetscCall(PetscOptionsInt("-petscpartitioner_parmetis_seed", "Random seed", "", p->randomSeed, &p->randomSeed, NULL));
97 PetscMPIInt p, size, rank;
108 for (p = 2; p <= size; ++p) {
109 hasempty = (PetscBool)(hasempty || !vtxdist[p - 1] || !vtxdist[p]);
110 vtxdist[p] += vtxdist[p - 1];
120 PetscInt p;
123 for (p = 0; p < nparts; ++p) {
126 PetscCall(PetscSectionGetDof(targetSection, p, &tpd));
128 tpwgts[p] = tpd;
131 for (p = 0, sumt = 0.0; p < nparts; ++p) {
132 tpwgts[p] = (real_t)PetscMax(tpwgts[p], PETSC_SMALL);
133 sumt += tpwgts[p];
135 for (p = 0; p < nparts; ++p) tpwgts[p] /= sumt;
136 for (p = 0, sumt = 0.0; p < nparts - 1; ++p) sumt += tpwgts[p];
140 for (p = 0; p < nparts; ++p) tpwgts[p] = (real_t)(1.0 / nparts);
157 for (p = 0; !vtxdist[p + 1] && p < size; ++p);
158 if (vtxdist[p + 1] == vtxdist[size]) {
159 if (rank == p) {
195 for (p = 0, cnt = 0; p < size; p++) {
196 if (vtxdist[p + 1] != vtxdist[p]) {
197 vtxdist[cnt + 1] = vtxdist[p + 1];
215 for (p = 0, i = 0; p < nparts; ++p) {
217 if (assignment[v] == p) points[i++] = v;
260 PetscPartitioner_ParMetis *p;
264 PetscCall(PetscNew(&p));
265 part->data = p;
267 PetscCallMPI(MPI_Comm_dup(PetscObjectComm((PetscObject)part), &p->pcomm));
268 p->ptype = 0;
269 p->imbalanceRatio = 1.05;
270 p->debugFlag = 0;
271 p->randomSeed = -1; /* defaults to GLOBAL_SEED=15 from `libparmetis/defs.h` */