Lines Matching refs:neighbors
60 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()
563 PetscCall(PetscArraycpy(c->neighbors, neighbors, numNeighbors)); in CharacteristicSetNeighbors()
586 …ighbors; n++) PetscCallMPI(MPIU_Irecv(&c->fillCount[n], 1, MPIU_INT, c->neighbors[n], tag, PetscOb… in CharacteristicSendCoordinatesBegin()
587 …eighbors; n++) PetscCallMPI(MPIU_Send(&c->needCount[n], 1, MPIU_INT, c->neighbors[n], tag, PetscOb… in CharacteristicSendCoordinatesBegin()
608 …eceiving %" PetscInt_FMT " requests for values from proc %d\n", c->fillCount[n], c->neighbors[n])); in CharacteristicSendCoordinatesBegin()
609 …(c->queueRemote[c->remoteOffsets[n]]), c->fillCount[n], c->itemType, c->neighbors[n], tag, PetscOb… in CharacteristicSendCoordinatesBegin()
612 …"Sending %" PetscInt_FMT " requests for values from proc %d\n", c->needCount[n], c->neighbors[n])); in CharacteristicSendCoordinatesBegin()
613 …_Send(&(c->queue[c->localOffsets[n]]), c->needCount[n], c->itemType, c->neighbors[n], tag, PetscOb… in CharacteristicSendCoordinatesBegin()
629 …for (n = 0; n < c->queueRemoteSize; n++) PetscCheck(c->neighbors[c->queueRemote[n].proc] != rank,P… in CharacteristicSendCoordinatesEnd()
641 …Irecv(&(c->queue[c->localOffsets[n]]), c->needCount[n], c->itemType, c->neighbors[n], tag, PetscOb… in CharacteristicGetValuesBegin()
642 …(c->queueRemote[c->remoteOffsets[n]]), c->fillCount[n], c->itemType, c->neighbors[n], tag, PetscOb… in CharacteristicGetValuesBegin()
710 static PetscErrorCode DMDAGetNeighborsRank(DM da, PetscMPIInt neighbors[]) in DMDAGetNeighborsRank() argument
728 neighbors[0] = rank; in DMDAGetNeighborsRank()
739 pi = neighbors[0] % PI; in DMDAGetNeighborsRank()
740 pj = neighbors[0] / PI; in DMDAGetNeighborsRank()
748 neighbors[1] = procs[pj][pim]; in DMDAGetNeighborsRank()
749 neighbors[2] = procs[pjp][pim]; in DMDAGetNeighborsRank()
750 neighbors[3] = procs[pjp][pi]; in DMDAGetNeighborsRank()
751 neighbors[4] = procs[pjp][pip]; in DMDAGetNeighborsRank()
752 neighbors[5] = procs[pj][pip]; in DMDAGetNeighborsRank()
753 neighbors[6] = procs[pjm][pip]; in DMDAGetNeighborsRank()
754 neighbors[7] = procs[pjm][pi]; in DMDAGetNeighborsRank()
755 neighbors[8] = procs[pjm][pim]; in DMDAGetNeighborsRank()
758 if (pi == 0) neighbors[1] = neighbors[2] = neighbors[8] = neighbors[0]; in DMDAGetNeighborsRank()
759 if (pi == PI - 1) neighbors[4] = neighbors[5] = neighbors[6] = neighbors[0]; in DMDAGetNeighborsRank()
763 if (pj == 0) neighbors[6] = neighbors[7] = neighbors[8] = neighbors[0]; in DMDAGetNeighborsRank()
764 if (pj == PJ - 1) neighbors[2] = neighbors[3] = neighbors[4] = neighbors[0]; in DMDAGetNeighborsRank()