Lines Matching refs:tpwgts
121 PetscInt np, *tpwgts = NULL, sumw = 0, numVerticesGlobal = 0; in PetscPartitionerPartition_Simple() local
134 PetscCall(PetscCalloc1(nparts, &tpwgts)); in PetscPartitionerPartition_Simple()
136 PetscCall(PetscSectionGetDof(targetSection, np, &tpwgts[np])); in PetscPartitionerPartition_Simple()
137 sumw += tpwgts[np]; in PetscPartitionerPartition_Simple()
141 for (np = 0; np < nparts; ++np) tpwgts[np] = (tpwgts[np] * numVerticesGlobal) / sumw; in PetscPartitionerPartition_Simple()
143 if (m < tpwgts[np]) { in PetscPartitionerPartition_Simple()
144 m = tpwgts[np]; in PetscPartitionerPartition_Simple()
147 sumw += tpwgts[np]; in PetscPartitionerPartition_Simple()
149 if (sumw != numVerticesGlobal) tpwgts[mp] += numVerticesGlobal - sumw; in PetscPartitionerPartition_Simple()
151 if (!sumw) PetscCall(PetscFree(tpwgts)); in PetscPartitionerPartition_Simple()
156 if (tpwgts) { in PetscPartitionerPartition_Simple()
157 for (np = 0; np < nparts; ++np) PetscCall(PetscSectionSetDof(partSection, np, tpwgts[np])); in PetscPartitionerPartition_Simple()
162 if (tpwgts) { in PetscPartitionerPartition_Simple()
174 for (j = 0; j < tpwgts[np]; j++) PetscCall(VecSetValue(v, st + j, np, INSERT_VALUES)); in PetscPartitionerPartition_Simple()
176 st += tpwgts[np]; in PetscPartitionerPartition_Simple()
234 PetscCall(PetscFree(tpwgts)); in PetscPartitionerPartition_Simple()