Lines Matching defs:numPoints

4013 static PetscErrorCode DMPlexGetTransitiveClosure_Depth1_Private(DM dm, PetscInt p, PetscInt ornt, PetscBool useCone, PetscInt *numPoints, PetscInt *points[])
4055 if (numPoints) *numPoints = tmpSize + 1;
4061 static PetscErrorCode DMPlexTransitiveClosure_Tensor_Internal(DM dm, PetscInt point, DMPolytopeType ct, PetscInt o, PetscBool useCone, PetscInt *numPoints, PetscInt **points)
4125 *numPoints = c / 2;
4130 PetscErrorCode DMPlexGetTransitiveClosure_Internal(DM dm, PetscInt p, PetscInt ornt, PetscBool useCone, PetscInt *numPoints, PetscInt *points[])
4141 PetscCall(DMPlexGetTransitiveClosure_Depth1_Private(dm, p, ornt, useCone, numPoints, points));
4147 PetscCall(DMPlexTransitiveClosure_Tensor_Internal(dm, p, ct, ornt, useCone, numPoints, points));
4200 if (numPoints) *numPoints = closureSize / 2;
4221 . numPoints - The number of points in the closure, so `points` is of size 2*`numPoints`
4235 Pass `PETSC_NULL_INTEGER` for `numPoints` if it is not needed
4239 PetscErrorCode DMPlexGetTransitiveClosure(DM dm, PetscInt p, PetscBool useCone, PetscInt *numPoints, PetscInt *points[])
4243 if (numPoints) PetscAssertPointer(numPoints, 4);
4250 PetscCall(DMPlexGetTransitiveClosure_Internal(dm, p, 0, useCone, numPoints, points));
4263 . numPoints - The number of points in the closure, so points[] is of size 2*`numPoints`
4273 PetscErrorCode DMPlexRestoreTransitiveClosure(DM dm, PetscInt p, PetscBool useCone, PetscInt *numPoints, PetscInt *points[])
4277 if (numPoints) *numPoints = 0;
4823 . numPoints - The number of input points for the join
4843 PetscErrorCode DMPlexGetJoin(DM dm, PetscInt numPoints, const PetscInt points[], PetscInt *numCoveredPoints, const PetscInt *coveredPoints[])
4864 for (p = 1; p < numPoints; ++p) {
4895 . numPoints - The number of input points for the join
4914 PetscErrorCode DMPlexRestoreJoin(DM dm, PetscInt numPoints, const PetscInt points[], PetscInt *numCoveredPoints, const PetscInt *coveredPoints[])
4933 . numPoints - The number of input points for the join
4934 - points - The input points, its length is `numPoints`
4949 PetscErrorCode DMPlexGetFullJoin(DM dm, PetscInt numPoints, const PetscInt points[], PetscInt *numCoveredPoints, const PetscInt *coveredPoints[])
4963 PetscCall(PetscCalloc1(numPoints, &closures));
4964 PetscCall(DMGetWorkArray(dm, numPoints * (depth + 2), MPIU_INT, &offsets));
4970 for (p = 0; p < numPoints; ++p) {
4997 for (p = 1; p < numPoints && joinSize; ++p) {
5018 for (p = 0; p < numPoints; ++p) PetscCall(DMPlexRestoreTransitiveClosure(dm, points[p], PETSC_FALSE, NULL, &closures[p]));
5020 PetscCall(DMRestoreWorkArray(dm, numPoints * (depth + 2), MPIU_INT, &offsets));
5032 . numPoints - The number of input points for the meet
5033 - points - The input points, of length `numPoints`
5052 PetscErrorCode DMPlexGetMeet(DM dm, PetscInt numPoints, const PetscInt points[], PetscInt *numCoveringPoints, const PetscInt *coveringPoints[])
5073 for (p = 1; p < numPoints; ++p) {
5104 . numPoints - The number of input points for the meet
5115 PetscErrorCode DMPlexRestoreMeet(DM dm, PetscInt numPoints, const PetscInt points[], PetscInt *numCoveredPoints, const PetscInt *coveredPoints[])
5134 . numPoints - The number of input points for the meet
5135 - points - The input points, of length `numPoints`
5151 PetscErrorCode DMPlexGetFullMeet(DM dm, PetscInt numPoints, const PetscInt points[], PetscInt *numCoveredPoints, const PetscInt *coveredPoints[])
5165 PetscCall(PetscMalloc1(numPoints, &closures));
5166 PetscCall(DMGetWorkArray(dm, numPoints * (height + 2), MPIU_INT, &offsets));
5172 for (p = 0; p < numPoints; ++p) {
5199 for (p = 1; p < numPoints && meetSize; ++p) {
5220 for (p = 0; p < numPoints; ++p) PetscCall(DMPlexRestoreTransitiveClosure(dm, points[p], PETSC_TRUE, NULL, &closures[p]));
5222 PetscCall(DMRestoreWorkArray(dm, numPoints * (height + 2), MPIU_INT, &offsets));
6348 PetscInt pStart, pEnd, p, numPoints, size = 0, offset = 0;
6352 PetscCall(DMPlexGetConeSize(dm, point, &numPoints));
6362 for (p = 0; p < numPoints; ++p) {
6390 for (p = 0; p < numPoints; ++p) {
6419 static inline PetscErrorCode CompressPoints_Private(PetscSection section, PetscInt *numPoints, PetscInt points[])
6421 const PetscInt np = *numPoints;
6433 *numPoints = q;
6438 PetscErrorCode DMPlexGetCompressedClosure(DM dm, PetscSection section, PetscInt point, PetscInt ornt, PetscInt *numPoints, PetscInt **points, PetscSection *clSec, IS *clPoints, const PetscInt **clp)
6457 *numPoints = np;
6463 PetscErrorCode DMPlexRestoreCompressedClosure(DM dm, PetscSection section, PetscInt point, PetscInt *numPoints, PetscInt **points, PetscSection *clSec, IS *clPoints, const PetscInt **clp)
6467 PetscCall(DMPlexRestoreTransitiveClosure(dm, point, PETSC_TRUE, numPoints, points));
6471 *numPoints = 0;
6479 static inline PetscErrorCode DMPlexVecGetClosure_Static(DM dm, PetscSection section, PetscInt numPoints, const PetscInt points[], const PetscInt clperm[], const PetscScalar vArray[], PetscInt *size, PetscScalar array[])
6487 PetscCall(PetscSectionGetPointSyms(section, numPoints, points, &perms, &flips));
6488 for (p = 0; p < numPoints; p++) {
6519 PetscCall(PetscSectionRestorePointSyms(section, numPoints, points, &perms, &flips));
6524 static inline PetscErrorCode DMPlexVecGetClosure_Fields_Static(DM dm, PetscSection section, PetscInt numPoints, const PetscInt points[], PetscInt numFields, const PetscInt clperm[], const PetscScalar vArray[], PetscInt *size, PetscScalar array[])
6535 PetscCall(PetscSectionGetFieldPointSyms(section, f, numPoints, points, &perms, &flips));
6536 for (p = 0; p < numPoints; p++) {
6567 PetscCall(PetscSectionRestoreFieldPointSyms(section, f, numPoints, points, &perms, &flips));
6616 PetscInt depth, numFields, numPoints, asize;
6630 PetscCall(DMPlexGetCompressedClosure(dm, section, point, ornt, &numPoints, &points, &clSection, &clPoints, &clp));
6633 for (PetscInt p = 0; p < numPoints * 2; p += 2) {
6648 if (numFields > 0) PetscCall(DMPlexVecGetClosure_Fields_Static(dm, section, numPoints, points, numFields, perm, vArray, &size, *values));
6649 else PetscCall(DMPlexVecGetClosure_Static(dm, section, numPoints, points, perm, vArray, &size, *values));
6656 PetscCall(DMPlexRestoreCompressedClosure(dm, section, point, &numPoints, &points, &clSection, &clPoints, &clp));
6797 PetscInt mdepth, numFields, numPoints, Np = 0, p, clsize, size;
6812 PetscCall(DMPlexGetCompressedClosure(dm, section, point, 0, &numPoints, &points, &clSection, &clPoints, &clp));
6820 for (p = 0; p < numPoints * 2; p += 2) {
6838 PetscCall(DMPlexRestoreCompressedClosure(dm, section, point, &numPoints, &points, &clSection, &clPoints, &clp));
6851 PetscCall(DMPlexRestoreCompressedClosure(dm, section, point, &numPoints, &points, &clSection, &clPoints, &clp));
7215 PetscInt pStart, pEnd, p, numPoints, off, dof;
7219 PetscCall(DMPlexGetConeSize(dm, point, &numPoints));
7223 for (p = 0, off = 0; p <= numPoints; ++p, off += dof) {
7301 PetscInt depth, numFields, numPoints, p, clsize;
7315 PetscCall(DMPlexGetCompressedClosure(dm, section, point, 0, &numPoints, &points, &clSection, &clPoints, &clp));
7316 for (clsize = 0, p = 0; p < numPoints; p++) {
7331 PetscCall(PetscSectionGetFieldPointSyms(section, f, numPoints, points, &perms, &flips));
7334 for (p = 0; p < numPoints; p++) {
7342 for (p = 0; p < numPoints; p++) {
7350 for (p = 0; p < numPoints; p++) {
7358 for (p = 0; p < numPoints; p++) {
7366 for (p = 0; p < numPoints; p++) {
7374 for (p = 0; p < numPoints; p++) {
7384 PetscCall(PetscSectionRestoreFieldPointSyms(section, f, numPoints, points, &perms, &flips));
7391 PetscCall(PetscSectionGetPointSyms(section, numPoints, points, &perms, &flips));
7394 for (p = 0, off = 0; p < numPoints; p++, off += dof) {
7403 for (p = 0, off = 0; p < numPoints; p++, off += dof) {
7412 for (p = 0, off = 0; p < numPoints; p++, off += dof) {
7421 for (p = 0, off = 0; p < numPoints; p++, off += dof) {
7430 for (p = 0, off = 0; p < numPoints; p++, off += dof) {
7439 for (p = 0, off = 0; p < numPoints; p++, off += dof) {
7450 PetscCall(PetscSectionRestorePointSyms(section, numPoints, points, &perms, &flips));
7453 PetscCall(DMPlexRestoreCompressedClosure(dm, section, point, &numPoints, &points, &clSection, &clPoints, &clp));
7485 PetscInt numFields, numPoints, p;
7495 PetscCall(DMPlexGetCompressedClosure(dm, section, point, 0, &numPoints, &points, &clSection, &clPoints, &clp));
7505 for (p = 0; p < numPoints * 2; p += 2) {
7512 PetscCall(PetscSectionGetFieldPointSyms(section, f, numPoints, points, &perms, &flips));
7515 for (p = 0; p < numPoints; p++) {
7525 for (p = 0; p < numPoints; p++) {
7535 for (p = 0; p < numPoints; p++) {
7545 for (p = 0; p < numPoints; p++) {
7555 for (p = 0; p < numPoints; p++) {
7567 PetscCall(PetscSectionRestoreFieldPointSyms(section, f, numPoints, points, &perms, &flips));
7570 PetscCall(DMPlexRestoreCompressedClosure(dm, section, point, &numPoints, &points, &clSection, &clPoints, &clp));
7838 PETSC_INTERN PetscErrorCode DMPlexAnchorsGetSubMatModification(DM dm, PetscSection section, PetscInt numPoints, PetscInt numIndices, const PetscInt points[], const PetscInt ***perms, PetscInt *outNumPoints, PetscInt *outNumIndices, PetscInt *outPoints[], PetscInt offsets[], PetscScalar *outMat[])
7873 for (p = 0; p < 2 * numPoints; p += 2) {
7957 for (PetscInt p = 0, newP = 0; p < numPoints; p++) {
7996 PetscCall(DMPlexAnchorsGetSubMatIndices(numPoints, points, section, cSec, tmpIndices, oldOffsetsCopy, indices, perms));
8006 for (PetscInt p = 0, o = fStart, oNew = fNewStart; p < numPoints; p++) {
8068 PETSC_INTERN PetscErrorCode DMPlexAnchorsModifyMat_Internal(DM dm, PetscSection section, PetscInt numPoints, PetscInt numIndices, const PetscInt points[], const PetscInt ***perms, PetscInt numRows, PetscInt numCols, const PetscScalar values[], PetscInt *outNumPoints, PetscInt *outNumIndices, PetscInt *outPoints[], PetscScalar *outValues[], PetscInt offsets[], PetscBool multiplyRight, PetscBool multiplyLeft)
8076 PetscCall(DMPlexAnchorsGetSubMatModification(dm, section, numPoints, numIndices, points, perms, outNumPoints, &newNumIndices, outPoints, offsets, outValues ? &modMat : NULL));
8120 PETSC_INTERN PetscErrorCode DMPlexAnchorsModifyMat(DM dm, PetscSection section, PetscInt numPoints, PetscInt numIndices, const PetscInt points[], const PetscInt ***perms, const PetscScalar values[], PetscInt *outNumPoints, PetscInt *outNumIndices, PetscInt *outPoints[], PetscScalar *outValues[], PetscInt offsets[], PetscBool multiplyLeft)
8123 PetscCall(DMPlexAnchorsModifyMat_Internal(dm, section, numPoints, numIndices, points, perms, numIndices, numIndices, values, outNumPoints, outNumIndices, outPoints, outValues, offsets, PETSC_TRUE, multiplyLeft));