Home
last modified time | relevance | path

Searched refs:ilocal (Results 1 – 25 of 30) sorted by relevance

12

/petsc/src/vec/is/sf/tests/
H A Dex19.c11 PetscInt *ilocal; member
24 ctx->ilocal = NULL; in GetOptions()
91 PetscInt *ilocal; in CreateSF0() local
95 PetscCall(PetscMalloc1(nLeaves + 1, &ctx->ilocal)); in CreateSF0()
97 ilocal = ctx->ilocal; in CreateSF0()
99 ilocal[nLeaves] = -ctx->leaveStep; in CreateSF0()
104 ilocal[j] = ilocal[j + 1] + ctx->leaveStep; in CreateSF0()
109 PetscCall(PetscSFSetGraph(sf, nroots, nLeaves, ilocal, ctx->localmode, iremote, ctx->remotemode)); in CreateSF0()
128 PetscInt *ilocal = NULL; in CreateSF1() local
135 ilocal = NULL; in CreateSF1()
[all …]
H A Dex18.c97 const PetscInt *ilocal; in PetscSFViewCustom() local
104 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in PetscSFViewCustom()
117 …d, %2" PetscInt_FMT ") = %3" PetscInt_FMT "\n", rank, (PetscMPIInt)(ilocal ? ilocal[i] : i), (Pet… in PetscSFViewCustom()
129 PetscInt *ilocal = NULL; in CreateReferenceSF_Regular() local
135 ilocal = NULL; in CreateReferenceSF_Regular()
136 if (ctx->sparseLeaves) PetscCall(PetscCalloc1(nLeaves + 1, &ilocal)); in CreateReferenceSF_Regular()
139 if (ctx->sparseLeaves) ilocal[j + 1] = ilocal[j] + ctx->leaveStep; in CreateReferenceSF_Regular()
157 …PetscCall(PetscSFSetGraph(sf, nroots, nLeaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINT… in CreateReferenceSF_Regular()
166 PetscCall(PetscSFSetGraphLayout(sf, map, nLeaves, ilocal, PETSC_OWN_POINTER, gremote)); in CreateReferenceSF_Regular()
194 PetscInt *ilocal = NULL; in CreateSFs_Irregular() local
[all …]
H A Dex1.c9 const PetscInt *ilocal; in CheckGraphNotSet() local
14 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in CheckGraphNotSet()
17 PetscCheck(!ilocal, PETSC_COMM_SELF, PETSC_ERR_PLIB, "SF graph is set"); in CheckGraphNotSet()
27 const PetscInt *ilocal; in CheckGraphEmpty() local
32 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in CheckGraphEmpty()
35 PetscCheck(!ilocal, PETSC_COMM_SELF, PETSC_ERR_PLIB, "SF graph is not empty"); in CheckGraphEmpty()
/petsc/src/vec/is/sf/impls/basic/alltoall/
H A Dsfalltoall.c43 …ltoall(PetscSF sf, PetscInt *nroots, PetscInt *nleaves, const PetscInt **ilocal, const PetscSFNode… in PetscSFGetGraph_Alltoall() argument
50 if (ilocal) *ilocal = NULL; /* Contiguous local indices */ in PetscSFGetGraph_Alltoall()
67 PetscInt nroots = 1, nleaves = 1, *ilocal; in PetscSFCreateLocalSF_Alltoall() local
76 PetscCall(PetscMalloc1(nleaves, &ilocal)); in PetscSFCreateLocalSF_Alltoall()
78 ilocal[0] = rank; in PetscSFCreateLocalSF_Alltoall()
91 PetscInt i, *tmproots, *ilocal; in PetscSFCreateEmbeddedRootSF_Alltoall() local
128 PetscCall(PetscMalloc1(nleaves, &ilocal)); in PetscSFCreateEmbeddedRootSF_Alltoall()
131 ilocal[i] = leaves[i]; in PetscSFCreateEmbeddedRootSF_Alltoall()
137 …PetscCall(PetscSFSetGraph(esf, sf->nleaves, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN… in PetscSFCreateEmbeddedRootSF_Alltoall()
/petsc/src/vec/is/tests/
H A Dex5.c127 PetscInt nroots = -1, nleaves = -1, *ilocal; in main() local
173 PetscCall(PetscMalloc1(nleaves, &ilocal)); in main()
175 ilocal[0] = 3; in main()
182 PetscCall(PetscMalloc1(nleaves, &ilocal)); in main()
184 ilocal[0] = 1; in main()
190 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINT… in main()
/petsc/src/vec/is/sf/interface/
H A Dsf.c255 const PetscInt *ilocal; in PetscSFCheckGraphValid_Private() local
260 PetscCall(PetscSFGetGraph(sf, NULL, &nleaves, &ilocal, &iremote)); in PetscSFCheckGraphValid_Private()
265 const PetscInt leaf = ilocal ? ilocal[i] : i; in PetscSFCheckGraphValid_Private()
456 PetscErrorCode PetscSFSetGraph(PetscSF sf, PetscInt nroots, PetscInt nleaves, PetscInt ilocal[], Pe… in PetscSFSetGraph() argument
462 if (nleaves > 0 && ilocal) PetscAssertPointer(ilocal, 4); in PetscSFSetGraph()
486 if (localmode == PETSC_COPY_VALUES && ilocal) { in PetscSFSetGraph()
490 PetscCall(PetscArraycpy(tlocal, ilocal, nleaves)); in PetscSFSetGraph()
491 ilocal = tlocal; in PetscSFSetGraph()
501 if (nleaves && ilocal) { in PetscSFSetGraph()
504 PetscCall(PetscSortIntWithDataArray(nleaves, ilocal, iremote, sizeof(PetscSFNode), &work)); in PetscSFSetGraph()
[all …]
/petsc/src/vec/is/sf/tutorials/
H A Dex3.c16 PetscInt *ilocal; in main() local
38 PetscCall(PetscMalloc1(nleaves, &ilocal)); in main()
40 for (i = 0; i < nleaves; i++) ilocal[i] = i; in main()
45 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINT… in main()
H A Dex2.c19 PetscInt *ilocal; in main() local
34 PetscCall(PetscMalloc1(nleaves, &ilocal)); in main()
36 for (i = 0; i < nleaves; i++) ilocal[i] = i; in main()
50 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINT… in main()
/petsc/src/vec/is/sf/utils/
H A Dsfutils.c30 …etGraphLayout(PetscSF sf, PetscLayout layout, PetscInt nleaves, PetscInt ilocal[], PetscCopyMode l… in PetscSFSetGraphLayout() argument
40 if (nleaves > 0 && ilocal) PetscAssertPointer(ilocal, 4); in PetscSFSetGraphLayout()
59 PetscCall(PetscSFSetGraph(sf, nroots, nleaves, ilocal, localmode, remote, PETSC_OWN_POINTER)); in PetscSFSetGraphLayout()
86 …yout(PetscSF sf, PetscLayout *layout, PetscInt *nleaves, const PetscInt *ilocal[], PetscInt *gremo… in PetscSFGetGraphLayout() argument
96 if (ilocal) PetscAssertPointer(ilocal, 4); in PetscSFGetGraphLayout()
98 PetscCall(PetscSFGetGraph(sf, &nr, &nl, ilocal, &ir)); in PetscSFGetGraphLayout()
569 PetscInt *lidxs, *work = NULL, *ilocal; in PetscLayoutMapLocal() local
581 PetscCall(PetscMalloc1(N, &ilocal)); in PetscLayoutMapLocal()
592 ilocal[nleaves] = r; in PetscLayoutMapLocal()
596 PetscCall(PetscSFSetGraph(sf, n, nleaves, ilocal, PETSC_OWN_POINTER, ridxs, PETSC_OWN_POINTER)); in PetscLayoutMapLocal()
[all …]
/petsc/src/vec/is/sf/interface/ftn-custom/
H A Dzsf.c33 const PetscInt *ilocal; in petscsfgetgraph_() local
37 *ierr = PetscSFGetGraph(*sf, nroots, nleaves, &ilocal, &iremote); in petscsfgetgraph_()
40 if (!ilocal) nl = 0; in petscsfgetgraph_()
41 *ierr = F90Array1dCreate((void *)ilocal, MPIU_INT, 1, nl, ailocal PETSC_F90_2PTR_PARAM(pilocal)); in petscsfgetgraph_()
/petsc/src/vec/is/sf/impls/basic/allgatherv/
H A Dsfallgatherv.c4 …atherv(PetscSF sf, PetscInt *nroots, PetscInt *nleaves, const PetscInt **ilocal, const PetscSFNode… in PetscSFGetGraph_Allgatherv() argument
14 if (ilocal) *ilocal = NULL; /* Contiguous leaves */ in PetscSFGetGraph_Allgatherv()
407 PetscInt i, nroots, nleaves, rstart, *ilocal; in PetscSFCreateLocalSF_Allgatherv() local
414 PetscCall(PetscMalloc1(nleaves, &ilocal)); in PetscSFCreateLocalSF_Allgatherv()
419 ilocal[i] = rstart + i; /* lsf does not change leave indices */ in PetscSFCreateLocalSF_Allgatherv()
425 …PetscCall(PetscSFSetGraph(lsf, nroots, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POIN… in PetscSFCreateLocalSF_Allgatherv()
/petsc/src/vec/ftn-mod/
H A Dpetscvec.h9070 subroutine PetscSFRestoreGraph(sf, nroots, nleaves, ilocal, iremote, ierr)
75 PetscInt, pointer :: ilocal(:)
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DSF.pyx160 The number of leaves can be determined from the size of ``ilocal``.
167 ilocal : ArrayInt
179 cdef const PetscInt *ilocal = NULL
181 CHKERR(PetscSFGetGraph(self.sf, &nroots, &nleaves, &ilocal, &iremote))
182 if ilocal == NULL:
185 local = array_i(nleaves, ilocal)
218 cdef PetscInt *ilocal = NULL
222 local = iarray_i(local, &nleaves, &ilocal)
227 …CHKERR(PetscSFSetGraph(self.sf, cnroots, nleaves, ilocal, PETSC_COPY_VALUES, iremote, PETSC_COPY_V…
/petsc/src/vec/vec/utils/
H A Dvscat.c673 PetscInt i, n, N, nroots, nleaves, *ilocal, xstart, ystart, ixsize, iysize, xlen, ylen; in VecScatterCreate() local
922 PetscCall(PetscMalloc1(nleaves,&ilocal)); in VecScatterCreate()
926 ilocal[i] = rootdata[2*i] - ystart; /* convert y's global index to local index */ in VecScatterCreate()
1028 PetscCall(PetscMalloc1(nleaves, &ilocal)); in VecScatterCreate()
1034ilocal[k] = ryindices[k] - yrange[yrank]; /* Convert … in VecScatterCreate()
1051 PetscCall(PetscMalloc1(nleaves, &ilocal)); in VecScatterCreate()
1053 PetscCall(PetscArraycpy(ilocal, yindices, nleaves)); in VecScatterCreate()
1067 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_OWN_POINT… in VecScatterCreate()
/petsc/src/vec/is/is/interface/
H A Dindex.c39 PetscInt *leaf_data, *root_data, *gidxs, *ilocal, *ilocalneg; in ISRenumber() local
56 PetscCall(PetscMalloc1(n, &ilocal)); in ISRenumber()
71 ilocal[npos++] = i; in ISRenumber()
74 PetscCall(PetscFree(ilocal)); in ISRenumber()
101 PetscCall(PetscFree(ilocal)); in ISRenumber()
115 for (i = 0; i < npos; i++) gidxs[i] = (ilocal ? idxs[ilocal[i]] : idxs[i]) - gbounds[0]; in ISRenumber()
118 PetscCall(PetscSFSetGraphLayout(sf, map, npos, ilocal, PETSC_USE_POINTER, gidxs)); in ISRenumber()
158 PetscCall(PetscFree(ilocal)); in ISRenumber()
204 PetscCall(PetscFree(ilocal)); in ISRenumber()
/petsc/src/dm/impls/plex/hdf5/
H A Dplexhdf5.c779 const PetscInt *ilocal; in DMPlexDistributionView_HDF5_Private() local
803 PetscCall(PetscSFGetGraph(pointSF, &nroots, &nleaves, &ilocal, &iremote)); in DMPlexDistributionView_HDF5_Private()
811 PetscInt ilocalp = (ilocal ? ilocal[p] : p); in DMPlexDistributionView_HDF5_Private()
1128 const PetscInt *ilocal; in CreateConesIS_Private() local
1132 PetscCall(PetscSFGetGraph(sfPoint, &nroots, &nleaves, &ilocal, &iremote)); in CreateConesIS_Private()
1137 …PetscCall(PetscSFSetGraph(sfPoint, nroots + vExtra, nleaves, (PetscInt *)ilocal, PETSC_COPY_VALUES… in CreateConesIS_Private()
2058 PetscInt *ilocal, nleaves, q; in DMPlexDistributionLoad_HDF5_Private() local
2080 PetscCall(PetscMalloc1(nleaves, &ilocal)); in DMPlexDistributionLoad_HDF5_Private()
2084 ilocal[q] = p; in DMPlexDistributionLoad_HDF5_Private()
2094 …PetscCall(PetscSFSetGraph(pointSF, *chartSize, nleaves, ilocal, PETSC_OWN_POINTER, iremote, PETSC_… in DMPlexDistributionLoad_HDF5_Private()
[all …]
/petsc/src/dm/impls/plex/
H A Dplexdistribute.c778 PetscInt *pointDepths, *remoteDepths, *ilocal; in DMPlexCreateOverlapMigrationSF() local
819 PetscCall(PetscMalloc1(newLeaves, &ilocal)); in DMPlexCreateOverlapMigrationSF()
826 ilocal[point] = point; in DMPlexCreateOverlapMigrationSF()
850 ilocal[point] = point; in DMPlexCreateOverlapMigrationSF()
861 …PetscCall(PetscSFSetGraph(*migrationSF, pEnd - pStart, newLeaves, ilocal, PETSC_OWN_POINTER, iremo… in DMPlexCreateOverlapMigrationSF()
890 PetscInt *ilocal; in DMPlexStratifyMigrationSF() local
970 PetscCall(PetscMalloc1(nleaves, &ilocal)); in DMPlexStratifyMigrationSF()
974 ilocal[p] = ctShift[ct] + ctIdx[ct]; in DMPlexStratifyMigrationSF()
979 …PetscCall(PetscSFSetGraph(*migrationSF, nroots, nleaves, ilocal, PETSC_OWN_POINTER, (PetscSFNode *… in DMPlexStratifyMigrationSF()
H A Dplexpartition.c1496 const PetscInt *ilocal; in DMPlexRewriteSF() local
1509 PetscCall(PetscSFGetGraph(sf, &nroots, &nleafs, &ilocal, &iremote)); in DMPlexRewriteSF()
1512 for (i = 0; i < nleafs; i++) isLeaf[ilocal[i] - pStart] = PETSC_TRUE; in DMPlexRewriteSF()
1672 const PetscInt *degrees, *ilocal; in DMPlexRebalanceSharedPoints() local
1739 PetscCall(PetscSFGetGraph(sf, &nroots, &nleafs, &ilocal, &iremote)); in DMPlexRebalanceSharedPoints()
1750 for (i = 0; i < nleafs; i++) isLeaf[ilocal[i] - pStart] = PETSC_TRUE; in DMPlexRebalanceSharedPoints()
H A Dplexsfc.c565 const PetscInt *ilocal; in DMPlexCorrectOrientationForIsoperiodic() local
583 PetscCall(PetscSFGetGraph(sectionSF, NULL, &nleaves, &ilocal, &iremote)); in DMPlexCorrectOrientationForIsoperiodic()
586 PetscInt local_index = ilocal ? ilocal[l] : l; in DMPlexCorrectOrientationForIsoperiodic()
H A Dplexsubmesh.c55 const PetscInt *ilocal = NULL; in DMPlexMarkBoundaryFaces_Internal() local
73 if (sf) PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, &iremote)); in DMPlexMarkBoundaryFaces_Internal()
87 c = ilocal ? ilocal[i] : i; in DMPlexMarkBoundaryFaces_Internal()
3416 const PetscInt *ilocal = NULL; in DMPlexCreateSubmeshGeneric_Interpolated() local
3419 PetscCall(PetscSFGetGraph(pointSF, NULL, &nleaves, &ilocal, NULL)); in DMPlexCreateSubmeshGeneric_Interpolated()
3422 for (p = 0; p < nleaves; ++p) isGhost[(ilocal ? ilocal[p] : p) - pStart] = PETSC_TRUE; in DMPlexCreateSubmeshGeneric_Interpolated()
/petsc/src/ksp/pc/impls/bddc/
H A Dbddcgraph.c1096 PetscInt *ilocal, *queue_global_uniq; in PCBDDCGraphSetUp() local
1101 PetscCall(PetscMalloc1(nli, &ilocal)); in PCBDDCGraphSetUp()
1129 ilocal[nli] = subset_idxs[k]; in PCBDDCGraphSetUp()
1140 …PetscCall(PetscSFSetGraph(graph->interface_subset_sf, nri, nli, ilocal, PETSC_OWN_POINTER, iremote… in PCBDDCGraphSetUp()
/petsc/src/dm/label/
H A Ddmlabel.c2109 const PetscInt *rootDegree, *ilocal; in DMLabelGather() local
2139 PetscCall(PetscSFGetGraph(sf, &nroots, &nleaves, &ilocal, NULL)); in DMLabelGather()
2143 PetscInt ilp = ilocal ? ilocal[p] : p; in DMLabelGather()
/petsc/src/mat/impls/nest/
H A Dmatnest.c1543 PetscInt *ilocal, *iremote; in MatNestCreateAggregateL2G_Private() local
1552 PetscCall(PetscMalloc2(mi, &ilocal, mi, &iremote)); in MatNestCreateAggregateL2G_Private()
1555 ilocal[nleaves] = j; in MatNestCreateAggregateL2G_Private()
1564 PetscCall(PetscSFSetGraphLayout(sf, map, nleaves, ilocal, PETSC_USE_POINTER, iremote)); in MatNestCreateAggregateL2G_Private()
1569 PetscCall(PetscFree2(ilocal, iremote)); in MatNestCreateAggregateL2G_Private()
/petsc/src/dm/impls/plex/cgns/
H A Dplexcgns2.c1941 const PetscInt *ilocal, field = 0; in DMPlexCreateNodeNumbering() local
1956 else PetscCall(PetscSFGetGraph(point_sf, NULL, &nleaves, &ilocal, NULL)); in DMPlexCreateNodeNumbering()
1965 if (leaf < nleaves && p == ilocal[leaf]) { // skip points owned by a different process in DMPlexCreateNodeNumbering()
1975 if (leaf < nleaves && p == ilocal[leaf]) { // skip points owned by a different process in DMPlexCreateNodeNumbering()
/petsc/src/dm/impls/network/
H A Dnetwork.c1982 const PetscInt *ilocal; in PetscSFGetSubSF() local
1986 PetscCall(PetscSFGetGraph(mainsf, &nroots, &nleaves, &ilocal, &iremote)); in PetscSFGetSubSF()
1990 PetscCall(ISGlobalToLocalMappingApply(map, IS_GTOLM_MASK, nleaves, ilocal, NULL, ilocal_map)); in PetscSFGetSubSF()
2008 iremote_sub[nleaves_sub].index = remote_points[ilocal[i]]; in PetscSFGetSubSF()

12