Lines Matching refs:depthShift

489 static inline PetscErrorCode DMPlexShiftPointSetUp_Internal(PetscInt depth, PetscInt depthShift[])  in DMPlexShiftPointSetUp_Internal()  argument
497 PetscInt firstStart = depthShift[2 * d]; in DMPlexShiftPointSetUp_Internal()
501 if (depthShift[2 * e] < firstStart) { in DMPlexShiftPointSetUp_Internal()
503 firstStart = depthShift[2 * d]; in DMPlexShiftPointSetUp_Internal()
510 swap[0] = depthShift[2 * d]; in DMPlexShiftPointSetUp_Internal()
511 swap[1] = depthShift[2 * d + 1]; in DMPlexShiftPointSetUp_Internal()
512 depthShift[2 * d] = depthShift[2 * e]; in DMPlexShiftPointSetUp_Internal()
513 depthShift[2 * d + 1] = depthShift[2 * e + 1]; in DMPlexShiftPointSetUp_Internal()
514 depthShift[2 * e] = swap[0]; in DMPlexShiftPointSetUp_Internal()
515 depthShift[2 * e + 1] = swap[1]; in DMPlexShiftPointSetUp_Internal()
520 off += depthShift[2 * d + 1]; in DMPlexShiftPointSetUp_Internal()
521 depthShift[2 * d + 1] = depthShift[2 * d] + off; in DMPlexShiftPointSetUp_Internal()
527 static inline PetscInt DMPlexShiftPoint_Internal(PetscInt p, PetscInt depth, PetscInt depthShift[]) in DMPlexShiftPoint_Internal() argument
533 if (p < depthShift[2 * d]) return p + newOff; in DMPlexShiftPoint_Internal()
534 else newOff = depthShift[2 * d + 1] - depthShift[2 * d]; in DMPlexShiftPoint_Internal()
540 …inline PetscInt DMPlexShiftPointInverse_Internal(PetscInt p, PetscInt depth, PetscInt depthShift[]) in DMPlexShiftPointInverse_Internal() argument
546 if (p < depthShift[2 * d + 1]) return p + newOff; in DMPlexShiftPointInverse_Internal()
547 else newOff = depthShift[2 * d] - depthShift[2 * d + 1]; in DMPlexShiftPointInverse_Internal()
552 static PetscErrorCode DMPlexShiftSizes_Internal(DM dm, PetscInt depthShift[], DM dmNew) in DMPlexShiftSizes_Internal() argument
562 pEnd = DMPlexShiftPoint_Internal(pEnd, depth, depthShift); in DMPlexShiftSizes_Internal()
573 pStartNew = DMPlexShiftPoint_Internal(pStart, depth, depthShift); in DMPlexShiftSizes_Internal()
574 pEndNew = DMPlexShiftPoint_Internal(pEnd, depth, depthShift); in DMPlexShiftSizes_Internal()
579 PetscInt newp = DMPlexShiftPoint_Internal(p, depth, depthShift); in DMPlexShiftSizes_Internal()
594 static PetscErrorCode DMPlexShiftPoints_Internal(DM dm, PetscInt depthShift[], DM dmNew) in DMPlexShiftPoints_Internal() argument
609 PetscInt size, sizeNew, i, newp = DMPlexShiftPoint_Internal(p, depth, depthShift); in DMPlexShiftPoints_Internal()
614 … for (i = 0; i < size; ++i) newpoints[i] = DMPlexShiftPoint_Internal(points[i], depth, depthShift); in DMPlexShiftPoints_Internal()
620 … for (i = 0; i < size; ++i) newpoints[i] = DMPlexShiftPoint_Internal(points[i], depth, depthShift); in DMPlexShiftPoints_Internal()
628 static PetscErrorCode DMPlexShiftCoordinates_Internal(DM dm, PetscInt depthShift[], DM dmNew) in DMPlexShiftCoordinates_Internal() argument
655 PetscInt cNew = DMPlexShiftPoint_Internal(c, depth, depthShift), dof; in DMPlexShiftCoordinates_Internal()
680 PetscInt cNew = DMPlexShiftPoint_Internal(c, depth, depthShift), dof, off, noff, d; in DMPlexShiftCoordinates_Internal()
693 …PetscCall(PetscSectionGetOffset(newCoordSection, DMPlexShiftPoint_Internal(v, depth, depthShift), … in DMPlexShiftCoordinates_Internal()
703 static PetscErrorCode DMPlexShiftSF_Single(DM dm, PetscInt depthShift[], PetscSF sf, PetscSF sfNew) in DMPlexShiftSF_Single() argument
715 totShift = DMPlexShiftPoint_Internal(pEnd, depth, depthShift) - pEnd; in DMPlexShiftSF_Single()
718 for (l = 0; l < numRoots; ++l) newLocation[l] = DMPlexShiftPoint_Internal(l, depth, depthShift); in DMPlexShiftSF_Single()
724 glocalPoints[l] = DMPlexShiftPoint_Internal(localPoints[l], depth, depthShift); in DMPlexShiftSF_Single()
734 static PetscErrorCode DMPlexShiftSF_Internal(DM dm, PetscInt depthShift[], DM dmNew) in DMPlexShiftSF_Internal() argument
743 PetscCall(DMPlexShiftSF_Single(dm, depthShift, sfPoint, sfPointNew)); in DMPlexShiftSF_Internal()
752 PetscCall(DMPlexShiftSF_Single(dm, depthShift, sfNat, sfNatNew)); in DMPlexShiftSF_Internal()
757 static PetscErrorCode DMPlexShiftLabels_Internal(DM dm, PetscInt depthShift[], DM dmNew) in DMPlexShiftLabels_Internal() argument
795 const PetscInt newpoint = DMPlexShiftPoint_Internal(points[p], depth, depthShift); in DMPlexShiftLabels_Internal()
859 static PetscErrorCode DMPlexShiftTree_Internal(DM dm, PetscInt depthShift[], DM dmNew) in DMPlexShiftTree_Internal() argument
876 pStartShifted = DMPlexShiftPoint_Internal(pStart, depth, depthShift); in DMPlexShiftTree_Internal()
877 pEndShifted = DMPlexShiftPoint_Internal(pEnd, depth, depthShift); in DMPlexShiftTree_Internal()
887 PetscInt pNew = DMPlexShiftPoint_Internal(p, depth, depthShift); in DMPlexShiftTree_Internal()
895 PetscInt pNew = DMPlexShiftPoint_Internal(p, depth, depthShift); in DMPlexShiftTree_Internal()
903 parentsShifted[offNew] = DMPlexShiftPoint_Internal(parents[off], depth, depthShift); in DMPlexShiftTree_Internal()
919 PetscInt *depthShift; in DMPlexConstructGhostCells_Internal() local
955 PetscCall(PetscMalloc1(2 * (depth + 1), &depthShift)); in DMPlexConstructGhostCells_Internal()
960 depthShift[2 * d] = dEnd; in DMPlexConstructGhostCells_Internal()
961 depthShift[2 * d + 1] = 0; in DMPlexConstructGhostCells_Internal()
963 if (depth >= 0) depthShift[2 * depth + 1] = Ng; in DMPlexConstructGhostCells_Internal()
964 PetscCall(DMPlexShiftPointSetUp_Internal(depth, depthShift)); in DMPlexConstructGhostCells_Internal()
965 PetscCall(DMPlexShiftSizes_Internal(dm, depthShift, gdm)); in DMPlexConstructGhostCells_Internal()
993 PetscCall(DMPlexShiftPoints_Internal(dm, depthShift, gdm)); in DMPlexConstructGhostCells_Internal()
1020 PetscCall(DMPlexShiftCoordinates_Internal(dm, depthShift, gdm)); in DMPlexConstructGhostCells_Internal()
1021 PetscCall(DMPlexShiftSF_Internal(dm, depthShift, gdm)); in DMPlexConstructGhostCells_Internal()
1022 PetscCall(DMPlexShiftLabels_Internal(dm, depthShift, gdm)); in DMPlexConstructGhostCells_Internal()
1024 PetscCall(DMPlexShiftTree_Internal(dm, depthShift, gdm)); in DMPlexConstructGhostCells_Internal()
1025 PetscCall(PetscFree(depthShift)); in DMPlexConstructGhostCells_Internal()
1258 PetscInt *depthShift; /* Number of replicated+hybrid points at each depth */ in DMPlexConstructCohesiveCells_Internal() local
1272 …PetscCall(PetscMalloc5(depth + 1, &depthMax, depth + 1, &depthEnd, 2 * (depth + 1), &depthShift, d… in DMPlexConstructCohesiveCells_Internal()
1289 depthShift[2 * d] = depthMax[d]; in DMPlexConstructCohesiveCells_Internal()
1290 depthShift[2 * d + 1] = 0; in DMPlexConstructCohesiveCells_Internal()
1321 for (d = 0; d <= depth; ++d) depthShift[2 * d + 1] = numSplitPoints[d] + numHybridPoints[d]; in DMPlexConstructCohesiveCells_Internal()
1322 PetscCall(DMPlexShiftPointSetUp_Internal(depth, depthShift)); in DMPlexConstructCohesiveCells_Internal()
1326 …for (d = 0; d <= depth; ++d) pMaxNew[d] = DMPlexShiftPoint_Internal(pMaxNew[d], depth, depthShift)… in DMPlexConstructCohesiveCells_Internal()
1327 PetscCall(DMPlexShiftSizes_Internal(dm, depthShift, sdm)); in DMPlexConstructCohesiveCells_Internal()
1332 …const PetscInt newp = DMPlexShiftPoint_Internal(oldp, depth, depthShift) /*oldp + depthOffset[d… in DMPlexConstructCohesiveCells_Internal()
1417 …const PetscInt newp = DMPlexShiftPoint_Internal(oldp, depth, depthShift) /*oldp + depthOffset[dep… in DMPlexConstructCohesiveCells_Internal()
1469 PetscCall(DMPlexShiftPoints_Internal(dm, depthShift, sdm)); in DMPlexConstructCohesiveCells_Internal()
1476 …const PetscInt newp = DMPlexShiftPoint_Internal(oldp, depth, depthShift) /*oldp + depthOffset[d… in DMPlexConstructCohesiveCells_Internal()
1504 …coneNew[2 + q] = DMPlexShiftPoint_Internal(cone[q], depth, depthShift) /*cone[q] + depthOffset[dep… in DMPlexConstructCohesiveCells_Internal()
1613 …+ 1))) supportNew[qn++] = DMPlexShiftPoint_Internal(support[e], depth, depthShift) /*support[e] + … in DMPlexConstructCohesiveCells_Internal()
1627 …supportNew[qp++] = DMPlexShiftPoint_Internal(support[e], depth, depthShift) /*support[e] + depthOf… in DMPlexConstructCohesiveCells_Internal()
1657 …coneNew[q] = DMPlexShiftPoint_Internal(cone[q], depth, depthShift) /*cone[q] + depthOffset[dep-1]*… in DMPlexConstructCohesiveCells_Internal()
1669 …supportNew[q++] = DMPlexShiftPoint_Internal(support[e], depth, depthShift) /*support[e] + depthOff… in DMPlexConstructCohesiveCells_Internal()
1671 …supportNew[q++] = DMPlexShiftPoint_Internal(support[e], depth, depthShift) /*support[e] + depthOff… in DMPlexConstructCohesiveCells_Internal()
1686 …supportNew[q++] = DMPlexShiftPoint_Internal(support[e], depth, depthShift) /*support[e] + depthOff… in DMPlexConstructCohesiveCells_Internal()
1723 …const PetscInt newp = DMPlexShiftPoint_Internal(oldp, depth, depthShift) /*oldp + depthOffset[dep… in DMPlexConstructCohesiveCells_Internal()
1737 …supportNew[q++] = DMPlexShiftPoint_Internal(support[s], depth, depthShift) /*support[s] + depthOff… in DMPlexConstructCohesiveCells_Internal()
1775 …supportNew[qf++] = DMPlexShiftPoint_Internal(support[f], depth, depthShift) /*support[f] + depthOf… in DMPlexConstructCohesiveCells_Internal()
1778 …supportNew[qf++] = DMPlexShiftPoint_Internal(support[f], depth, depthShift) /*support[f] + depthOf… in DMPlexConstructCohesiveCells_Internal()
1826 …const PetscInt newp = DMPlexShiftPoint_Internal(oldp, depth, depthShift) /*depthOffset[dep] + old… in DMPlexConstructCohesiveCells_Internal()
1836 const PetscInt coldp = DMPlexShiftPointInverse_Internal(cone[c], depth, depthShift); in DMPlexConstructCohesiveCells_Internal()
1856 PetscCall(DMPlexShiftCoordinates_Internal(dm, depthShift, sdm)); in DMPlexConstructCohesiveCells_Internal()
1861 …const PetscInt newp = DMPlexShiftPoint_Internal(splitPoints[0][v], depth, depthShift) /*depthOff… in DMPlexConstructCohesiveCells_Internal()
1872 PetscCall(DMPlexShiftSF_Internal(dm, depthShift, sdm)); in DMPlexConstructCohesiveCells_Internal()
1875 PetscCall(DMPlexShiftLabels_Internal(dm, depthShift, sdm)); in DMPlexConstructCohesiveCells_Internal()
1880 …const PetscInt newp = DMPlexShiftPoint_Internal(splitPoints[dep][p], depth, depthShift) /*depthO… in DMPlexConstructCohesiveCells_Internal()
1925 PetscCall(PetscFree5(depthMax, depthEnd, depthShift, pMaxNew, numHybridPointsOld)); in DMPlexConstructCohesiveCells_Internal()