Home
last modified time | relevance | path

Searched refs:sumw (Results 1 – 2 of 2) sorted by relevance

/petsc/src/dm/partitioner/impls/simple/
H A Dpartsimple.c121 PetscInt np, *tpwgts = NULL, sumw = 0, numVerticesGlobal = 0; in PetscPartitionerPartition_Simple() local
137 sumw += tpwgts[np]; in PetscPartitionerPartition_Simple()
139 if (sumw) { in PetscPartitionerPartition_Simple()
141 for (np = 0; np < nparts; ++np) tpwgts[np] = (tpwgts[np] * numVerticesGlobal) / sumw; in PetscPartitionerPartition_Simple()
142 for (np = 0, m = -1, mp = 0, sumw = 0; np < nparts; ++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()
/petsc/src/dm/partitioner/impls/ptscotch/
H A Dpartptscotch.c249 PetscInt sumw; in PetscPartitionerPartition_PTScotch() local
252 for (p = 0, sumw = 0; p < nparts; ++p) { in PetscPartitionerPartition_PTScotch()
254 sumw += tpwgts[p]; in PetscPartitionerPartition_PTScotch()
256 if (!sumw) PetscCall(PetscFree(tpwgts)); in PetscPartitionerPartition_PTScotch()