Lines Matching refs:p

150     PetscInt        p, posA = -1, numChildren, i;  in DMPlexReferenceTreeGetChildSymmetry_Default()  local
156 p = children[i]; in DMPlexReferenceTreeGetChildSymmetry_Default()
157 if (p == childA) { in DMPlexReferenceTreeGetChildSymmetry_Default()
221 PetscInt dim, p, pStart, pEnd, pRefStart, pRefEnd, d, offset, parentSize, *parents, *childIDs; in DMPlexCreateReferenceTree_Union() local
238 for (p = pStart; p < pEnd; p++) PetscCall(PetscSectionSetDof(unionSection, p - pStart, 1)); in DMPlexCreateReferenceTree_Union()
239 for (p = pRefStart; p < pRefEnd; p++) { in DMPlexCreateReferenceTree_Union()
241 PetscCall(DMLabelGetValue(identityRef, p, &q)); in DMPlexCreateReferenceTree_Union()
243 if (qSize > 1) PetscCall(PetscSectionSetDof(unionSection, p - pRefStart + (pEnd - pStart), 1)); in DMPlexCreateReferenceTree_Union()
278 for (p = pStart; p < pEnd; p++) { in DMPlexCreateReferenceTree_Union()
281 PetscCall(DMPlexGetConeSize(K, p, &dof)); in DMPlexCreateReferenceTree_Union()
282 PetscCall(PetscSectionGetOffset(unionSection, p - pStart, &uOff)); in DMPlexCreateReferenceTree_Union()
286 for (p = pRefStart; p < pRefEnd; p++) { in DMPlexCreateReferenceTree_Union()
289 PetscCall(DMPlexGetConeSize(Kref, p, &dof)); in DMPlexCreateReferenceTree_Union()
290 PetscCall(PetscSectionGetDof(unionSection, p - pRefStart + (pEnd - pStart), &uDof)); in DMPlexCreateReferenceTree_Union()
291 PetscCall(PetscSectionGetOffset(unionSection, p - pRefStart + (pEnd - pStart), &uOff)); in DMPlexCreateReferenceTree_Union()
301 for (p = pStart; p < pEnd; p++) { in DMPlexCreateReferenceTree_Union()
305 PetscCall(DMPlexGetConeSize(K, p, &dof)); in DMPlexCreateReferenceTree_Union()
306 PetscCall(DMPlexGetCone(K, p, &cone)); in DMPlexCreateReferenceTree_Union()
307 PetscCall(DMPlexGetConeOrientation(K, p, &orientation)); in DMPlexCreateReferenceTree_Union()
308 PetscCall(PetscSectionGetOffset(unionSection, p - pStart, &uOff)); in DMPlexCreateReferenceTree_Union()
318 for (p = pRefStart; p < pRefEnd; p++) { in DMPlexCreateReferenceTree_Union()
322 PetscCall(DMPlexGetConeSize(Kref, p, &dof)); in DMPlexCreateReferenceTree_Union()
323 PetscCall(DMPlexGetCone(Kref, p, &cone)); in DMPlexCreateReferenceTree_Union()
324 PetscCall(DMPlexGetConeOrientation(Kref, p, &orientation)); in DMPlexCreateReferenceTree_Union()
325 PetscCall(PetscSectionGetDof(unionSection, p - pRefStart + (pEnd - pStart), &uDof)); in DMPlexCreateReferenceTree_Union()
326 PetscCall(PetscSectionGetOffset(unionSection, p - pRefStart + (pEnd - pStart), &uOff)); in DMPlexCreateReferenceTree_Union()
386 for (p = pRefStart; p < pRefEnd; p++) { in DMPlexCreateReferenceTree_Union()
389 PetscCall(PetscSectionGetDof(unionSection, p - pRefStart + (pEnd - pStart), &uDof)); in DMPlexCreateReferenceTree_Union()
390 PetscCall(PetscSectionGetOffset(unionSection, p - pRefStart + (pEnd - pStart), &uOff)); in DMPlexCreateReferenceTree_Union()
396 for (p = pRefStart; p < pRefEnd; p++) { in DMPlexCreateReferenceTree_Union()
399 PetscCall(PetscSectionGetDof(unionSection, p - pRefStart + (pEnd - pStart), &uDof)); in DMPlexCreateReferenceTree_Union()
400 PetscCall(PetscSectionGetOffset(unionSection, p - pRefStart + (pEnd - pStart), &uOff)); in DMPlexCreateReferenceTree_Union()
404 PetscCall(DMLabelGetValue(identityRef, p, &parent)); in DMPlexCreateReferenceTree_Union()
445 PetscInt p, pStart, pEnd; in DMPlexCreateDefaultReferenceTree() local
457 for (p = pStart; p < pEnd; p++) PetscCall(DMLabelSetValue(identity, p, p)); in DMPlexCreateDefaultReferenceTree()
475 PetscInt p, pSize, cSize, parMax = PETSC_INT_MIN, parMin = PETSC_INT_MAX; in DMPlexTreeSymmetrize() local
485 for (p = 0; p < pSize; p++) { in DMPlexTreeSymmetrize()
486 PetscInt par = mesh->parents[p]; in DMPlexTreeSymmetrize()
497 for (p = 0; p < pSize; p++) { in DMPlexTreeSymmetrize()
498 PetscInt par = mesh->parents[p]; in DMPlexTreeSymmetrize()
507 for (p = pStart; p < pEnd; p++) { in DMPlexTreeSymmetrize()
510 PetscCall(PetscSectionGetDof(pSec, p, &dof)); in DMPlexTreeSymmetrize()
511 PetscCall(PetscSectionGetOffset(pSec, p, &off)); in DMPlexTreeSymmetrize()
516 children[cOff + offsets[par - parMin]++] = p; in DMPlexTreeSymmetrize()
527 PetscInt pStart, pEnd, size, sizeNew, i, p, *valsNew = NULL; in AnchorsFlatten() local
542 p = vals[i]; in AnchorsFlatten()
543 if (p < pStart || p >= pEnd) continue; in AnchorsFlatten()
544 PetscCall(PetscSectionGetDof(section, p, &dof)); in AnchorsFlatten()
554 for (p = pStart; p < pEnd; p++) { in AnchorsFlatten()
557 PetscCall(PetscSectionGetDof(section, p, &dof)); in AnchorsFlatten()
558 PetscCall(PetscSectionGetOffset(section, p, &off)); in AnchorsFlatten()
563 if (qDof) PetscCall(PetscSectionAddDof(secNew, p, qDof)); in AnchorsFlatten()
564 else PetscCall(PetscSectionAddDof(secNew, p, 1)); in AnchorsFlatten()
571 for (p = pStart; p < pEnd; p++) { in AnchorsFlatten()
574 PetscCall(PetscSectionGetDof(section, p, &dof)); in AnchorsFlatten()
575 PetscCall(PetscSectionGetOffset(section, p, &off)); in AnchorsFlatten()
576 PetscCall(PetscSectionGetDof(secNew, p, &dofNew)); in AnchorsFlatten()
577 PetscCall(PetscSectionGetOffset(secNew, p, &offNew)); in AnchorsFlatten()
607 PetscCall(PetscSectionSetDof(secNew, p, count)); in AnchorsFlatten()
625 for (p = pStart; p < pEnd; p++) { in AnchorsFlatten()
628 PetscCall(PetscSectionGetDof(secNew, p, &dof)); in AnchorsFlatten()
629 PetscCall(PetscSectionSetDof(secComp, p, dof)); in AnchorsFlatten()
634 for (p = pStart; p < pEnd; p++) { in AnchorsFlatten()
637 PetscCall(PetscSectionGetDof(secNew, p, &dof)); in AnchorsFlatten()
638 PetscCall(PetscSectionGetOffset(secNew, p, &off)); in AnchorsFlatten()
639 PetscCall(PetscSectionGetOffset(secComp, p, &offNew)); in AnchorsFlatten()
654 PetscInt p, pStart, pEnd, *anchors, size; in DMPlexCreateAnchors_Tree() local
664 for (p = pStart; p < pEnd; p++) { in DMPlexCreateAnchors_Tree()
670 PetscCall(DMLabelGetValue(canonLabel, p, &canon)); in DMPlexCreateAnchors_Tree()
671 if (p != canon) continue; in DMPlexCreateAnchors_Tree()
673 PetscCall(DMPlexGetTreeParent(dm, p, &parent, NULL)); in DMPlexCreateAnchors_Tree()
674 if (parent != p) { in DMPlexCreateAnchors_Tree()
675 aMin = PetscMin(aMin, p); in DMPlexCreateAnchors_Tree()
676 aMax = PetscMax(aMax, p + 1); in DMPlexCreateAnchors_Tree()
685 for (p = aMin; p < aMax; p++) { in DMPlexCreateAnchors_Tree()
686 PetscInt parent, ancestor = p; in DMPlexCreateAnchors_Tree()
691 PetscCall(DMLabelGetValue(canonLabel, p, &canon)); in DMPlexCreateAnchors_Tree()
692 if (p != canon) continue; in DMPlexCreateAnchors_Tree()
694 PetscCall(DMPlexGetTreeParent(dm, p, &parent, NULL)); in DMPlexCreateAnchors_Tree()
699 if (ancestor != p) { in DMPlexCreateAnchors_Tree()
703 PetscCall(PetscSectionSetDof(aSec, p, closureSize)); in DMPlexCreateAnchors_Tree()
710 for (p = aMin; p < aMax; p++) { in DMPlexCreateAnchors_Tree()
711 PetscInt parent, ancestor = p; in DMPlexCreateAnchors_Tree()
716 PetscCall(DMLabelGetValue(canonLabel, p, &canon)); in DMPlexCreateAnchors_Tree()
717 if (p != canon) continue; in DMPlexCreateAnchors_Tree()
719 PetscCall(DMPlexGetTreeParent(dm, p, &parent, NULL)); in DMPlexCreateAnchors_Tree()
724 if (ancestor != p) { in DMPlexCreateAnchors_Tree()
727 PetscCall(PetscSectionGetOffset(aSec, p, &aOff)); in DMPlexCreateAnchors_Tree()
757 static PetscErrorCode DMPlexGetTrueSupportSize(DM dm, PetscInt p, PetscInt *dof, PetscInt *numTrueS… in DMPlexGetTrueSupportSize() argument
760 if (numTrueSupp[p] == -1) { in DMPlexGetTrueSupportSize()
765 PetscCall(DMPlexGetSupportSize(dm, p, &alldof)); in DMPlexGetTrueSupportSize()
766 PetscCall(DMPlexGetSupport(dm, p, &supp)); in DMPlexGetTrueSupportSize()
774 if (cone[j] == p) break; in DMPlexGetTrueSupportSize()
778 numTrueSupp[p] = count; in DMPlexGetTrueSupportSize()
780 *dof = numTrueSupp[p]; in DMPlexGetTrueSupportSize()
788 PetscInt newSize, *newSupports, pStart, pEnd, p, d, depth; in DMPlexTreeExchangeSupports() local
801 for (p = 0; p < pEnd; p++) numTrueSupp[p] = -1; in DMPlexTreeExchangeSupports()
806 for (p = pStart; p < pEnd; ++p) { in DMPlexTreeExchangeSupports()
809 PetscCall(DMPlexGetTrueSupportSize(dm, p, &dof, numTrueSupp)); in DMPlexTreeExchangeSupports()
810 PetscCall(PetscSectionAddDof(newSupportSection, p, dof)); in DMPlexTreeExchangeSupports()
811 q = p; in DMPlexTreeExchangeSupports()
817 PetscCall(PetscSectionAddDof(newSupportSection, p, qdof)); in DMPlexTreeExchangeSupports()
828 for (p = pStart; p < pEnd; p++) { in DMPlexTreeExchangeSupports()
831 PetscCall(PetscSectionGetDof(mesh->supportSection, p, &dof)); in DMPlexTreeExchangeSupports()
832 PetscCall(PetscSectionGetOffset(mesh->supportSection, p, &off)); in DMPlexTreeExchangeSupports()
833 PetscCall(PetscSectionGetDof(newSupportSection, p, &newDof)); in DMPlexTreeExchangeSupports()
834 PetscCall(PetscSectionGetOffset(newSupportSection, p, &newOff)); in DMPlexTreeExchangeSupports()
843 if (cone[j] == p) break; in DMPlexTreeExchangeSupports()
845 if (j < numCones) newSupports[newOff + offsets[p]++] = q; in DMPlexTreeExchangeSupports()
848 q = p; in DMPlexTreeExchangeSupports()
865 if (j < numCones) newSupports[newOff + offsets[p]++] = r; in DMPlexTreeExchangeSupports()
875 if (cone[j] == p) break; in DMPlexTreeExchangeSupports()
944 PetscInt p, dStart, dEnd, canon = -1, cNumChildren; in DMPlexSetTree_Internal() local
948 for (p = dStart; p < dEnd; p++) { in DMPlexSetTree_Internal()
949 PetscCall(DMPlexGetTreeChildren(dm, p, &cNumChildren, &cChildren)); in DMPlexSetTree_Internal()
951 canon = p; in DMPlexSetTree_Internal()
956 for (p = dStart; p < dEnd; p++) { in DMPlexSetTree_Internal()
960 PetscCall(DMPlexGetTreeChildren(dm, p, &numChildren, &children)); in DMPlexSetTree_Internal()
963 PetscCall(DMSetLabelValue(dm, "canonical", p, canon)); in DMPlexSetTree_Internal()
1119 PetscInt f, b, p, c, offset, qPoints; in EvaluateBasis() local
1128 for (p = 0; p < qPoints; p++) { in EvaluateBasis()
1129 …r (c = 0; c < nComps; c++) val += work[((offset + p) * nBasis + b) * nComps + c] * weights[(offset… in EvaluateBasis()
1224 const PetscReal *p, *w; in DMPlexComputeAnchorMatrix_Tree_Direct() local
1228 PetscCall(PetscQuadratureGetData(quad, NULL, NULL, &qPoints, &p, &w)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1230 PetscCall(PetscArraycpy(pointsRef + spdim * offset, p, spdim * qPoints)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1245 PetscInt p = closure[2 * i]; in DMPlexComputeAnchorMatrix_Tree_Direct() local
1248 if (p < conStart || p >= conEnd) continue; in DMPlexComputeAnchorMatrix_Tree_Direct()
1250 PetscCall(PetscSectionGetFieldDof(cSec, p, f, &conDof)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1252 PetscCall(PetscSectionGetDof(cSec, p, &conDof)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1276 PetscInt p = closure[2 * i]; in DMPlexComputeAnchorMatrix_Tree_Direct() local
1280 PetscCall(PetscSectionGetFieldDof(section, p, f, &dof)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1282 PetscCall(PetscSectionGetDof(section, p, &dof)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1288 PetscInt p = closureP[2 * i]; in DMPlexComputeAnchorMatrix_Tree_Direct() local
1292 PetscCall(PetscSectionGetFieldDof(section, p, f, &dof)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1294 PetscCall(PetscSectionGetDof(section, p, &dof)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1300 PetscInt p = closure[2 * i]; in DMPlexComputeAnchorMatrix_Tree_Direct() local
1305 if (p < conStart || p >= conEnd) continue; in DMPlexComputeAnchorMatrix_Tree_Direct()
1307 PetscCall(PetscSectionGetFieldDof(cSec, p, f, &conDof)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1308 PetscCall(PetscSectionGetFieldOffset(cSec, p, f, &conOff)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1310 PetscCall(PetscSectionGetDof(cSec, p, &conDof)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1311 PetscCall(PetscSectionGetOffset(cSec, p, &conOff)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1316 PetscCall(PetscSectionGetDof(aSec, p, &aDof)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1317 PetscCall(PetscSectionGetOffset(aSec, p, &aOff)); in DMPlexComputeAnchorMatrix_Tree_Direct()
1391 …PetscInt numFields, maxFields, f, pRefStart, pRefEnd, p, *rows, *cols, maxDof, maxAnDof… in DMPlexReferenceTreeGetChildrenMatrices() local
1414 for (p = pRefStart; p < pRefEnd; p++) { in DMPlexReferenceTreeGetChildrenMatrices()
1417 PetscCall(DMPlexGetTreeParent(refTree, p, &parent, NULL)); in DMPlexReferenceTreeGetChildrenMatrices()
1418 PetscCall(PetscSectionGetDof(refConSec, p, &pDof)); in DMPlexReferenceTreeGetChildrenMatrices()
1419 if (!pDof || parent == p) continue; in DMPlexReferenceTreeGetChildrenMatrices()
1421 PetscCall(PetscMalloc1(maxFields, &refPointFieldMats[p - pRefStart])); in DMPlexReferenceTreeGetChildrenMatrices()
1422 PetscCall(PetscCalloc1(maxFields, &refPointFieldN[p - pRefStart])); in DMPlexReferenceTreeGetChildrenMatrices()
1428 PetscCall(PetscSectionGetFieldDof(refConSec, p, f, &cDof)); in DMPlexReferenceTreeGetChildrenMatrices()
1429 PetscCall(PetscSectionGetFieldOffset(refConSec, p, f, &cOff)); in DMPlexReferenceTreeGetChildrenMatrices()
1432 PetscCall(PetscSectionGetDof(refConSec, p, &cDof)); in DMPlexReferenceTreeGetChildrenMatrices()
1433 PetscCall(PetscSectionGetOffset(refConSec, p, &cOff)); in DMPlexReferenceTreeGetChildrenMatrices()
1454 refPointFieldN[p - pRefStart][f] = numCols; in DMPlexReferenceTreeGetChildrenMatrices()
1455 PetscCall(PetscMalloc1(cDof * numCols, &refPointFieldMats[p - pRefStart][f])); in DMPlexReferenceTreeGetChildrenMatrices()
1456 … PetscCall(MatGetValues(refCmat, cDof, rows, numCols, cols, refPointFieldMats[p - pRefStart][f])); in DMPlexReferenceTreeGetChildrenMatrices()
1475 …for (j = 0; j < aDof; j++) refPointFieldMats[p - pRefStart][f][k * numCols + colOff + j] *= flip[j… in DMPlexReferenceTreeGetChildrenMatrices()
1502 PetscInt numFields, maxFields, pRefStart, pRefEnd, p, f; in DMPlexReferenceTreeRestoreChildrenMatrices() local
1515 for (p = pRefStart; p < pRefEnd; p++) { in DMPlexReferenceTreeRestoreChildrenMatrices()
1518 PetscCall(DMPlexGetTreeParent(refTree, p, &parent, NULL)); in DMPlexReferenceTreeRestoreChildrenMatrices()
1519 PetscCall(PetscSectionGetDof(refConSec, p, &pDof)); in DMPlexReferenceTreeRestoreChildrenMatrices()
1520 if (!pDof || parent == p) continue; in DMPlexReferenceTreeRestoreChildrenMatrices()
1526 PetscCall(PetscSectionGetFieldDof(refConSec, p, f, &cDof)); in DMPlexReferenceTreeRestoreChildrenMatrices()
1528 PetscCall(PetscSectionGetDof(refConSec, p, &cDof)); in DMPlexReferenceTreeRestoreChildrenMatrices()
1531 PetscCall(PetscFree(refPointFieldMats[p - pRefStart][f])); in DMPlexReferenceTreeRestoreChildrenMatrices()
1533 PetscCall(PetscFree(refPointFieldMats[p - pRefStart])); in DMPlexReferenceTreeRestoreChildrenMatrices()
1534 PetscCall(PetscFree(refPointFieldN[p - pRefStart])); in DMPlexReferenceTreeRestoreChildrenMatrices()
1546 …PetscInt numFields, maxFields, f, pRefStart, pRefEnd, p, maxDof, maxAnDof, *perm, *iperm, p… in DMPlexComputeAnchorMatrix_Tree_FromReference() local
1577 for (p = pStart; p < pEnd; p++) { in DMPlexComputeAnchorMatrix_Tree_FromReference()
1578 perm[p - pStart] = p; in DMPlexComputeAnchorMatrix_Tree_FromReference()
1579 iperm[p - pStart] = p - pStart; in DMPlexComputeAnchorMatrix_Tree_FromReference()
1581 for (p = 0; p < pEnd - pStart;) { in DMPlexComputeAnchorMatrix_Tree_FromReference()
1582 PetscInt point = perm[p]; in DMPlexComputeAnchorMatrix_Tree_FromReference()
1587 p++; in DMPlexComputeAnchorMatrix_Tree_FromReference()
1596 perm[p] = q; in DMPlexComputeAnchorMatrix_Tree_FromReference()
1599 iperm[q - pStart] = p; in DMPlexComputeAnchorMatrix_Tree_FromReference()
1605 if (i == size) p++; in DMPlexComputeAnchorMatrix_Tree_FromReference()
1628 for (p = 0; p < pEnd - pStart; p++) { in DMPlexComputeAnchorMatrix_Tree_FromReference()
1630 PetscInt point = perm[p], pointDof; in DMPlexComputeAnchorMatrix_Tree_FromReference()
1833 PetscInt p, q; in DMPlexTreeRefineCell() local
1835 p = closureK[2 * j]; in DMPlexTreeRefineCell()
1837 PetscCall(DMPlexGetCellType(K, p, &pct)); in DMPlexTreeRefineCell()
1840 … if (q >= pOldStart[d] && q < pOldEnd[d]) Kembedding[p] = (q - pOldStart[d]) + pNewStart[d]; in DMPlexTreeRefineCell()
1848 PetscCall(DMPlexGetTreeChildren(K, p, &numChildren, &children)); in DMPlexTreeRefineCell()
1853 …PetscCall(DMPlexReferenceTreeGetChildSymmetry(K, p, parentOrientA, 0, k, parentOrientB, &oPerm, &k… in DMPlexTreeRefineCell()
1869 PetscInt p; in DMPlexTreeRefineCell() local
1872 for (p = pOldStart[d]; p < pOldEnd[d]; p++) { in DMPlexTreeRefineCell()
1874 if (p == cell) continue; in DMPlexTreeRefineCell()
1876 PetscCall(DMPlexGetConeSize(dm, p, &size)); in DMPlexTreeRefineCell()
1905 PetscInt p; in DMPlexTreeRefineCell() local
1909 for (p = pOldStart[d]; p < pOldEnd[d]; p++) { in DMPlexTreeRefineCell()
1911 if (p == cell) continue; in DMPlexTreeRefineCell()
1913 PetscCall(DMPlexGetConeSize(dm, p, &size)); in DMPlexTreeRefineCell()
1914 PetscCall(DMPlexGetCone(dm, p, &cone)); in DMPlexTreeRefineCell()
1915 PetscCall(DMPlexGetConeOrientation(dm, p, &orientation)); in DMPlexTreeRefineCell()
2035 PetscInt p, counts[4]; in DMPlexTreeRefineCell() local
2047 for (p = pStart; p < pEnd; p++) PetscCall(DMPlexGetConeSize(dm, p, &coneSizes[p - pStart])); in DMPlexTreeRefineCell()
2078 PetscInt pStartC, pEndC, pStartF, pEndF, p; in DMPlexComputeInterpolatorTree() local
2095 p = leaves ? leaves[l] : l; in DMPlexComputeInterpolatorTree()
2096 PetscCall(PetscSectionGetDof(globalFine, p, &dof)); in DMPlexComputeInterpolatorTree()
2097 PetscCall(PetscSectionGetConstraintDof(globalFine, p, &cdof)); in DMPlexComputeInterpolatorTree()
2102 p = leaves ? leaves[l] : l; in DMPlexComputeInterpolatorTree()
2103 PetscCall(PetscSectionGetDof(globalFine, p, &dof)); in DMPlexComputeInterpolatorTree()
2104 PetscCall(PetscSectionGetConstraintDof(globalFine, p, &cdof)); in DMPlexComputeInterpolatorTree()
2112 for (p = pStartC; p < pEndC; p++) maxChildIds[p - pStartC] = -2; in DMPlexComputeInterpolatorTree()
2138 for (p = pStartC; p < pEndC; p++) { /* count the sizes of the indices and matrices */ in DMPlexComputeInterpolatorTree()
2142 PetscInt maxChildId = maxChildIds[p - pStartC]; in DMPlexComputeInterpolatorTree()
2147 PetscCall(PetscSectionGetDof(globalCoarse, p, &dof)); in DMPlexComputeInterpolatorTree()
2149 if (p >= aStart && p < aEnd) PetscCall(PetscSectionGetDof(aSec, p, &aDof)); in DMPlexComputeInterpolatorTree()
2150 if (p >= cStart && p < cEnd) PetscCall(PetscSectionGetDof(cSec, p, &cDof)); in DMPlexComputeInterpolatorTree()
2156 PetscCall(DMPlexGetTransitiveClosure(coarse, p, PETSC_TRUE, &closureSize, &closure)); in DMPlexComputeInterpolatorTree()
2173 PetscCall(DMPlexRestoreTransitiveClosure(coarse, p, PETSC_TRUE, &closureSize, &closure)); in DMPlexComputeInterpolatorTree()
2193 PetscCall(PetscSectionGetOffset(aSec, p, &aOff)); in DMPlexComputeInterpolatorTree()
2197 PetscCall(PetscSectionGetFieldDof(localCoarse, p, f, &fDof)); in DMPlexComputeInterpolatorTree()
2224 …PetscCall(PetscSectionSetDof(rootIndicesSec, p, numColIndices ? numColIndices + 2 * numFields : 0)… in DMPlexComputeInterpolatorTree()
2225 PetscCall(PetscSectionSetDof(rootMatricesSec, p, matSize)); in DMPlexComputeInterpolatorTree()
2235 for (p = pStartC; p < pEndC; p++) { in DMPlexComputeInterpolatorTree()
2239 PetscInt maxChildId = maxChildIds[p - pStartC]; in DMPlexComputeInterpolatorTree()
2242 PetscCall(PetscSectionGetDof(rootIndicesSec, p, &numColIndices)); in DMPlexComputeInterpolatorTree()
2251 PetscCall(PetscSectionGetOffset(rootIndicesSec, p, &pIndOff)); in DMPlexComputeInterpolatorTree()
2253 PetscCall(PetscSectionGetDof(rootMatricesSec, p, &matSize)); in DMPlexComputeInterpolatorTree()
2255 PetscCall(PetscSectionGetOffset(rootMatricesSec, p, &pMatOff)); in DMPlexComputeInterpolatorTree()
2258 PetscCall(PetscSectionGetDof(globalCoarse, p, &dof)); in DMPlexComputeInterpolatorTree()
2265 …PetscCall(DMPlexGetClosureIndices(coarse, localCoarse, globalCoarse, p, PETSC_TRUE, &numIndices, &… in DMPlexComputeInterpolatorTree()
2272 …PetscCall(DMPlexRestoreClosureIndices(coarse, localCoarse, globalCoarse, p, PETSC_TRUE, &numIndice… in DMPlexComputeInterpolatorTree()
2281 PetscCall(DMPlexGetTransitiveClosure(coarse, p, PETSC_TRUE, &closureSize, &closure)); in DMPlexComputeInterpolatorTree()
2288 … PetscCall(DMPlexRestoreTransitiveClosure(coarse, p, PETSC_TRUE, &closureSize, &closure)); in DMPlexComputeInterpolatorTree()
2295 PetscCall(DMPlexGetTransitiveClosure(coarse, p, PETSC_TRUE, &closureSize, &closure)); in DMPlexComputeInterpolatorTree()
2338 PetscCall(DMPlexRestoreTransitiveClosure(coarse, p, PETSC_TRUE, &closureSize, &closure)); in DMPlexComputeInterpolatorTree()
2372 PetscCall(PetscSectionGetOffset(cSec, p, &cOff)); in DMPlexComputeInterpolatorTree()
2373 PetscCall(PetscSectionGetDof(aSec, p, &aDof)); in DMPlexComputeInterpolatorTree()
2374 PetscCall(PetscSectionGetOffset(aSec, p, &aOff)); in DMPlexComputeInterpolatorTree()
2379 PetscCall(PetscSectionGetFieldDof(cSec, p, f, &fDof)); in DMPlexComputeInterpolatorTree()
2393 …PetscCall(DMPlexGetIndicesPointFields_Internal(cSec, PETSC_TRUE, p, cOff, offsetsCopy, PETSC_TRUE,… in DMPlexComputeInterpolatorTree()
2400 …PetscCall(DMPlexGetIndicesPoint_Internal(cSec, PETSC_TRUE, p, cOff, offsetsCopy, PETSC_TRUE, NULL,… in DMPlexComputeInterpolatorTree()
2439 PetscCall(PetscSectionGetOffset(globalCoarse, p, &gOff)); in DMPlexComputeInterpolatorTree()
2443 PetscCall(PetscSectionGetFieldDof(localCoarse, p, f, &fDof)); in DMPlexComputeInterpolatorTree()
2450 …PetscCall(DMPlexGetIndicesPointFields_Internal(localCoarse, PETSC_FALSE, p, gOff < 0 ? -(gOff + 1)… in DMPlexComputeInterpolatorTree()
2452 …PetscCall(DMPlexGetIndicesPoint_Internal(localCoarse, PETSC_FALSE, p, gOff < 0 ? -(gOff + 1) : gOf… in DMPlexComputeInterpolatorTree()
2510 for (p = leafStart; p < leafEnd; p++) { in DMPlexComputeInterpolatorTree()
2516 PetscCall(PetscSectionGetDof(globalFine, p, &gDof)); in DMPlexComputeInterpolatorTree()
2517 PetscCall(PetscSectionGetConstraintDof(globalFine, p, &gcDof)); in DMPlexComputeInterpolatorTree()
2519 PetscCall(PetscSectionGetOffset(globalFine, p, &gOff)); in DMPlexComputeInterpolatorTree()
2522 PetscCall(PetscSectionGetDof(leafIndicesSec, p, &numColIndices)); in DMPlexComputeInterpolatorTree()
2523 PetscCall(PetscSectionGetOffset(leafIndicesSec, p, &pIndOff)); in DMPlexComputeInterpolatorTree()
2536 PetscCall(PetscSectionGetFieldDof(localFine, p, f, &rowDof)); in DMPlexComputeInterpolatorTree()
2543 …PetscCall(DMPlexGetIndicesPointFields_Internal(localFine, PETSC_FALSE, p, gOff, offsetsCopy, PETSC… in DMPlexComputeInterpolatorTree()
2559 …PetscCall(DMPlexGetIndicesPoint_Internal(localFine, PETSC_FALSE, p, gOff, offsetsCopy, PETSC_FALSE… in DMPlexComputeInterpolatorTree()
2572 PetscCall(PetscSectionGetDof(leafMatricesSec, p, &matSize)); in DMPlexComputeInterpolatorTree()
2576 childId = childIds[p - pStartF]; in DMPlexComputeInterpolatorTree()
2679 for (p = leafStart; p < leafEnd; p++) { in DMPlexComputeInterpolatorTree()
2685 PetscCall(PetscSectionGetDof(globalFine, p, &gDof)); in DMPlexComputeInterpolatorTree()
2686 PetscCall(PetscSectionGetConstraintDof(globalFine, p, &gcDof)); in DMPlexComputeInterpolatorTree()
2688 childId = childIds[p - pStartF]; in DMPlexComputeInterpolatorTree()
2689 PetscCall(PetscSectionGetOffset(globalFine, p, &gOff)); in DMPlexComputeInterpolatorTree()
2690 PetscCall(PetscSectionGetDof(leafIndicesSec, p, &numColIndices)); in DMPlexComputeInterpolatorTree()
2691 PetscCall(PetscSectionGetOffset(leafIndicesSec, p, &pIndOff)); in DMPlexComputeInterpolatorTree()
2704 PetscCall(PetscSectionGetFieldDof(localFine, p, f, &rowDof)); in DMPlexComputeInterpolatorTree()
2710 …PetscCall(DMPlexGetIndicesPointFields_Internal(localFine, PETSC_FALSE, p, gOff, offsetsCopy, PETSC… in DMPlexComputeInterpolatorTree()
2712 …PetscCall(DMPlexGetIndicesPoint_Internal(localFine, PETSC_FALSE, p, gOff, offsetsCopy, PETSC_FALSE… in DMPlexComputeInterpolatorTree()
2714 PetscCall(PetscSectionGetDof(leafMatricesSec, p, &matSize)); in DMPlexComputeInterpolatorTree()
2743 PetscCall(PetscSectionGetOffset(leafMatricesSec, p, &pMatOff)); in DMPlexComputeInterpolatorTree()
2831 PetscInt f, dim, numFields, numSecFields, p, pStart, pEnd, cStart, cEnd; in DMPlexComputeInjectorReferenceTree() local
2852 …for (p = pStart; p < pEnd; p++) { /* a point will have non-zeros if it is canonical, it has dofs, … in DMPlexComputeInjectorReferenceTree()
2859 PetscCall(DMLabelGetValue(canonical, p, &pCanonical)); in DMPlexComputeInjectorReferenceTree()
2860 if (p != pCanonical) continue; in DMPlexComputeInjectorReferenceTree()
2862 PetscCall(DMPlexGetTreeChildren(refTree, p, &numChildren, &children)); in DMPlexComputeInjectorReferenceTree()
2871 PetscCall(PetscSectionGetDof(section, p, &numSelfDof)); in DMPlexComputeInjectorReferenceTree()
2884 PetscCall(PetscSectionGetFieldDof(section, p, f, &numSelfDof)); in DMPlexComputeInjectorReferenceTree()
2885 PetscCall(PetscSectionGetFieldOffset(section, p, f, &selfOff)); in DMPlexComputeInjectorReferenceTree()
2887 PetscCall(PetscSectionGetOffset(section, p, &selfOff)); in DMPlexComputeInjectorReferenceTree()
2895 for (p = pStart; p < pEnd; p++) { in DMPlexComputeInjectorReferenceTree()
2903 PetscCall(DMLabelGetValue(canonical, p, &pCanonical)); in DMPlexComputeInjectorReferenceTree()
2904 if (p != pCanonical) continue; in DMPlexComputeInjectorReferenceTree()
2906 PetscCall(DMPlexGetTreeChildren(refTree, p, &numChildren, &children)); in DMPlexComputeInjectorReferenceTree()
2915 PetscCall(PetscSectionGetDof(section, p, &numSelfDof)); in DMPlexComputeInjectorReferenceTree()
2938 PetscCall(PetscSectionGetFieldDof(section, p, f, &numSelfDof)); in DMPlexComputeInjectorReferenceTree()
2939 PetscCall(PetscSectionGetFieldOffset(section, p, f, &selfOff)); in DMPlexComputeInjectorReferenceTree()
2941 PetscCall(PetscSectionGetOffset(section, p, &selfOff)); in DMPlexComputeInjectorReferenceTree()
2945 if (p >= cStart && p < cEnd) { in DMPlexComputeInjectorReferenceTree()
2946 parentCell = p; in DMPlexComputeInjectorReferenceTree()
2952 PetscCall(DMPlexGetTransitiveClosure(refTree, p, PETSC_FALSE, &numStar, &star)); in DMPlexComputeInjectorReferenceTree()
2961 PetscCall(DMPlexRestoreTransitiveClosure(refTree, p, PETSC_FALSE, &numStar, &star)); in DMPlexComputeInjectorReferenceTree()
2984 if (point == p) { in DMPlexComputeInjectorReferenceTree()
3132 PetscCall(DMPlexComputeCellGeometryFVM(refTree, p, &parentVol, NULL, NULL)); in DMPlexComputeInjectorReferenceTree()
3160 PetscInt numFields, f, pRefStart, pRefEnd, p, *rows, *cols, maxDof; in DMPlexReferenceTreeGetChildrenMatrices_Injection() local
3174 for (p = pRefStart; p < pRefEnd; p++) { in DMPlexReferenceTreeGetChildrenMatrices_Injection()
3177 PetscCall(DMPlexGetTreeParent(refTree, p, &parent, NULL)); in DMPlexReferenceTreeGetChildrenMatrices_Injection()
3178 PetscCall(PetscSectionGetDof(refConSec, p, &pDof)); in DMPlexReferenceTreeGetChildrenMatrices_Injection()
3180 if (!pDof || !parentDof || parent == p) continue; in DMPlexReferenceTreeGetChildrenMatrices_Injection()
3182 PetscCall(PetscMalloc1(numFields, &refPointFieldMats[p - pRefStart])); in DMPlexReferenceTreeGetChildrenMatrices_Injection()
3187 PetscCall(PetscSectionGetFieldDof(refConSec, p, f, &cDof)); in DMPlexReferenceTreeGetChildrenMatrices_Injection()
3188 PetscCall(PetscSectionGetFieldOffset(refConSec, p, f, &cOff)); in DMPlexReferenceTreeGetChildrenMatrices_Injection()
3190 PetscCall(PetscSectionGetDof(refConSec, p, &cDof)); in DMPlexReferenceTreeGetChildrenMatrices_Injection()
3191 PetscCall(PetscSectionGetOffset(refConSec, p, &cOff)); in DMPlexReferenceTreeGetChildrenMatrices_Injection()
3209 PetscCall(PetscMalloc1(cDof * numCols, &refPointFieldMats[p - pRefStart][f])); in DMPlexReferenceTreeGetChildrenMatrices_Injection()
3211 PetscCall(MatGetValues(inj, numCols, cols, cDof, rows, refPointFieldMats[p - pRefStart][f])); in DMPlexReferenceTreeGetChildrenMatrices_Injection()
3224 PetscInt numFields, pRefStart, pRefEnd, p, f; in DMPlexReferenceTreeRestoreChildrenMatrices_Injection() local
3235 for (p = pRefStart; p < pRefEnd; p++) { in DMPlexReferenceTreeRestoreChildrenMatrices_Injection()
3238 PetscCall(DMPlexGetTreeParent(refTree, p, &parent, NULL)); in DMPlexReferenceTreeRestoreChildrenMatrices_Injection()
3239 PetscCall(PetscSectionGetDof(refConSec, p, &pDof)); in DMPlexReferenceTreeRestoreChildrenMatrices_Injection()
3241 if (!pDof || !parentDof || parent == p) continue; in DMPlexReferenceTreeRestoreChildrenMatrices_Injection()
3247 PetscCall(PetscSectionGetFieldDof(refConSec, p, f, &cDof)); in DMPlexReferenceTreeRestoreChildrenMatrices_Injection()
3249 PetscCall(PetscSectionGetDof(refConSec, p, &cDof)); in DMPlexReferenceTreeRestoreChildrenMatrices_Injection()
3252 PetscCall(PetscFree(refPointFieldMats[p - pRefStart][f])); in DMPlexReferenceTreeRestoreChildrenMatrices_Injection()
3254 PetscCall(PetscFree(refPointFieldMats[p - pRefStart])); in DMPlexReferenceTreeRestoreChildrenMatrices_Injection()
3280 PetscInt pStartF, pEndF, pStartC, pEndC, p, maxDof, numMulti; in DMPlexTransferInjectorTree() local
3303 p = leaves ? leaves[l] : l; in DMPlexTransferInjectorTree()
3304 PetscCall(PetscSectionGetDof(globalFine, p, &dof)); in DMPlexTransferInjectorTree()
3305 PetscCall(PetscSectionGetConstraintDof(globalFine, p, &cdof)); in DMPlexTransferInjectorTree()
3309 PetscCall(PetscSectionGetDof(localFine, p, &dof)); in DMPlexTransferInjectorTree()
3310 PetscCall(PetscSectionSetDof(leafIndicesSec, p, dof + 1)); in DMPlexTransferInjectorTree()
3319 p = leaves ? leaves[l] : l; in DMPlexTransferInjectorTree()
3320 PetscCall(PetscSectionGetDof(globalFine, p, &dof)); in DMPlexTransferInjectorTree()
3321 PetscCall(PetscSectionGetConstraintDof(globalFine, p, &cdof)); in DMPlexTransferInjectorTree()
3329 PetscCall(PetscSectionGetOffset(leafIndicesSec, p, &off)); in DMPlexTransferInjectorTree()
3338 PetscCall(PetscSectionGetOffset(globalFine, p, &gOff)); in DMPlexTransferInjectorTree()
3346 PetscCall(PetscSectionGetFieldDof(localFine, p, f, &fDof)); in DMPlexTransferInjectorTree()
3349 …PetscCall(DMPlexGetIndicesPointFields_Internal(localFine, PETSC_FALSE, p, gOff < 0 ? -(gOff + 1) :… in DMPlexTransferInjectorTree()
3351 …PetscCall(DMPlexGetIndicesPoint_Internal(localFine, PETSC_FALSE, p, gOff < 0 ? -(gOff + 1) : gOff,… in DMPlexTransferInjectorTree()
3369 PetscInt p, nleaves, nleavesToParents; in DMPlexTransferInjectorTree() local
3382 for (p = pStartC; p < pEndC; p++) { in DMPlexTransferInjectorTree()
3384 PetscCall(DMPlexGetTreeParent(coarse, p, &parent, &childId)); in DMPlexTransferInjectorTree()
3385 parentNodeAndIdCoarse[p - pStartC][0] = rank; in DMPlexTransferInjectorTree()
3386 parentNodeAndIdCoarse[p - pStartC][1] = parent - pStartC; in DMPlexTransferInjectorTree()
3387 parentNodeAndIdCoarse[p - pStartC][2] = (p == parent) ? -1 : childId; in DMPlexTransferInjectorTree()
3394 leaf = p - pStartC; in DMPlexTransferInjectorTree()
3397 parentNodeAndIdCoarse[p - pStartC][0] = iremote[leaf].rank; in DMPlexTransferInjectorTree()
3398 parentNodeAndIdCoarse[p - pStartC][1] = iremote[leaf].index; in DMPlexTransferInjectorTree()
3402 for (p = pStartF; p < pEndF; p++) { in DMPlexTransferInjectorTree()
3403 parentNodeAndIdFine[p - pStartF][0] = -1; in DMPlexTransferInjectorTree()
3404 parentNodeAndIdFine[p - pStartF][1] = -1; in DMPlexTransferInjectorTree()
3405 parentNodeAndIdFine[p - pStartF][2] = -1; in DMPlexTransferInjectorTree()
3409 for (p = pStartF, nleavesToParents = 0; p < pEndF; p++) { in DMPlexTransferInjectorTree()
3412 PetscCall(PetscSectionGetDof(leafIndicesSec, p, &dof)); in DMPlexTransferInjectorTree()
3416 PetscCall(PetscSectionGetOffset(leafIndicesSec, p, &off)); in DMPlexTransferInjectorTree()
3418 leafInds[off] = PetscMax(childIds[p - pStartF], parentNodeAndIdFine[p - pStartF][2]); in DMPlexTransferInjectorTree()
3420 … leafVals[off] = (PetscScalar)PetscMax(childIds[p - pStartF], parentNodeAndIdFine[p - pStartF][2]); in DMPlexTransferInjectorTree()
3423 if (parentNodeAndIdFine[p - pStartF][0] >= 0) nleavesToParents++; in DMPlexTransferInjectorTree()
3427 for (p = pStartF, nleavesToParents = 0; p < pEndF; p++) { in DMPlexTransferInjectorTree()
3428 if (parentNodeAndIdFine[p - pStartF][0] >= 0) { in DMPlexTransferInjectorTree()
3429 ilocalToParents[nleavesToParents] = p - pStartF; in DMPlexTransferInjectorTree()
3431 iremoteToParents[nleavesToParents].rank = parentNodeAndIdFine[p - pStartF][0]; in DMPlexTransferInjectorTree()
3432 iremoteToParents[nleavesToParents].index = parentNodeAndIdFine[p - pStartF][1]; in DMPlexTransferInjectorTree()
3450 for (p = pStartC, numPointsWithDofs = 0; p < pEndC; p++) { in DMPlexTransferInjectorTree()
3451 PetscCall(PetscSectionGetDof(globalCoarse, p, &dof)); in DMPlexTransferInjectorTree()
3452 PetscCall(PetscSectionGetConstraintDof(globalCoarse, p, &cdof)); in DMPlexTransferInjectorTree()
3456 for (p = pStartC, offset = 0; p < pEndC; p++) { in DMPlexTransferInjectorTree()
3457 PetscCall(PetscSectionGetDof(globalCoarse, p, &dof)); in DMPlexTransferInjectorTree()
3458 PetscCall(PetscSectionGetConstraintDof(globalCoarse, p, &cdof)); in DMPlexTransferInjectorTree()
3459 if ((dof - cdof) > 0) pointsWithDofs[offset++] = p - pStartC; in DMPlexTransferInjectorTree()
3472 …for (p = pStartC; p < pEndC; p++) PetscCall(PetscSectionSetDof(multiRootSec, p, rootDegrees[p - pS… in DMPlexTransferInjectorTree()
3520 PetscInt pStartC, pEndC, pStartF, pEndF, p; in DMPlexComputeInjectorTree() local
3560 for (p = pStartC; p < pEndC; p++) { in DMPlexComputeInjectorTree()
3563 PetscCall(PetscSectionGetDof(globalCoarse, p, &dof)); in DMPlexComputeInjectorTree()
3564 PetscCall(PetscSectionGetConstraintDof(globalCoarse, p, &cdof)); in DMPlexComputeInjectorTree()
3566 PetscCall(PetscSectionGetOffset(globalCoarse, p, &gOff)); in DMPlexComputeInjectorTree()
3575 PetscCall(PetscSectionGetFieldDof(localCoarse, p, f, &fDof)); in DMPlexComputeInjectorTree()
3578 …PetscCall(DMPlexGetIndicesPointFields_Internal(localCoarse, PETSC_FALSE, p, gOff < 0 ? -(gOff + 1)… in DMPlexComputeInjectorTree()
3580 …PetscCall(DMPlexGetIndicesPoint_Internal(localCoarse, PETSC_FALSE, p, gOff < 0 ? -(gOff + 1) : gOf… in DMPlexComputeInjectorTree()
3584 PetscCall(PetscSectionGetDof(multiRootSec, p, &numLeaves)); in DMPlexComputeInjectorTree()
3585 PetscCall(PetscSectionGetOffset(multiRootSec, p, &leafStart)); in DMPlexComputeInjectorTree()
3664 for (p = pStartC; p < pEndC; p++) { in DMPlexComputeInjectorTree()
3667 PetscCall(PetscSectionGetDof(globalCoarse, p, &dof)); in DMPlexComputeInjectorTree()
3668 PetscCall(PetscSectionGetConstraintDof(globalCoarse, p, &cdof)); in DMPlexComputeInjectorTree()
3670 PetscCall(PetscSectionGetOffset(globalCoarse, p, &gOff)); in DMPlexComputeInjectorTree()
3679 PetscCall(PetscSectionGetFieldDof(localCoarse, p, f, &fDof)); in DMPlexComputeInjectorTree()
3682 …PetscCall(DMPlexGetIndicesPointFields_Internal(localCoarse, PETSC_FALSE, p, gOff < 0 ? -(gOff + 1)… in DMPlexComputeInjectorTree()
3684 …PetscCall(DMPlexGetIndicesPoint_Internal(localCoarse, PETSC_FALSE, p, gOff < 0 ? -(gOff + 1) : gOf… in DMPlexComputeInjectorTree()
3688 PetscCall(PetscSectionGetDof(multiRootSec, p, &numLeaves)); in DMPlexComputeInjectorTree()
3689 PetscCall(PetscSectionGetOffset(multiRootSec, p, &leafStart)); in DMPlexComputeInjectorTree()
3762 PetscInt pStartC, pEndC, pStartF, pEndF, p, cellStart, cellEnd; in DMPlexTransferVecTree_Interpolate() local
3787 PetscInt p = leaves ? leaves[l] : l; in DMPlexTransferVecTree_Interpolate() local
3789 PetscCall(PetscSectionGetDof(globalFine, p, &dof)); in DMPlexTransferVecTree_Interpolate()
3790 PetscCall(PetscSectionGetConstraintDof(globalFine, p, &cdof)); in DMPlexTransferVecTree_Interpolate()
3795 PetscInt p = leaves ? leaves[l] : l; in DMPlexTransferVecTree_Interpolate() local
3797 PetscCall(PetscSectionGetDof(globalFine, p, &dof)); in DMPlexTransferVecTree_Interpolate()
3798 PetscCall(PetscSectionGetConstraintDof(globalFine, p, &cdof)); in DMPlexTransferVecTree_Interpolate()
3806 for (p = pStartC; p < pEndC; p++) maxChildIds[p - pStartC] = -2; in DMPlexTransferVecTree_Interpolate()
3850 for (p = pStartC; p < pEndC; p++) { /* count the sizes of the indices and matrices */ in DMPlexTransferVecTree_Interpolate()
3852 PetscInt maxChildId = maxChildIds[p - pStartC]; in DMPlexTransferVecTree_Interpolate()
3855 PetscCall(PetscSectionGetDof(globalCoarse, p, &dof)); in DMPlexTransferVecTree_Interpolate()
3862 PetscCall(DMPlexGetTransitiveClosure(coarse, p, PETSC_TRUE, &closureSize, &closure)); in DMPlexTransferVecTree_Interpolate()
3869 PetscCall(DMPlexRestoreTransitiveClosure(coarse, p, PETSC_TRUE, &closureSize, &closure)); in DMPlexTransferVecTree_Interpolate()
3871 PetscCall(PetscSectionGetDof(localCoarse, p, &numValues)); in DMPlexTransferVecTree_Interpolate()
3874 if (maxChildId >= 0 && grad && p >= cellStart && p < cellEnd) { in DMPlexTransferVecTree_Interpolate()
3878 PetscCall(PetscSectionSetDof(rootValuesSec, p, numValues)); in DMPlexTransferVecTree_Interpolate()
3888 for (p = pStartC; p < pEndC; p++) { in DMPlexTransferVecTree_Interpolate()
3892 PetscInt maxChildId = maxChildIds[p - pStartC]; in DMPlexTransferVecTree_Interpolate()
3894 PetscCall(PetscSectionGetDof(rootValuesSec, p, &numValues)); in DMPlexTransferVecTree_Interpolate()
3896 PetscCall(PetscSectionGetOffset(rootValuesSec, p, &pValOff)); in DMPlexTransferVecTree_Interpolate()
3900 PetscCall(DMPlexVecGetClosure(coarse, NULL, vecCoarseLocal, p, &closureSize, &pVal)); in DMPlexTransferVecTree_Interpolate()
3901 if (grad && p >= cellStart && p < cellEnd) { in DMPlexTransferVecTree_Interpolate()
3908 PetscCall(DMPlexPointLocalRead(cellDM, p, cellGeomArray, (void *)&cg)); in DMPlexTransferVecTree_Interpolate()
3911 PetscCall(DMPlexPointGlobalRead(gradDM, p, gradArray, (void *)&gradVals)); in DMPlexTransferVecTree_Interpolate()
3917 PetscCall(PetscSectionGetDof(localCoarse, p, &lDof)); in DMPlexTransferVecTree_Interpolate()
3918 PetscCall(PetscSectionGetOffset(localCoarse, p, &lOff)); in DMPlexTransferVecTree_Interpolate()
3964 for (p = leafStart; p < leafEnd; p++) { in DMPlexTransferVecTree_Interpolate()
3971 PetscCall(PetscSectionGetDof(globalFine, p, &gDof)); in DMPlexTransferVecTree_Interpolate()
3972 PetscCall(PetscSectionGetDof(localFine, p, &lDof)); in DMPlexTransferVecTree_Interpolate()
3973 PetscCall(PetscSectionGetConstraintDof(globalFine, p, &gcDof)); in DMPlexTransferVecTree_Interpolate()
3975 PetscCall(PetscSectionGetOffset(globalFine, p, &gOff)); in DMPlexTransferVecTree_Interpolate()
3976 PetscCall(PetscSectionGetDof(leafValuesSec, p, &numValues)); in DMPlexTransferVecTree_Interpolate()
3978 PetscCall(PetscSectionGetOffset(leafValuesSec, p, &pValOff)); in DMPlexTransferVecTree_Interpolate()
3984 childId = cids[p - pStartF]; in DMPlexTransferVecTree_Interpolate()
3990 PetscCall(PetscSectionGetFieldDof(localFine, p, f, &rowDof)); in DMPlexTransferVecTree_Interpolate()
3996 …PetscCall(DMPlexGetIndicesPointFields_Internal(localFine, PETSC_FALSE, p, gOff, offsetsCopy, PETSC… in DMPlexTransferVecTree_Interpolate()
4002 …PetscCall(DMPlexGetIndicesPoint_Internal(localFine, PETSC_FALSE, p, gOff, offsetsCopy, PETSC_FALSE… in DMPlexTransferVecTree_Interpolate()
4009 if (grad && p >= cellStart && p < cellEnd) { in DMPlexTransferVecTree_Interpolate()
4029 if (f == fvField && p >= cellStart && p < cellEnd) { in DMPlexTransferVecTree_Interpolate()
4035 PetscCall(DMPlexComputeCellGeometryFVM(fine, p, NULL, centroid, NULL)); in DMPlexTransferVecTree_Interpolate()
4070 PetscInt pStartC, pEndC, pStartF, pEndF, p; in DMPlexTransferVecTree_Inject() local
4112 for (p = pStartC; p < pEndC; p++) { in DMPlexTransferVecTree_Inject()
4116 PetscCall(PetscSectionGetDof(globalCoarse, p, &dof)); in DMPlexTransferVecTree_Inject()
4117 PetscCall(PetscSectionGetConstraintDof(globalCoarse, p, &cdof)); in DMPlexTransferVecTree_Inject()
4119 PetscCall(PetscSectionGetDof(localCoarse, p, &dof)); in DMPlexTransferVecTree_Inject()
4120 PetscCall(PetscSectionGetOffset(globalCoarse, p, &gOff)); in DMPlexTransferVecTree_Inject()
4129 PetscCall(PetscSectionGetFieldDof(localCoarse, p, f, &fDof)); in DMPlexTransferVecTree_Inject()
4132 …PetscCall(DMPlexGetIndicesPointFields_Internal(localCoarse, PETSC_FALSE, p, gOff < 0 ? -(gOff + 1)… in DMPlexTransferVecTree_Inject()
4134 …PetscCall(DMPlexGetIndicesPoint_Internal(localCoarse, PETSC_FALSE, p, gOff < 0 ? -(gOff + 1) : gOf… in DMPlexTransferVecTree_Inject()
4138 PetscCall(PetscSectionGetDof(multiRootSec, p, &numLeaves)); in DMPlexTransferVecTree_Inject()
4139 PetscCall(PetscSectionGetOffset(multiRootSec, p, &leafStart)); in DMPlexTransferVecTree_Inject()