Home
last modified time | relevance | path

Searched refs:neighbors (Results 1 – 25 of 34) sorted by relevance

12

/petsc/src/ts/characteristic/interface/
H A Dcharacteristic.c60 PetscCall(PetscFree((*c)->neighbors)); in CharacteristicDestroy()
126 newC->neighbors = NULL; in CharacteristicCreate()
337 PetscMPIInt neighbors[9]; in CharacteristicSolve() local
345 PetscCall(DMDAGetNeighborsRank(da, neighbors)); in CharacteristicSolve()
346 PetscCall(CharacteristicSetNeighbors(c, 9, neighbors)); in CharacteristicSolve()
406 if (c->neighbors[Qi.proc] == rank) { in CharacteristicSolve()
493 if (c->neighbors[c->queue[n].proc] == rank) { in CharacteristicSolve()
557 …orCode CharacteristicSetNeighbors(Characteristic c, PetscInt numNeighbors, PetscMPIInt neighbors[]) in CharacteristicSetNeighbors() argument
561 PetscCall(PetscFree(c->neighbors)); in CharacteristicSetNeighbors()
562 PetscCall(PetscMalloc1(numNeighbors, &c->neighbors)); in CharacteristicSetNeighbors()
[all …]
/petsc/src/dm/impls/plex/
H A Dplexorient.c345 PetscInt *numNeighbors, **neighbors, *locSupport = NULL; in DMPlexOrient() local
493 PetscCall(PetscMalloc2(numComponents, &numNeighbors, numComponents, &neighbors)); in DMPlexOrient()
501 PetscCall(PetscMalloc1(PetscMax(numLeaves, 0), &neighbors[comp])); in DMPlexOrient()
512 …if ((rrank == rpoints[neighbors[comp][n]].rank) && (rcomp == lorntComp[lpoints[neighbors[comp][n]]… in DMPlexOrient()
522 neighbors[comp][numNeighbors[comp]++] = l; in DMPlexOrient()
535 const PetscInt face = lpoints ? lpoints[neighbors[comp][n]] : neighbors[comp][n]; in DMPlexOrient()
540 …scInt_FMT " comp: %d", face, rorntComp[face].rank, lorntComp[face].rank, neighbors[comp][n], comp); in DMPlexOrient()
541 nrankComp[off].rank = rpoints[neighbors[comp][n]].rank; in DMPlexOrient()
542 …nrankComp[off].index = lorntComp[lpoints ? lpoints[neighbors[comp][n]] : neighbors[comp][n]].index; in DMPlexOrient()
544 PetscCall(PetscFree(neighbors[comp])); in DMPlexOrient()
[all …]
H A Dplexdistribute.c354 PetscBT neighbors; in DMPlexCreateTwoSidedProcessSF() local
366 PetscCall(PetscBTCreate(size, &neighbors)); in DMPlexCreateTwoSidedProcessSF()
367 PetscCall(PetscBTMemzero(size, neighbors)); in DMPlexCreateTwoSidedProcessSF()
376 for (n = 0; n < ndof; ++n) PetscCall(PetscBTSet(neighbors, nranks[noff + n])); in DMPlexCreateTwoSidedProcessSF()
387 for (n = 0; n < ndof; ++n) PetscCall(PetscBTSet(neighbors, nranks[noff + n])); in DMPlexCreateTwoSidedProcessSF()
391 for (l = 0; l < numLeaves; ++l) PetscCall(PetscBTSet(neighbors, remotePoints[l].rank)); in DMPlexCreateTwoSidedProcessSF()
393 PetscCall(PetscBTClear(neighbors, rank)); in DMPlexCreateTwoSidedProcessSF()
395 if (PetscBTLookup(neighbors, proc)) ++numNeighbors; in DMPlexCreateTwoSidedProcessSF()
401 if (PetscBTLookup(neighbors, proc)) { in DMPlexCreateTwoSidedProcessSF()
409 PetscCall(PetscBTDestroy(&neighbors)); in DMPlexCreateTwoSidedProcessSF()
[all …]
H A Dplexpartition.c1256 const PetscInt *local, *neighbors; in DMPlexPartitionLabelInvert() local
1272 PetscCall(ISGetIndices(valueIS, &neighbors)); in DMPlexPartitionLabelInvert()
1274 PetscCall(DMLabelGetStratumSize(rootLabel, neighbors[n], &numPoints)); in DMPlexPartitionLabelInvert()
1275 PetscCall(PetscSectionAddDof(rootSection, neighbors[n], numPoints)); in DMPlexPartitionLabelInvert()
1285 PetscCall(PetscSectionGetOffset(rootSection, neighbors[n], &off)); in DMPlexPartitionLabelInvert()
1286 PetscCall(DMLabelGetStratumIS(rootLabel, neighbors[n], &pointIS)); in DMPlexPartitionLabelInvert()
1311 PetscCall(PetscSectionGetDof(rootSection, neighbors[n], &dof)); in DMPlexPartitionLabelInvert()
1312 PetscCall(PetscSectionGetOffset(rootSection, neighbors[n], &off)); in DMPlexPartitionLabelInvert()
1323 PetscCall(PetscMPIIntCast(dof, &scounts[neighbors[n]])); in DMPlexPartitionLabelInvert()
1324 PetscCall(PetscMPIIntCast(off, &sdispls[neighbors[n]])); in DMPlexPartitionLabelInvert()
[all …]
H A Dplexfem.c5576 PetscInt *faces, *neighbors; in DMPlexComputeResidualHybridByKey() local
5705 PetscCall(PetscCalloc2(2 * cellChunkSize, &faces, 2 * cellChunkSize, &neighbors)); in DMPlexComputeResidualHybridByKey()
5707 …PetscCall(ISCreateGeneral(PETSC_COMM_SELF, 2 * cellChunkSize, neighbors, PETSC_USE_POINTER, &chunk… in DMPlexComputeResidualHybridByKey()
5730 neighbors[(c - cS) * 2 + 0] = support[0] == cell ? support[1] : support[0]; in DMPlexComputeResidualHybridByKey()
5732 neighbors[(c - cS) * 2 + 1] = support[0] == cell ? support[1] : support[0]; in DMPlexComputeResidualHybridByKey()
5735 PetscCall(ISGeneralSetIndices(chunkISN, 2 * cellChunkSize, neighbors, PETSC_USE_POINTER)); in DMPlexComputeResidualHybridByKey()
5841 PetscCall(PetscFree2(faces, neighbors)); in DMPlexComputeResidualHybridByKey()
6657 PetscInt *faces, *neighbors; in DMPlexComputeJacobianHybridByKey() local
6776 PetscCall(PetscCalloc2(2 * cellChunkSize, &faces, 2 * cellChunkSize, &neighbors)); in DMPlexComputeJacobianHybridByKey()
6778 …PetscCall(ISCreateGeneral(PETSC_COMM_SELF, 2 * cellChunkSize, neighbors, PETSC_USE_POINTER, &chunk… in DMPlexComputeJacobianHybridByKey()
[all …]
H A Dplexgeometry.c3270 PetscInt (*neighbors)[2]; in BuildGradientReconstruction_Internal_Tree() local
3307 PetscCall(PetscMalloc1(nEnd - nStart, &neighbors)); in BuildGradientReconstruction_Internal_Tree()
3328 neighbors[off][0] = f; in BuildGradientReconstruction_Internal_Tree()
3329 neighbors[off][1] = fcells[1 - c]; in BuildGradientReconstruction_Internal_Tree()
3355 nface = neighbors[off + f][0]; in BuildGradientReconstruction_Internal_Tree()
3356 ncell = neighbors[off + f][1]; in BuildGradientReconstruction_Internal_Tree()
3371 PetscCall(PetscFree(neighbors)); in BuildGradientReconstruction_Internal_Tree()
H A Dplexcreate.c5684 if (!data->neighbors) { in DMGetNeighbors_Plex()
5688 PetscCall(PetscMalloc1(njranks + niranks + 1, &data->neighbors)); in DMGetNeighbors_Plex()
5689 PetscCall(PetscArraycpy(data->neighbors + 1, jranks, njranks)); in DMGetNeighbors_Plex()
5690 PetscCall(PetscArraycpy(data->neighbors + njranks + 1, iranks, niranks)); in DMGetNeighbors_Plex()
5692 PetscCall(PetscSortRemoveDupsMPIInt(&n, data->neighbors + 1)); in DMGetNeighbors_Plex()
5694 PetscCall(PetscMPIIntCast(n, data->neighbors)); in DMGetNeighbors_Plex()
5696 if (nranks) *nranks = data->neighbors[0]; in DMGetNeighbors_Plex()
5698 if (data->neighbors[0]) *ranks = data->neighbors + 1; in DMGetNeighbors_Plex()
/petsc/src/dm/impls/stag/
H A Dstag2d.c395 const PetscInt neighborRank = stag->neighbors[i]; in DMSetUp_Stag_2d()
440 const PetscInt globalOffset = globalOffsets[stag->neighbors[neighbor]]; in DMSetUp_Stag_2d()
459 const PetscInt globalOffset = globalOffsets[stag->neighbors[neighbor]]; in DMSetUp_Stag_2d()
489 const PetscInt globalOffset = globalOffsets[stag->neighbors[neighbor]]; in DMSetUp_Stag_2d()
509 const PetscInt globalOffset = globalOffsets[stag->neighbors[neighbor]]; in DMSetUp_Stag_2d()
539 const PetscInt globalOffset = globalOffsets[stag->neighbors[neighbor]]; in DMSetUp_Stag_2d()
587 const PetscInt globalOffset = globalOffsets[stag->neighbors[neighbor]]; in DMSetUp_Stag_2d()
618 const PetscInt globalOffset = globalOffsets[stag->neighbors[neighbor]]; in DMSetUp_Stag_2d()
638 const PetscInt globalOffset = globalOffsets[stag->neighbors[neighbor]]; in DMSetUp_Stag_2d()
670 const PetscInt globalOffset = globalOffsets[stag->neighbors[neighbor]]; in DMSetUp_Stag_2d()
[all …]
H A Dstag3d.c725 PetscCall(PetscMalloc1(27, &stag->neighbors)); in DMStagSetUpBuildNeighbors_3d()
728 …stag->neighbors[i] = neighborRank[i][0] + n[0] * neighborRank[i][1] + n[0] * n[1] * neighborRank[i… in DMStagSetUpBuildNeighbors_3d()
730 stag->neighbors[i] = -1; in DMStagSetUpBuildNeighbors_3d()
985 const PetscInt neighborRank = stag->neighbors[i]; in DMStagSetUpBuildScatter_3d()
1078 …ighbor, eplNeighbor, eprGhost, eplGhost, epFaceRow, globalOffsets[stag->neighbors[neighbor]], star… in DMStagSetUpBuildScatter_3d()
1099 …ighbor, eplNeighbor, eprGhost, eplGhost, epFaceRow, globalOffsets[stag->neighbors[neighbor]], star… in DMStagSetUpBuildScatter_3d()
1120 …ighbor, eplNeighbor, eprGhost, eplGhost, epFaceRow, globalOffsets[stag->neighbors[neighbor]], star… in DMStagSetUpBuildScatter_3d()
1141 …ighbor, eplNeighbor, eprGhost, eplGhost, epFaceRow, globalOffsets[stag->neighbors[neighbor]], star… in DMStagSetUpBuildScatter_3d()
1162 …ighbor, eplNeighbor, eprGhost, eplGhost, epFaceRow, globalOffsets[stag->neighbors[neighbor]], star… in DMStagSetUpBuildScatter_3d()
1183 …ighbor, eplNeighbor, eprGhost, eplGhost, epFaceRow, globalOffsets[stag->neighbors[neighbor]], star… in DMStagSetUpBuildScatter_3d()
[all …]
H A Dstag1d.c243 PetscCall(PetscMalloc1(3, &stag->neighbors)); in DMSetUp_Stag_1d()
248 stag->neighbors[0] = -1; in DMSetUp_Stag_1d()
251 stag->neighbors[0] = stag->nRanks[0] - 1; in DMSetUp_Stag_1d()
257 stag->neighbors[0] = stag->rank[0] - 1; in DMSetUp_Stag_1d()
259 stag->neighbors[1] = stag->rank[0]; in DMSetUp_Stag_1d()
264 stag->neighbors[2] = -1; in DMSetUp_Stag_1d()
267 stag->neighbors[2] = 0; in DMSetUp_Stag_1d()
273 stag->neighbors[2] = stag->rank[0] + 1; in DMSetUp_Stag_1d()
H A Dstag.c344 PetscCall(PetscFree(stag->neighbors)); in DMDestroy_Stag()
802 *ranks = stag->neighbors; in DMGetNeighbors_Stag()
/petsc/src/dm/impls/da/
H A Dda3.c752 PetscCall(PetscMalloc1(27, &dd->neighbors)); in DMSetUp_DA_3D()
754 dd->neighbors[0] = n0; in DMSetUp_DA_3D()
755 dd->neighbors[1] = n1; in DMSetUp_DA_3D()
756 dd->neighbors[2] = n2; in DMSetUp_DA_3D()
757 dd->neighbors[3] = n3; in DMSetUp_DA_3D()
758 dd->neighbors[4] = n4; in DMSetUp_DA_3D()
759 dd->neighbors[5] = n5; in DMSetUp_DA_3D()
760 dd->neighbors[6] = n6; in DMSetUp_DA_3D()
761 dd->neighbors[7] = n7; in DMSetUp_DA_3D()
762 dd->neighbors[8] = n8; in DMSetUp_DA_3D()
[all …]
H A Dda2.c506 PetscCall(PetscMalloc1(9, &dd->neighbors)); in DMSetUp_DA_2D()
508 dd->neighbors[0] = n0; in DMSetUp_DA_2D()
509 dd->neighbors[1] = n1; in DMSetUp_DA_2D()
510 dd->neighbors[2] = n2; in DMSetUp_DA_2D()
511 dd->neighbors[3] = n3; in DMSetUp_DA_2D()
512 dd->neighbors[4] = rank; in DMSetUp_DA_2D()
513 dd->neighbors[5] = n5; in DMSetUp_DA_2D()
514 dd->neighbors[6] = n6; in DMSetUp_DA_2D()
515 dd->neighbors[7] = n7; in DMSetUp_DA_2D()
516 dd->neighbors[8] = n8; in DMSetUp_DA_2D()
H A Ddadestroy.c46 PetscCall(PetscFree(dd->neighbors)); in DMDestroy_DA()
/petsc/src/dm/impls/plex/tests/output/
H A Dex1_p4est_redistribute.out1 Minimum number of neighbors: 2
H A Dex1_part_ptscotch_0.out33 Minimum number of neighbors: 1
H A Dex1_part_parmetis_0.out49 Minimum number of neighbors: 1
H A Dex1_0.out212 [0] <dm:plex> TetGenMeshPlague(): Marking neighbors of marked tetrahedra.
/petsc/include/petsc/private/
H A Dcharacteristicimpl.h74 PetscMPIInt *neighbors; /* Ranks of neighbors */ member
H A Ddmstagimpl.h35 PetscMPIInt *neighbors; /* dim^3 local ranks */ member
H A Ddmdaimpl.h42 PetscMPIInt *neighbors; /* ranks of all neighbors and self */ member
/petsc/src/dm/tutorials/
H A Dswarm_ex3.c89 …tscErrorCode DMGetNeighbors_DMDARegular(DM dm, PetscInt *nneighbors, const PetscMPIInt **neighbors) in DMGetNeighbors_DMDARegular() argument
95 PetscCall(DMGetNeighbors(dmregular, nneighbors, neighbors)); in DMGetNeighbors_DMDARegular()
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DAO.pyx221 entries to indicate nonexistent neighbors due to boundary conditions,
255 entries to indicate nonexistent neighbors due to boundary conditions,
/petsc/src/dm/impls/plex/tutorials/output/
H A Dex1f90_1.out197 [0] <dm:plex> TetGenMeshPlague(): Marking neighbors of marked tetrahedra.
H A Dex1_1.out197 [0] <dm:plex> TetGenMeshPlague(): Marking neighbors of marked tetrahedra.

12