Lines Matching refs:nroots
64 b->nroots = -1; in PetscSFCreate()
118 sf->nroots = -1; in PetscSFReset()
456 PetscErrorCode PetscSFSetGraph(PetscSF sf, PetscInt nroots, PetscInt nleaves, PetscInt ilocal[], Pe… in PetscSFSetGraph() argument
464 …PetscCheck(nroots >= 0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "nroots %" PetscInt_FMT ", cann… in PetscSFSetGraph()
471 if (sf->nroots >= 0) { /* Reset only if graph already set */ in PetscSFSetGraph()
483 sf->nroots = nroots; in PetscSFSetGraph()
626 sf->nroots = n; in PetscSFSetGraphWithPattern()
632 sf->nroots = n; in PetscSFSetGraphWithPattern()
638 sf->nroots = size; in PetscSFSetGraphWithPattern()
671 PetscInt i, nroots, nleaves, maxlocal, count, *newilocal; in PetscSFCreateInverseSF() local
680 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, NULL)); in PetscSFCreateInverseSF()
684 PetscCall(PetscMalloc2(nroots, &roots, maxlocal, &leaves)); in PetscSFCreateInverseSF()
689 for (i = 0; i < nroots; i++) { in PetscSFCreateInverseSF()
697 for (i = 0, count = 0; i < nroots; i++) in PetscSFCreateInverseSF()
699 if (count == nroots) newilocal = NULL; in PetscSFCreateInverseSF()
702 for (i = 0, count = 0; i < nroots; i++) { in PetscSFCreateInverseSF()
750 PetscInt nroots, nleaves; in PetscSFDuplicate() local
753 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in PetscSFDuplicate()
754 …PetscCall(PetscSFSetGraph(*newsf, nroots, nleaves, (PetscInt *)ilocal, PETSC_COPY_VALUES, (PetscSF… in PetscSFDuplicate()
804 PetscErrorCode PetscSFGetGraph(PetscSF sf, PetscInt *nroots, PetscInt *nleaves, const PetscInt *ilo… in PetscSFGetGraph() argument
809 PetscCall(sf->ops->GetGraph(sf, nroots, nleaves, ilocal, iremote)); in PetscSFGetGraph()
811 if (nroots) *nroots = sf->nroots; in PetscSFGetGraph()
909 … PetscInt_FMT ", leaves=%" PetscInt_FMT ", remote ranks=%d\n", rank, sf->nroots, sf->nleaves, sf->… in PetscSFView()
1254 if (sf->nroots < 0) { /* Graph has not been set yet; why do we need this? */ in PetscSFGetMultiSF()
1267 PetscCall(PetscMalloc3(sf->nroots + 1, &inoffset, maxlocal, &outones, maxlocal, &outoffset)); in PetscSFGetMultiSF()
1269 for (i = 0; i < sf->nroots; i++) inoffset[i + 1] = inoffset[i] + indegree[i]; in PetscSFGetMultiSF()
1273 for (i = 0; i < sf->nroots; i++) inoffset[i] -= indegree[i]; /* Undo the increment */ in PetscSFGetMultiSF()
1275 …for (i = 0; i < sf->nroots; i++) PetscCheck(inoffset[i] + indegree[i] == inoffset[i + 1], PETSC_CO… in PetscSFGetMultiSF()
1284 …PetscCall(PetscSFSetGraph(sf->multi, inoffset[sf->nroots], sf->nleaves, sf->mine, PETSC_COPY_VALUE… in PetscSFGetMultiSF()
1290 for (i = 0, maxdegree = 0; i < sf->nroots; i++) maxdegree = PetscMax(maxdegree, indegree[i]); in PetscSFGetMultiSF()
1291 …PetscCall(PetscMalloc5(sf->multi->nroots, &inranks, sf->multi->nroots, &newoffset, maxlocal, &outr… in PetscSFGetMultiSF()
1296 for (i = 0; i < sf->nroots; i++) { in PetscSFGetMultiSF()
1309 …PetscCall(PetscSFSetGraph(sf->multi, inoffset[sf->nroots], sf->nleaves, sf->mine, PETSC_COPY_VALUE… in PetscSFGetMultiSF()
1341 PetscInt i, j, n, nroots, nleaves, esf_nleaves, *new_ilocal, minleaf, maxleaf, maxlocal; in PetscSFCreateEmbeddedRootSF() local
1357 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in PetscSFCreateEmbeddedRootSF()
1363 …cted[i] < nroots, comm, PETSC_ERR_ARG_OUTOFRANGE, "selected root index %" PetscInt_FMT " is out of… in PetscSFCreateEmbeddedRootSF()
1371 PetscCall(PetscCalloc2(nroots, &rootdata, maxlocal, &leafmem)); in PetscSFCreateEmbeddedRootSF()
1400 …PetscCall(PetscSFSetGraph(*esf, nroots, esf_nleaves, new_ilocal, PETSC_OWN_POINTER, new_iremote, P… in PetscSFCreateEmbeddedRootSF()
1429 PetscInt i, nroots, *leaves, *new_ilocal; in PetscSFCreateEmbeddedLeafSF() local
1448 PetscCall(PetscSFGetGraph(sf, &nroots, NULL, &ilocal, &iremote)); in PetscSFCreateEmbeddedLeafSF()
1458 …PetscCall(PetscSFSetGraph(*newsf, nroots, nselected, new_ilocal, PETSC_OWN_POINTER, new_iremote, P… in PetscSFCreateEmbeddedLeafSF()
1795 PetscInt i, nroots = sf->nroots, maxlocal; in PetscSFComputeDegreeBegin() local
1798 PetscCall(PetscMalloc1(nroots, &sf->degree)); in PetscSFComputeDegreeBegin()
1800 for (i = 0; i < nroots; i++) sf->degree[i] = 0; in PetscSFComputeDegreeBegin()
1866 PetscInt k = 0, nroots, nmroots; in PetscSFComputeMultiRootOriginalNumbering() local
1870 PetscCall(PetscSFGetGraph(sf, &nroots, NULL, NULL, NULL)); in PetscSFComputeMultiRootOriginalNumbering()
1871 if (nroots) PetscAssertPointer(degree, 2); in PetscSFComputeMultiRootOriginalNumbering()
1877 for (PetscInt i = 0; i < nroots; i++) { in PetscSFComputeMultiRootOriginalNumbering()
2245 PetscInt i, j, nroots, nleaves, lnleaves, *lilocal; in PetscSFCreateLocalSF_Private() local
2260 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in PetscSFCreateLocalSF_Private()
2279 …PetscCall(PetscSFSetGraph(lsf, nroots, lnleaves, lilocal, PETSC_OWN_POINTER, liremote, PETSC_OWN_P… in PetscSFCreateLocalSF_Private()