Lines Matching refs:nparts

44 static PetscErrorCode PetscPartitionerPartition_Simple_Grid(PetscPartitioner part, PetscInt nparts,…  in PetscPartitionerPartition_Simple_Grid()  argument
61 …PetscCheck(nparts == Np, comm, PETSC_ERR_ARG_INCOMP, "Number of partitions %" PetscInt_FMT " != %"… in PetscPartitionerPartition_Simple_Grid()
62 …PetscCheck(nparts == size, comm, PETSC_ERR_ARG_INCOMP, "Number of partitions %" PetscInt_FMT " != … in PetscPartitionerPartition_Simple_Grid()
63nparts == 0, comm, PETSC_ERR_ARG_INCOMP, "Number of cells %" PetscInt_FMT " is not divisible by nu… in PetscPartitionerPartition_Simple_Grid()
65 Nr = numVertices / nparts; in PetscPartitionerPartition_Simple_Grid()
78 …for (np = 0; np < nparts; ++np) PetscCall(PetscSectionSetDof(partSection, np, numVertices / nparts in PetscPartitionerPartition_Simple_Grid()
80 PetscCall(PetscCalloc1(nparts, &offsets)); in PetscPartitionerPartition_Simple_Grid()
81 for (np = 0; np < nparts; ++np) PetscCall(PetscSectionGetOffset(partSection, np, &offsets[np])); in PetscPartitionerPartition_Simple_Grid()
111nparts; ++np) PetscCheck(offsets[np] - offsets[np - 1] == numVertices / nparts, PETSC_COMM_SELF, P… in PetscPartitionerPartition_Simple_Grid()
117 static PetscErrorCode PetscPartitionerPartition_Simple(PetscPartitioner part, PetscInt nparts, Pets… in PetscPartitionerPartition_Simple() argument
126 …PetscCall(PetscPartitionerPartition_Simple_Grid(part, nparts, numVertices, start, adjacency, vertS… in PetscPartitionerPartition_Simple()
134 PetscCall(PetscCalloc1(nparts, &tpwgts)); in PetscPartitionerPartition_Simple()
135 for (np = 0; np < nparts; ++np) { 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()
157 for (np = 0; np < nparts; ++np) PetscCall(PetscSectionSetDof(partSection, np, tpwgts[np])); in PetscPartitionerPartition_Simple()
159 …for (np = 0; np < nparts; ++np) PetscCall(PetscSectionSetDof(partSection, np, numVertices / nparts in PetscPartitionerPartition_Simple()
172 for (np = 0, st = 0; np < nparts; ++np) { in PetscPartitionerPartition_Simple()
173 if (rank == np || (rank == size - 1 && size < nparts && np >= size)) { in PetscPartitionerPartition_Simple()
200 PetscInt rem = nvGlobal % nparts; in PetscPartitionerPartition_Simple()
201 PetscInt pSmall = nvGlobal / nparts; in PetscPartitionerPartition_Simple()
202 PetscInt pBig = nvGlobal / nparts + 1; in PetscPartitionerPartition_Simple()
219 firstPart = myFirst / (nvGlobal / nparts); in PetscPartitionerPartition_Simple()
220 lastPart = myLast / (nvGlobal / nparts); in PetscPartitionerPartition_Simple()
224 PetscInt PartStart = np * (nvGlobal / nparts) + PetscMin(nvGlobal % nparts, np); in PetscPartitionerPartition_Simple()
225 PetscInt PartEnd = (np + 1) * (nvGlobal / nparts) + PetscMin(nvGlobal % nparts, np + 1); in PetscPartitionerPartition_Simple()