Home
last modified time | relevance | path

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

12

/petsc/src/mat/graphops/order/
H A Ddegree.c28 PetscInt *xadj = (PetscInt *)inxadj; /* Used as temporary and reset within this function */ in SPARSEPACKdegree() local
44 --xadj; in SPARSEPACKdegree()
47 xadj[*root] = -xadj[*root]; in SPARSEPACKdegree()
60 jstrt = -xadj[node]; in SPARSEPACKdegree()
61 i__2 = xadj[node + 1]; in SPARSEPACKdegree()
70 if (xadj[nbr] < 0) goto L200; in SPARSEPACKdegree()
71 xadj[nbr] = -xadj[nbr]; in SPARSEPACKdegree()
87 xadj[node] = -xadj[node]; in SPARSEPACKdegree()
H A Dfndsep.c36 PetscInt *xadj = (PetscInt *)inxadj; /* Used as temporary and reset within this function */ in SPARSEPACKfndsep() local
52 --xadj; in SPARSEPACKfndsep()
54 PetscCall(SPARSEPACKfnroot(root, &xadj[1], &adjncy[1], &mask[1], &nlvl, &xls[1], &ls[1])); in SPARSEPACKfndsep()
80 xadj[node] = -xadj[node]; in SPARSEPACKfndsep()
86 jstrt = xadj[node]; in SPARSEPACKfndsep()
87 i__2 = xadj[node + 1]; in SPARSEPACKfndsep()
92 if (xadj[nbr] > 0) goto L400; in SPARSEPACKfndsep()
105 xadj[node] = -xadj[node]; in SPARSEPACKfndsep()
H A Dfn1wd.c32 PetscInt *xadj = (PetscInt *)inxadj; /* Used as temporary and reset */ in SPARSEPACKfn1wd() local
51 --xadj; in SPARSEPACKfn1wd()
53 PetscCall(SPARSEPACKfnroot(root, &xadj[1], &adjncy[1], &mask[1], nlvl, &xls[1], &ls[1])); in SPARSEPACKfn1wd()
84 xadj[node] = -xadj[node]; in SPARSEPACKfn1wd()
92 kstrt = xadj[node]; in SPARSEPACKfn1wd()
93 i__2 = xadj[node + 1]; in SPARSEPACKfn1wd()
98 if (xadj[nbr] > 0) goto L600; in SPARSEPACKfn1wd()
110 xadj[node] = -xadj[node]; in SPARSEPACKfn1wd()
H A Dqmdrch.c30 PetscErrorCode SPARSEPACKqmdrch(const PetscInt *root, const PetscInt *xadj, const PetscInt *adjncy,… in SPARSEPACKqmdrch() argument
48 --xadj; in SPARSEPACKqmdrch()
52 istrt = xadj[*root]; in SPARSEPACKqmdrch()
53 istop = xadj[*root + 1] - 1; in SPARSEPACKqmdrch()
74 jstrt = xadj[nabor]; in SPARSEPACKqmdrch()
75 jstop = xadj[nabor + 1] - 1; in SPARSEPACKqmdrch()
H A Dfnroot.c32 PetscErrorCode SPARSEPACKfnroot(PetscInt *root, const PetscInt *xadj, const PetscInt *adjncy, Petsc… in SPARSEPACKfnroot() argument
47 --xadj; in SPARSEPACKfnroot()
49 PetscCall(SPARSEPACKrootls(root, &xadj[1], &adjncy[1], &mask[1], nlvl, &xls[1], &ls[1])); in SPARSEPACKfnroot()
63 kstrt = xadj[node]; in SPARSEPACKfnroot()
64 kstop = xadj[node + 1] - 1; in SPARSEPACKfnroot()
77 PetscCall(SPARSEPACKrootls(root, &xadj[1], &adjncy[1], &mask[1], &nunlvl, &xls[1], &ls[1])); in SPARSEPACKfnroot()
H A Dqmdqt.c26 PetscErrorCode SPARSEPACKqmdqt(const PetscInt *root, const PetscInt *xadj, const PetscInt *inadjncy… in SPARSEPACKqmdqt() argument
41 --xadj; in SPARSEPACKqmdqt()
47 jstrt = xadj[node]; in SPARSEPACKqmdqt()
48 jstop = xadj[node + 1] - 2; in SPARSEPACKqmdqt()
76 jstrt = xadj[node]; in SPARSEPACKqmdqt()
77 jstop = xadj[node + 1] - 1; in SPARSEPACKqmdqt()
H A Dqmdupd.c32 PetscErrorCode SPARSEPACKqmdupd(const PetscInt *xadj, const PetscInt *adjncy, const PetscInt *nlist… in SPARSEPACKqmdupd() argument
56 --xadj; in SPARSEPACKqmdupd()
65 jstrt = xadj[node]; in SPARSEPACKqmdupd()
66 jstop = xadj[node + 1] - 1; in SPARSEPACKqmdupd()
79 …if (nhdsze > 0) PetscCall(SPARSEPACKqmdmrg(&xadj[1], &adjncy[1], &deg[1], &qsize[1], &qlink[1], &m… in SPARSEPACKqmdupd()
88 …PetscCall(SPARSEPACKqmdrch(&node, &xadj[1], &adjncy[1], &deg[1], &marker[1], &rchsze, &rchset[1], … in SPARSEPACKqmdupd()
H A Dgenqmd.c44 PetscErrorCode SPARSEPACKgenqmd(const PetscInt *neqns, const PetscInt *xadj, const PetscInt *adjncy… in SPARSEPACKgenqmd() argument
67 --xadj; in SPARSEPACKgenqmd()
78 ndeg = xadj[node + 1] - xadj[node]; in SPARSEPACKgenqmd()
108 …PetscCall(SPARSEPACKqmdrch(&node, &xadj[1], &adjncy[1], &deg[1], &marker[1], &rchsze, &rchset[1], … in SPARSEPACKgenqmd()
127 …PetscCall(SPARSEPACKqmdupd(&xadj[1], &adjncy[1], &rchsze, &rchset[1], &deg[1], &qsize[1], &qlink[1… in SPARSEPACKgenqmd()
147 …if (nhdsze > 0) PetscCall(SPARSEPACKqmdqt(&node, &xadj[1], &adjncy[1], &marker[1], &rchsze, &rchse… in SPARSEPACKgenqmd()
H A Dgenrcm.c36 PetscErrorCode SPARSEPACKgenrcm(const PetscInt *neqns, const PetscInt *xadj, const PetscInt *adjncy… in SPARSEPACKgenrcm() argument
59 --xadj; in SPARSEPACKgenrcm()
74 PetscCall(SPARSEPACKfnroot(&root, &xadj[1], &adjncy[1], &mask[1], &nlvl, &xls[1], &perm[num])); in SPARSEPACKgenrcm()
75 PetscCall(SPARSEPACKrcm(&root, &xadj[1], &adjncy[1], &mask[1], &perm[num], &ccsize, &xls[1])); in SPARSEPACKgenrcm()
H A Dqmdmrg.c34 PetscErrorCode SPARSEPACKqmdmrg(const PetscInt *xadj, const PetscInt *adjncy, PetscInt *deg, PetscI… in SPARSEPACKqmdmrg() argument
52 --xadj; in SPARSEPACKqmdmrg()
70 jstrt = xadj[root]; in SPARSEPACKqmdmrg()
71 jstop = xadj[root + 1] - 1; in SPARSEPACKqmdmrg()
107 jstrt = xadj[node]; in SPARSEPACKqmdmrg()
108 jstop = xadj[node + 1] - 1; in SPARSEPACKqmdmrg()
H A Drcm.c37 PetscErrorCode SPARSEPACKrcm(const PetscInt *root, const PetscInt *xadj, const PetscInt *adjncy, Pe… in SPARSEPACKrcm() argument
55 --xadj; in SPARSEPACKrcm()
57 PetscCall(SPARSEPACKdegree(root, &xadj[1], &adjncy[1], &mask[1], &deg[1], ccsize, &perm[1])); in SPARSEPACKrcm()
71 jstrt = xadj[node]; in SPARSEPACKrcm()
72 jstop = xadj[node + 1] - 1; in SPARSEPACKrcm()
H A Drootls.c24 PetscErrorCode SPARSEPACKrootls(const PetscInt *root, const PetscInt *xadj, const PetscInt *adjncy,… in SPARSEPACKrootls() argument
40 --xadj; in SPARSEPACKrootls()
59 jstrt = xadj[node]; in SPARSEPACKrootls()
60 jstop = xadj[node + 1] - 1; in SPARSEPACKrootls()
H A Dgen1wd.c30 PetscErrorCode SPARSEPACKgen1wd(const PetscInt *neqns, const PetscInt *xadj, const PetscInt *adjncy… in SPARSEPACKgen1wd() argument
47 --xadj; in SPARSEPACKgen1wd()
59 …PetscCall(SPARSEPACKfn1wd(&root, &xadj[1], &adjncy[1], &mask[1], &nsep, &perm[num + 1], &nlvl, &xl… in SPARSEPACKgen1wd()
71 …PetscCall(SPARSEPACKrootls(&node, &xadj[1], &adjncy[1], &mask[1], &nlvl, &xls[1], &perm[num + 1])); in SPARSEPACKgen1wd()
H A Dgennd.c54 PetscErrorCode SPARSEPACKgennd(const PetscInt *neqns, const PetscInt *xadj, const PetscInt *adjncy,… in SPARSEPACKgennd() argument
70 --xadj; in SPARSEPACKgennd()
82 …PetscCall(SPARSEPACKfndsep(&root, &xadj[1], &adjncy[1], &mask[1], &nsep, &perm[num + 1], &xls[1], … in SPARSEPACKgennd()
/petsc/src/mat/tests/
H A Dex152.c29 idx_t ni, isize, *vtxdist, *xadj, *adjncy, *vwgt, *part; in main() local
65 PetscCall(PetscMalloc1(ni + 1, &xadj)); in main()
67 red = fread(xadj, sizeof(idx_t), ni + 1, fp); in main()
70 PetscCall(PetscMalloc1(xadj[ni], &adjncy)); in main()
73 red = fread(&adjncy[xadj[i]], sizeof(idx_t), xadj[i + 1] - xadj[i], fp); in main()
74 …PetscCheck(red == (size_t)(xadj[i + 1] - xadj[i]), PETSC_COMM_SELF, PETSC_ERR_SYS, "Unable to read… in main()
104 …PetscCallPARMETIS(ParMETIS_V3_PartGeomKway(vtxdist, xadj, adjncy, vwgt, NULL, &wgtflag, &numflag, … in main()
108 PetscCall(PetscFree(xadj)); in main()
/petsc/src/mat/graphops/order/metisnd/
H A Dmetisnd.c10 PetscInt i, j, iptr, ival, nrow, *xadj, *adjncy, *perm, *iperm; in MatGetOrdering_METISND() local
45 PetscCall(PetscMalloc4(nrow + 1, &xadj, ia[nrow], &adjncy, nrow, &perm, nrow, &iperm)); in MatGetOrdering_METISND()
49 xadj[iptr] = 0; in MatGetOrdering_METISND()
54 xadj[j + 1] = iptr; in MatGetOrdering_METISND()
57 …status = METIS_NodeND(&nrow, (idx_t *)xadj, (idx_t *)adjncy, NULL, options, (idx_t *)perm, (idx_t … in MatGetOrdering_METISND()
80 PetscCall(PetscFree4(xadj, adjncy, perm, iperm)); in MatGetOrdering_METISND()
/petsc/src/dm/partitioner/impls/ptscotch/
H A Dpartptscotch.c58 …Graph_Seq(SCOTCH_Num strategy, double imbalance, SCOTCH_Num n, SCOTCH_Num xadj[], SCOTCH_Num adjnc… in PTScotch_PartGraph_Seq() argument
64 SCOTCH_Num edgenbr = xadj[n]; in PTScotch_PartGraph_Seq()
83 …PetscCallPTSCOTCH(SCOTCH_graphBuild(&grafdat, 0, vertnbr, xadj, xadj + 1, velotab, NULL, edgenbr, … in PTScotch_PartGraph_Seq()
99 …I(SCOTCH_Num strategy, double imbalance, SCOTCH_Num vtxdist[], SCOTCH_Num xadj[], SCOTCH_Num adjnc… in PTScotch_PartGraph_MPI() argument
128 edgelocnbr = xadj[vertlocnbr]; in PTScotch_PartGraph_MPI()
131 …PetscCallPTSCOTCH(SCOTCH_dgraphBuild(&grafdat, 0, vertlocnbr, vertlocnbr, xadj, xadj + 1, veloloct… in PTScotch_PartGraph_MPI()
208 PetscInt *xadj = start; /* Start of edge list for each vertex */ in PetscPartitionerPartition_PTScotch() local
243 PetscCall(PetscMalloc1(xadj[nvtxs], &adjwgt)); in PetscPartitionerPartition_PTScotch()
244 …for (PetscInt e = 0; e < xadj[nvtxs]; ++e) PetscCall(PetscSectionGetDof(edgeSection, e, &adjwgt[e]… in PetscPartitionerPartition_PTScotch()
266 …if (rank == p) PetscCall(PTScotch_PartGraph_Seq(strat, imbal, nvtxs, xadj, adjncy, vwgt, adjwgt, n… in PetscPartitionerPartition_PTScotch()
[all …]
/petsc/src/dm/partitioner/impls/parmetis/
H A Dpartparmetis.c85 PetscInt *xadj = start; /* Start of edge list for each vertex */ in PetscPartitionerPartition_ParMetis() local
152 PetscCall(PetscMalloc1(xadj[nvtxs], &adjwgt)); in PetscPartitionerPartition_ParMetis()
153 …for (PetscInt e = 0; e < xadj[nvtxs]; ++e) PetscCall(PetscSectionGetDof(edgeSection, e, &adjwgt[e]… in PetscPartitionerPartition_ParMetis()
167 …err = METIS_PartGraphRecursive(&nvtxs, &ncon, xadj, adjncy, vwgt, NULL, adjwgt, &nparts, tpwgts, u… in PetscPartitionerPartition_ParMetis()
179 …err = METIS_PartGraphKway(&nvtxs, &ncon, xadj, adjncy, vwgt, NULL, adjwgt, &nparts, tpwgts, ubvec,… in PetscPartitionerPartition_ParMetis()
205 …err = ParMETIS_V3_PartKway(vtxdist, xadj, adjncy, vwgt, adjwgt, &wgtflag, &numflag, &ncon, &nparts… in PetscPartitionerPartition_ParMetis()
/petsc/src/mat/graphops/partition/impls/pmetis/
H A Dpmetis.c66 PetscInt *xadj = adj->i; in MatPartitioningApply_Parmetis_Private() local
78 …for (j = xadj[i]; j < xadj[i + 1]; j++) PetscCheck(adjncy[j] != i + rstart, PETSC_COMM_SELF, PETSC… in MatPartitioningApply_Parmetis_Private()
131 …PetscCallParmetis(ParMETIS_V32_NodeND, ((idx_t *)vtxdist, (idx_t *)xadj, (idx_t *)adjncy, (idx_t *… in MatPartitioningApply_Parmetis_Private()
153 …PetscCallParmetis(ParMETIS_V3_AdaptiveRepart, ((idx_t *)vtxdist, (idx_t *)xadj, (idx_t *)adjncy, (… in MatPartitioningApply_Parmetis_Private()
156 …PetscCallParmetis(ParMETIS_V3_RefineKway, ((idx_t *)vtxdist, (idx_t *)xadj, (idx_t *)adjncy, (idx_… in MatPartitioningApply_Parmetis_Private()
159 …PetscCallParmetis(ParMETIS_V3_PartKway, ((idx_t *)vtxdist, (idx_t *)xadj, (idx_t *)adjncy, (idx_t … in MatPartitioningApply_Parmetis_Private()
/petsc/src/ksp/pc/impls/bddc/
H A Dbddcgraph.c116 if (graph->xadj) { in PCBDDCGraphASCIIView()
119 …for (j = graph->xadj[i]; j < graph->xadj[i + 1]; j++) PetscCall(PetscViewerASCIISynchronizedPrintf… in PCBDDCGraphASCIIView()
573 const PetscInt *PETSC_RESTRICT xadj = graph->xadj; in PCBDDCGraphComputeCC_Private() local
581 const PetscBool havecsr = (PetscBool)(!!xadj); in PCBDDCGraphComputeCC_Private()
590 if (xadj[start_dof + 1] - xadj[start_dof] == 1 && adjncy[xadj[start_dof]] < 0) { in PCBDDCGraphComputeCC_Private()
601 for (j = xadj[start_dof]; j < xadj[start_dof + 1]; j++) { in PCBDDCGraphComputeCC_Private()
619 if (xadj[start_dof + 1] - xadj[start_dof] == 1 && adjncy[xadj[start_dof]] < 0) { in PCBDDCGraphComputeCC_Private()
630 for (j = xadj[start_dof]; j < xadj[start_dof + 1]; j++) { in PCBDDCGraphComputeCC_Private()
675 if (!graph->xadj && !graph->n_local_subs) PetscFunctionReturn(PETSC_SUCCESS); in PCBDDCGraphComputeConnectedComponentsLocal()
1167 PetscCall(PetscFree(graph->xadj)); in PCBDDCGraphResetCSR()
[all …]
H A Dbddc.c989 static PetscErrorCode PCBDDCSetLocalAdjacencyGraph_BDDC(PC pc, PetscInt nvtxs, const PetscInt xadj[… in PCBDDCSetLocalAdjacencyGraph_BDDC() argument
998 PetscCall(PetscFree(xadj)); in PCBDDCSetLocalAdjacencyGraph_BDDC()
1005 if (mat_graph->xadj == xadj && mat_graph->adjncy == adjncy) same_data = PETSC_TRUE; in PCBDDCSetLocalAdjacencyGraph_BDDC()
1006 if (!same_data && mat_graph->xadj[nvtxs] == xadj[nvtxs]) { in PCBDDCSetLocalAdjacencyGraph_BDDC()
1007 PetscCall(PetscArraycmp(xadj, mat_graph->xadj, nvtxs + 1, &same_data)); in PCBDDCSetLocalAdjacencyGraph_BDDC()
1008 if (same_data) PetscCall(PetscArraycmp(adjncy, mat_graph->adjncy, xadj[nvtxs], &same_data)); in PCBDDCSetLocalAdjacencyGraph_BDDC()
1016 PetscCall(PetscMalloc1(nvtxs + 1, &mat_graph->xadj)); in PCBDDCSetLocalAdjacencyGraph_BDDC()
1017 PetscCall(PetscMalloc1(xadj[nvtxs], &mat_graph->adjncy)); in PCBDDCSetLocalAdjacencyGraph_BDDC()
1018 PetscCall(PetscArraycpy(mat_graph->xadj, xadj, nvtxs + 1)); in PCBDDCSetLocalAdjacencyGraph_BDDC()
1019 PetscCall(PetscArraycpy(mat_graph->adjncy, adjncy, xadj[nvtxs])); in PCBDDCSetLocalAdjacencyGraph_BDDC()
[all …]
/petsc/src/dm/impls/plex/
H A Dplexpartition.c1681 const PetscInt *xadj, *adjncy; in DMPlexRebalanceSharedPoints() local
1865 … PetscCall(MatGetRowIJ(A, PETSC_FALSE, PETSC_FALSE, PETSC_FALSE, &numRows, &xadj, &adjncy, &done)); in DMPlexRebalanceSharedPoints()
1881 …ierr = ParMETIS_V3_RefineKway((PetscInt *)cumSumVertices, (idx_t *)xadj, (idx_t *)adjncy, vtxwgt, … in DMPlexRebalanceSharedPoints()
1888 …ierr = ParMETIS_V3_PartKway((PetscInt *)cumSumVertices, (idx_t *)xadj, (idx_t *)adjncy, vtxwgt, NU… in DMPlexRebalanceSharedPoints()
1893 …PetscCall(MatRestoreRowIJ(A, PETSC_FALSE, PETSC_FALSE, PETSC_FALSE, &numRows, &xadj, &adjncy, &don… in DMPlexRebalanceSharedPoints()
1916 …PetscCall(MatGetRowIJ(As, PETSC_FALSE, PETSC_FALSE, PETSC_FALSE, &numRows_g, &xadj, &adjncy, &done… in DMPlexRebalanceSharedPoints()
1932 …ierr = METIS_PartGraphKway(&numRows_g, &ncon, (idx_t *)xadj, (idx_t *)adjncy, vtxwgt_g, NULL, NULL… in DMPlexRebalanceSharedPoints()
1937 …PetscCall(MatRestoreRowIJ(As, PETSC_FALSE, PETSC_FALSE, PETSC_FALSE, &numRows_g, &xadj, &adjncy, &… in DMPlexRebalanceSharedPoints()
1999 …J(A, PETSC_FALSE, PETSC_FALSE, PETSC_FALSE, &numRows, (const PetscInt **)&xadj, (const PetscInt **… in DMPlexRebalanceSharedPoints()
2002 PetscCall(PetscFindInt(cumSumVertices[part[i]], xadj[i + 1] - xadj[i], &adjncy[xadj[i]], &loc)); in DMPlexRebalanceSharedPoints()
[all …]
/petsc/src/binding/petsc4py/test/
H A Dtest_mat_aij.py32 xadj = N.array([0] * (len(rows) + 1), dtype=idt)
33 xadj[0] = 0
34 xadj[1:] = N.cumsum([len(r) for r in rows], dtype=idt)
39 return nods, xadj, adjy
60 self.rows, self.xadj, self.adjy = mkgraph(COMM, GM, GN)
381 self.xadj,
/petsc/src/mat/impls/adj/mpi/
H A Dmpiadj.c15 const PetscInt *irows_indices, *icols_indices, *xadj, *adjncy; in MatCreateSubMatrix_MPIAdj_data() local
39 PetscCall(MatGetRowIJ(adj, 0, PETSC_FALSE, PETSC_FALSE, &nlrows_mat, &xadj, &adjncy, &done)); in MatCreateSubMatrix_MPIAdj_data()
42 for (i = 0; i < nlrows_mat; i++) ncols_send[i] = xadj[i + 1] - xadj[i]; in MatCreateSubMatrix_MPIAdj_data()
49 PetscCall(PetscSFBcastBegin(sf, MPIU_INT, xadj, xadj_recv, MPI_REPLACE)); in MatCreateSubMatrix_MPIAdj_data()
50 PetscCall(PetscSFBcastEnd(sf, MPIU_INT, xadj, xadj_recv, MPI_REPLACE)); in MatCreateSubMatrix_MPIAdj_data()
85 PetscCall(MatRestoreRowIJ(adj, 0, PETSC_FALSE, PETSC_FALSE, &nlrows_mat, &xadj, &adjncy, &done)); in MatCreateSubMatrix_MPIAdj_data()
/petsc/src/ksp/ksp/impls/fetidp/
H A Dfetidp.c859 PetscInt *xadj = pcbddc->mat_graph->xadj; in KSPFETIDPSetUpOperators() local
873 …PetscCall(ISGlobalToLocalMappingApply(pmap, IS_GTOLM_DROP, xadj[n + 1] - xadj[n], adjn + xadj[n], … in KSPFETIDPSetUpOperators()
882 …PetscCall(ISGlobalToLocalMappingApply(pmap, IS_GTOLM_DROP, xadj[n + 1] - xadj[n], adjn + xadj[n], … in KSPFETIDPSetUpOperators()

12