Home
last modified time | relevance | path

Searched refs:adj (Results 1 – 25 of 27) sorted by relevance

12

/petsc/src/mat/graphops/partition/impls/hierarchical/
H A Dhierarchical.c40 Mat mat = part->adj, adj, sadj; in MatPartitioningApply_Hierarchical() local
60 adj = mat; in MatPartitioningApply_Hierarchical()
61 PetscCall(PetscObjectReference((PetscObject)adj)); in MatPartitioningApply_Hierarchical()
65 PetscCall(MatConvert(mat, MATMPIADJ, MAT_INITIAL_MATRIX, &adj)); in MatPartitioningApply_Hierarchical()
66 if (adj->rmap->n > 0) bs = mat->rmap->n / adj->rmap->n; in MatPartitioningApply_Hierarchical()
69 mat_localsize = adj->rmap->n; in MatPartitioningApply_Hierarchical()
77 PetscCall(PetscCalloc1(bs * adj->rmap->n, &parts_indices)); in MatPartitioningApply_Hierarchical()
78 …PetscCall(ISCreateGeneral(comm, bs * adj->rmap->n, parts_indices, PETSC_OWN_POINTER, partitioning)… in MatPartitioningApply_Hierarchical()
83 PetscCall(MatDestroy(&adj)); in MatPartitioningApply_Hierarchical()
132 PetscCall(MatPartitioningSetAdjacency(hpart->coarseMatPart, adj)); in MatPartitioningApply_Hierarchical()
[all …]
/petsc/src/mat/impls/adj/mpi/
H A Dmpiadj.c10 static PetscErrorCode MatCreateSubMatrix_MPIAdj_data(Mat adj, IS irows, IS icols, PetscInt **sadj_x… in MatCreateSubMatrix_MPIAdj_data() argument
17 Mat_MPIAdj *a = (Mat_MPIAdj *)adj->data; in MatCreateSubMatrix_MPIAdj_data()
25 PetscCall(PetscObjectGetComm((PetscObject)adj, &comm)); in MatCreateSubMatrix_MPIAdj_data()
26 PetscCall(MatGetLayouts(adj, &rmap, NULL)); in MatCreateSubMatrix_MPIAdj_data()
39 PetscCall(MatGetRowIJ(adj, 0, PETSC_FALSE, PETSC_FALSE, &nlrows_mat, &xadj, &adjncy, &done)); in MatCreateSubMatrix_MPIAdj_data()
85 PetscCall(MatRestoreRowIJ(adj, 0, PETSC_FALSE, PETSC_FALSE, &nlrows_mat, &xadj, &adjncy, &done)); in MatCreateSubMatrix_MPIAdj_data()
454 Mat_MPIAdj *adj = (Mat_MPIAdj *)A->data; in MatSetValues_MPIAdj() local
458 …PetscCheck(!adj->i, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONGSTATE, "Matrix is already assembled, canno… in MatSetValues_MPIAdj()
461 if (!adj->ht) { in MatSetValues_MPIAdj()
462 PetscCall(PetscHSetIJCreate(&adj->ht)); in MatSetValues_MPIAdj()
[all …]
/petsc/src/mat/impls/adj/mpi/ftn-custom/
H A Dzmpiadjf.c13 Mat_MPIAdj *adj; in matcreatempiadj_() local
17 adj = (Mat_MPIAdj *)(*A)->data; in matcreatempiadj_()
18 adj->freeaij = PETSC_FALSE; in matcreatempiadj_()
/petsc/src/mat/graphops/partition/
H A Dpartition.c23 PetscCall(MatGetLocalSize(part->adj, &m, NULL)); in MatPartitioningApply_Current()
36 PetscCall(MatGetSize(part->adj, &M, NULL)); in MatPartitioningApply_Average()
37 PetscCall(MatGetLocalSize(part->adj, &m, NULL)); in MatPartitioningApply_Average()
46 PetscCall(MatGetOwnershipRange(part->adj, &start, &end)); in MatPartitioningApply_Average()
69 PetscCall(MatGetSize(part->adj, &N, NULL)); in MatPartitioningApply_Square()
73 PetscCall(MatGetOwnershipRange(part->adj, &rstart, &rend)); in MatPartitioningApply_Square()
265 …PetscCheck(matp->adj->assembled, PetscObjectComm((PetscObject)matp), PETSC_ERR_ARG_WRONGSTATE, "No… in MatPartitioningApplyND()
266 …PetscCheck(!matp->adj->factortype, PetscObjectComm((PetscObject)matp), PETSC_ERR_ARG_WRONGSTATE, "… in MatPartitioningApplyND()
306 …PetscCheck(matp->adj->assembled, PetscObjectComm((PetscObject)matp), PETSC_ERR_ARG_WRONGSTATE, "No… in MatPartitioningApply()
307 …PetscCheck(!matp->adj->factortype, PetscObjectComm((PetscObject)matp), PETSC_ERR_ARG_WRONGSTATE, "… in MatPartitioningApply()
[all …]
/petsc/src/mat/graphops/partition/impls/pmetis/
H A Dpmetis.c42 Mat mat = part->adj, amat, pmat; in MatPartitioningApply_Parmetis_Private()
64 Mat_MPIAdj *adj = (Mat_MPIAdj *)pmat->data; in MatPartitioningApply_Parmetis_Private() local
66 PetscInt *xadj = adj->i; in MatPartitioningApply_Parmetis_Private()
67 PetscInt *adjncy = adj->j; in MatPartitioningApply_Parmetis_Private()
94 if (adj->values && part->use_edge_weights && !part->vertex_weights) wgtflag = 1; in MatPartitioningApply_Parmetis_Private()
95 if (part->vertex_weights && !adj->values) wgtflag = 2; in MatPartitioningApply_Parmetis_Private()
96 if (part->vertex_weights && adj->values && part->use_edge_weights) wgtflag = 3; in MatPartitioningApply_Parmetis_Private()
153 …cy, (idx_t *)part->vertex_weights, (idx_t *)part->vertex_weights, (idx_t *)adj->values, (idx_t *)&… in MatPartitioningApply_Parmetis_Private()
156 …t, (idx_t *)xadj, (idx_t *)adjncy, (idx_t *)part->vertex_weights, (idx_t *)adj->values, (idx_t *)&… in MatPartitioningApply_Parmetis_Private()
159 …t, (idx_t *)xadj, (idx_t *)adjncy, (idx_t *)part->vertex_weights, (idx_t *)adj->values, (idx_t *)&… in MatPartitioningApply_Parmetis_Private()
[all …]
/petsc/src/mat/graphops/partition/impls/scotch/
H A Dscotch.c266 Mat mat = part->adj; in MatPartitioningApply_PTScotch_Private()
267 Mat_MPIAdj *adj = (Mat_MPIAdj *)mat->data; in MatPartitioningApply_PTScotch_Private() local
287 adj = (Mat_MPIAdj *)mat->data; in MatPartitioningApply_PTScotch_Private()
306 SCOTCH_ParMETIS_V3_NodeND(mat->rmap->range, adj->i, adj->j, &base, NULL, NDorder, sizes, &comm); in MatPartitioningApply_PTScotch_Private()
347 edgelocnbr = adj->i[vertlocnbr]; in MatPartitioningApply_PTScotch_Private()
349 edloloctab = part->use_edge_weights ? adj->values : NULL; in MatPartitioningApply_PTScotch_Private()
361 …Build, &grafdat, 0, vertlocnbr, vertlocnbr, adj->i, adj->i + 1, veloloctab, NULL, edgelocnbr, edge… in MatPartitioningApply_PTScotch_Private()
387 …ernal(SCOTCH_graphBuild, &grafdat, 0, vertlocnbr, adj->i, adj->i + 1, veloloctab, NULL, edgelocnbr… in MatPartitioningApply_PTScotch_Private()
/petsc/src/mat/graphops/partition/impls/party/
H A Dparty.c28 Mat mat = part->adj, matAdj, matSeq, *A; in MatPartitioningApply_Party()
29 Mat_MPIAdj *adj; in MatPartitioningApply_Party() local
71 adj = (Mat_MPIAdj *)matAdj->data; /* finally adj contains adjacency graph */ in MatPartitioningApply_Party()
75 edge_p = adj->i; /* start of edge list for each vertex */ in MatPartitioningApply_Party()
76 edge = adj->j; /* edge list data */ in MatPartitioningApply_Party()
266 party->nbvtxcoarsed = (PetscInt)(part->adj->cmap->N * level); in MatPartitioningPartySetCoarseLevel_Party()
/petsc/src/dm/impls/plex/
H A Dplexdistribute.c103 …tscErrorCode DMPlexGetAdjacency_Cone_Internal(DM dm, PetscInt p, PetscInt *adjSize, PetscInt adj[]) in DMPlexGetAdjacency_Cone_Internal() argument
119 for (q = 0; q < numAdj || ((void)(adj[numAdj++] = support[s]), 0); ++q) { in DMPlexGetAdjacency_Cone_Internal()
120 if (support[s] == adj[q]) break; in DMPlexGetAdjacency_Cone_Internal()
129 …ErrorCode DMPlexGetAdjacency_Support_Internal(DM dm, PetscInt p, PetscInt *adjSize, PetscInt adj[]) in DMPlexGetAdjacency_Support_Internal() argument
145 for (q = 0; q < numAdj || ((void)(adj[numAdj++] = cone[c]), 0); ++q) { in DMPlexGetAdjacency_Support_Internal()
146 if (cone[c] == adj[q]) break; in DMPlexGetAdjacency_Support_Internal()
155 …ncy_Transitive_Internal(DM dm, PetscInt p, PetscBool useClosure, PetscInt *adjSize, PetscInt adj[]) in DMPlexGetAdjacency_Transitive_Internal() argument
168 for (q = 0; q < numAdj || ((void)(adj[numAdj++] = closure[c]), 0); ++q) { in DMPlexGetAdjacency_Transitive_Internal()
169 if (closure[c] == adj[q]) break; in DMPlexGetAdjacency_Transitive_Internal()
224 … useCone, PetscBool useTransitiveClosure, PetscBool useAnchors, PetscInt *adjSize, PetscInt *adj[]) in DMPlexGetAdjacency_Internal() argument
[all …]
H A Dplexpreallocate.c23 PetscInt p, q, a, aSize, *offsets, aStart, aEnd, *inverse, iSize, *adj, adjSize; in DMPlexComputeAnchorAdjacencies() local
106 PetscCall(PetscMalloc1(adjSize, &adj)); in DMPlexComputeAnchorAdjacencies()
133 …for (nd = 0; nd < qAdjDof - qAdjCDof; ++nd) adj[aOff++] = (qAdjOff < 0 ? -(qAdjOff + 1) : qAdjOff)… in DMPlexComputeAnchorAdjacencies()
136 PetscCall(PetscSortRemoveDupsInt(&aDof, PetscSafePointerPlusOffset(adj, aOffOrig))); in DMPlexComputeAnchorAdjacencies()
139 *anchorAdj = adj; in DMPlexComputeAnchorAdjacencies()
250 …PetscInt *tmpAdj = NULL, *adj, *rootAdj, *anchorAdj = NULL, *cols, *remoteOffsets, *myRan… in DMPlexCreateAdjacencySection_Static() local
431 PetscCall(PetscCalloc1(adjSize, &adj)); in DMPlexCreateAdjacencySection_Static()
455 adj[aoff + i] = (ngoff < 0 ? -(ngoff + 1) : ngoff) + nd; in DMPlexCreateAdjacencySection_Static()
460 adj[aoff + i] = anchorAdj[anOff + q]; in DMPlexCreateAdjacencySection_Static()
468 PetscCall(PetscSectionArrayView(leafSectionAdj, adj, PETSC_INT, NULL)); in DMPlexCreateAdjacencySection_Static()
[all …]
H A Dplexorient.c552 PetscSFNode *adj = NULL; in DMPlexOrient() local
569 if (rank == 0) PetscCall(PetscMalloc2(displs[size], &adj, displs[size], &val)); in DMPlexOrient()
571 …PetscCallMPI(MPI_Gatherv(nrankComp, itotNeighbors, MPIU_SF_NODE, adj, recvcounts, displs, MPIU_SF_… in DMPlexOrient()
582 …OMM_SELF, " edge (%" PetscInt_FMT ", %" PetscInt_FMT ") (%s):\n", adj[off].rank, adj[off].index, … in DMPlexOrient()
596 const PetscInt q = Noff[adj[off].rank] + adj[off].index; in DMPlexOrient()
648 PetscCall(PetscFree2(adj, val)); in DMPlexOrient()
931 PetscSFNode *adj = NULL; in DMPlexOrientCells_Internal() local
949 if (rank == 0) PetscCall(PetscMalloc2(displs[size], &adj, displs[size], &val)); in DMPlexOrientCells_Internal()
951 …PetscCallMPI(MPI_Gatherv(nrankComp, itotNeighbors, MPIU_SF_NODE, adj, recvcounts, displs, MPIU_SF_… in DMPlexOrientCells_Internal()
960 …OMM_SELF, " edge (%" PetscInt_FMT ", %" PetscInt_FMT ") (%s):\n", adj[off].rank, adj[off].index, … in DMPlexOrientCells_Internal()
[all …]
H A Dplexpartition.c18 PetscInt *adj = NULL, *vOffsets = NULL, *vAdj = NULL; in DMPlexCreatePartitionerGraph_Overlap() local
72 PetscCall(DMPlexGetAdjacency(ovdm, c, &adjSize, &adj)); in DMPlexCreatePartitionerGraph_Overlap()
74 const PetscInt point = adj[a]; in DMPlexCreatePartitionerGraph_Overlap()
87 PetscCall(DMPlexGetAdjacency(ovdm, c, &adjSize, &adj)); in DMPlexCreatePartitionerGraph_Overlap()
89 const PetscInt point = adj[a]; in DMPlexCreatePartitionerGraph_Overlap()
97 PetscCall(PetscFree(adj)); in DMPlexCreatePartitionerGraph_Overlap()
114 PetscInt *adj = NULL, *vOffsets = NULL, *graph = NULL; in DMPlexCreatePartitionerGraph_Native() local
247 PetscCall(DMPlexGetAdjacency(dm, p, &adjSize, &adj)); in DMPlexCreatePartitionerGraph_Native()
249 const PetscInt point = adj[a]; in DMPlexCreatePartitionerGraph_Native()
259 PetscCall(PetscFree(adj)); in DMPlexCreatePartitionerGraph_Native()
[all …]
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DMatPartitioning.pyx126 def setAdjacency(self, Mat adj) -> None: argument
133 adj
142 CHKERR(MatPartitioningSetAdjacency(self.part, adj.mat))
/petsc/src/mat/graphops/partition/ftn-custom/
H A Dzpartitionf.c15 *ierr = MatGetLocalSize((*part)->adj, &len, NULL); in matpartitioningsetvertexweights_NOTODAY()
/petsc/src/mat/graphops/partition/impls/chaco/
H A Dchaco.c56 Mat mat = part->adj, matAdj, matSeq, *A; in MatPartitioningApply_Chaco()
57 Mat_MPIAdj *adj; in MatPartitioningApply_Chaco() local
107 adj = (Mat_MPIAdj *)matAdj->data; /* finally adj contains adjacency graph */ in MatPartitioningApply_Chaco()
111 start = adj->i; /* start of edge list for each vertex */ in MatPartitioningApply_Chaco()
126 for (i = 0; i < start[nvtxs]; i++) adjacency[i] = (adj->j)[i] + 1; /* 1-based indexing */ in MatPartitioningApply_Chaco()
382 chaco->nbvtxcoarsed = (PetscInt)(part->adj->cmap->N * level); in MatPartitioningChacoSetCoarseLevel_Chaco()
/petsc/src/mat/graphops/coarsen/interface/
H A Dcoarsen.c113 PetscErrorCode MatCoarsenSetAdjacency(MatCoarsen agg, Mat adj) in MatCoarsenSetAdjacency() argument
117 PetscValidHeaderSpecific(adj, MAT_CLASSID, 2); in MatCoarsenSetAdjacency()
118 agg->graph = adj; in MatCoarsenSetAdjacency()
/petsc/config/BuildSystem/
H A DsourceDatabase.py308 adj = []
312 adj.append(self.resolveDependency(source, m.group('includeFile')))
314 return adj
/petsc/src/binding/petsc4py/test/
H A Dtest_mat_aij.py15 adj = rows[-1]
20 adj.append(gridJ)
23 adj.append(gridJ)
24 adj.append(gridI)
27 adj.append(gridJ)
30 adj.append(gridJ)
/petsc/src/mat/impls/aij/mpi/
H A Dmpimatmatmult.c201 …PetscInt *adi = ad->i, *adj = ad->j, *aoi = ao->i, *aoj = ao->j, rstart = A->rmap->rsta… in MatMatMultSymbolic_MPIAIJ_MPIAIJ_nonscalable() local
253 row = *adj++; in MatMatMultSymbolic_MPIAIJ_MPIAIJ_nonscalable()
659 PetscInt *adi = ad->i, *adj, *aoi = ao->i, *aoj; in MatMatMultNumeric_MPIAIJ_MPIAIJ() local
725 adj = ad->j + adi[i]; in MatMatMultNumeric_MPIAIJ_MPIAIJ()
728 row = adj[j]; in MatMatMultNumeric_MPIAIJ_MPIAIJ()
808 …PetscInt *adi = ad->i, *adj = ad->j, *aoi = ao->i, *aoj = ao->j, rstart = A->rmap->rsta… in MatMatMultSymbolic_MPIAIJ_MPIAIJ() local
857 row = *adj++; in MatMatMultSymbolic_MPIAIJ_MPIAIJ()
1050 PetscInt *adi = ad->i, *adj = ad->j, *aoi = ao->i, rstart = A->rmap->rstart; in MatMatMultSymbolic_MPIAIJ_MPIAIJ_seqMPI() local
1126 row = *adj++; in MatMatMultSymbolic_MPIAIJ_MPIAIJ_seqMPI()
1595 PetscInt *adj; in MatTransposeMatMultNumeric_MPIAIJ_MPIAIJ() local
[all …]
/petsc/src/dm/impls/swarm/
H A Dswarm.c698 PetscInt *dnz, *onz, *adj, depth, maxConeSize, maxSupportSize, maxAdjSize; in DMSwarmComputeMassMatrixSquare_Private() local
740 PetscCall(PetscMalloc1(maxAdjSize, &adj)); in DMSwarmComputeMassMatrixSquare_Private()
761 PetscCall(DMPlexGetAdjacency(dmf, cell, &adjSize, &adj)); in DMSwarmComputeMassMatrixSquare_Private()
763 if (adj[a] >= cStart && adj[a] < cEnd && adj[a] != cell) { in DMSwarmComputeMassMatrixSquare_Private()
764 const PetscInt ncell = adj[a]; in DMSwarmComputeMassMatrixSquare_Private()
865 PetscCall(PetscFree(adj)); in DMSwarmComputeMassMatrixSquare_Private()
/petsc/src/ksp/pc/impls/gamg/
H A Dgamg.c197 Mat adj; in PCGAMGCreateLevel_GAMG() local
208 PetscCall(MatConvert(Cmat, MATMPIADJ, MAT_INITIAL_MATRIX, &adj)); in PCGAMGCreateLevel_GAMG()
262 PetscCall(MatConvert(tMat, MATMPIADJ, MAT_INITIAL_MATRIX, &adj)); in PCGAMGCreateLevel_GAMG()
274 PetscCall(MatPartitioningSetAdjacency(mpart, adj)); in PCGAMGCreateLevel_GAMG()
292 PetscCall(MatDestroy(&adj)); in PCGAMGCreateLevel_GAMG()
/petsc/src/ksp/pc/impls/asm/
H A Dasm.c1365 Mat Ad = NULL, adj; in PCASMCreateSubdomains() local
1434 PetscCall(MatCreateMPIAdj(PETSC_COMM_SELF, na, na, iia, jja, NULL, &adj)); in PCASMCreateSubdomains()
1435 PetscCall(MatPartitioningSetAdjacency(mpart, adj)); in PCASMCreateSubdomains()
1439 PetscCall(MatDestroy(&adj)); in PCASMCreateSubdomains()
/petsc/src/ksp/pc/impls/gasm/
H A Dgasm.c1325 Mat Ad = NULL, adj; in PCGASMCreateLocalSubdomains() local
1390 PetscCall(MatCreateMPIAdj(PETSC_COMM_SELF, na, na, iia, jja, NULL, &adj)); in PCGASMCreateLocalSubdomains()
1391 PetscCall(MatPartitioningSetAdjacency(mpart, adj)); in PCGASMCreateLocalSubdomains()
1395 PetscCall(MatDestroy(&adj)); in PCGASMCreateLocalSubdomains()
/petsc/src/dm/impls/moab/
H A Ddmmbutil.cxx509 moab::Range verts, cells, edges, faces, adj, dim3, dim2; in DMMoabCreateBoxMesh() local
/petsc/include/petsc/private/
H A Dmatimpl.h548 Mat adj; member
/petsc/src/mat/impls/baij/mpi/
H A Dmpibaij.c2725 …C_INTERN PetscErrorCode MatConvert_MPIBAIJ_MPIAdj(Mat B, MatType newtype, MatReuse reuse, Mat *adj) in MatConvert_MPIBAIJ_MPIAdj() argument
2759 …(MatCreateMPIAdj(PetscObjectComm((PetscObject)B), M, B->cmap->N / B->rmap->bs, ii, jj, NULL, adj)); in MatConvert_MPIBAIJ_MPIAdj()

12