Lines Matching refs:nparts
78 static PetscErrorCode PetscPartitionerPartition_ParMetis(PetscPartitioner part, PetscInt nparts, PetscInt numVertices, PetscInt start[], PetscInt adjacency[], PetscSection vertSection, PetscSection edgeSection, PetscSection targetSection, PetscSection partSection, IS *partition)
105 PetscCall(PetscMalloc4(size + 1, &vtxdist, nparts * ncon, &tpwgts, ncon, &ubvec, nvtxs, &assignment));
123 for (p = 0; p < nparts; ++p) {
131 for (p = 0, sumt = 0.0; p < nparts; ++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];
137 tpwgts[nparts - 1] = (real_t)(1. - sumt);
140 for (p = 0; p < nparts; ++p) tpwgts[p] = (real_t)(1.0 / nparts);
167 err = METIS_PartGraphRecursive(&nvtxs, &ncon, xadj, adjncy, vwgt, NULL, adjwgt, &nparts, tpwgts, ubvec, options, &part->edgeCut, assignment);
179 err = METIS_PartGraphKway(&nvtxs, &ncon, xadj, adjncy, vwgt, NULL, adjwgt, &nparts, tpwgts, ubvec, options, &part->edgeCut, assignment);
205 err = ParMETIS_V3_PartKway(vtxdist, xadj, adjncy, vwgt, adjwgt, &wgtflag, &numflag, &ncon, &nparts, tpwgts, ubvec, options, &part->edgeCut, assignment, &pcomm);
215 for (p = 0, i = 0; p < nparts; ++p) {