Lines Matching refs:sf

30 PetscErrorCode PetscSFSetGraphLayout(PetscSF sf, PetscLayout layout, PetscInt nleaves, PetscInt ilo…  in PetscSFSetGraphLayout()  argument
38 PetscValidHeaderSpecific(sf, PETSCSF_CLASSID, 1); in PetscSFSetGraphLayout()
59 PetscCall(PetscSFSetGraph(sf, nroots, nleaves, ilocal, localmode, remote, PETSC_OWN_POINTER)); in PetscSFSetGraphLayout()
86 PetscErrorCode PetscSFGetGraphLayout(PetscSF sf, PetscLayout *layout, PetscInt *nleaves, const Pets… in PetscSFGetGraphLayout() argument
93 PetscValidHeaderSpecific(sf, PETSCSF_CLASSID, 1); in PetscSFGetGraphLayout()
98 PetscCall(PetscSFGetGraph(sf, &nr, &nl, ilocal, &ir)); in PetscSFGetGraphLayout()
99 PetscCall(PetscLayoutCreateFromSizes(PetscObjectComm((PetscObject)sf), nr, PETSC_DECIDE, 1, &lt)); in PetscSFGetGraphLayout()
128 PetscErrorCode PetscSFSetGraphSection(PetscSF sf, PetscSection localSection, PetscSection globalSec… in PetscSFSetGraphSection() argument
139 PetscValidHeaderSpecific(sf, PETSCSF_CLASSID, 1); in PetscSFSetGraphSection()
143 PetscCall(PetscObjectGetComm((PetscObject)sf, &comm)); in PetscSFSetGraphSection()
209 …PetscCall(PetscSFSetGraph(sf, nroots, nleaves, local, PETSC_OWN_POINTER, remote, PETSC_OWN_POINTER… in PetscSFSetGraphSection()
238 PetscErrorCode PetscSFDistributeSection(PetscSF sf, PetscSection rootSection, PetscInt *remoteOffse… in PetscSFDistributeSection() argument
247 PetscValidHeaderSpecific(sf, PETSCSF_CLASSID, 1); in PetscSFDistributeSection()
251 PetscCall(PetscLogEventBegin(PETSCSF_DistSect, sf, 0, 0, 0)); in PetscSFDistributeSection()
277 if (sym) PetscCall(PetscSectionSymDistribute(sym, sf, &dsym)); in PetscSFDistributeSection()
288 PetscCall(PetscSFGetGraph(sf, &nroots, NULL, NULL, NULL)); in PetscSFDistributeSection()
293 …llreduce(MPI_IN_PLACE, sub, 2 + numFields, MPI_C_BOOL, MPI_LOR, PetscObjectComm((PetscObject)sf))); in PetscSFDistributeSection()
297 PetscCall(PetscSFCreateEmbeddedRootSF(sf, rpEnd - rpStart, indices, &embedSF)); in PetscSFDistributeSection()
301 PetscCall(PetscObjectReference((PetscObject)sf)); in PetscSFDistributeSection()
302 embedSF = sf; in PetscSFDistributeSection()
366 PetscCall(PetscLogEventEnd(PETSCSF_DistSect, sf, 0, 0, 0)); in PetscSFDistributeSection()
393 PetscErrorCode PetscSFCreateRemoteOffsets(PetscSF sf, PetscSection rootSection, PetscSection leafSe… in PetscSFCreateRemoteOffsets() argument
401 PetscValidHeaderSpecific(sf, PETSCSF_CLASSID, 1); in PetscSFCreateRemoteOffsets()
406 PetscCall(PetscSFGetGraph(sf, &numRoots, NULL, NULL, NULL)); in PetscSFCreateRemoteOffsets()
408 PetscCall(PetscLogEventBegin(PETSCSF_RemoteOff, sf, 0, 0, 0)); in PetscSFCreateRemoteOffsets()
413 PetscCall(PetscSFCreateEmbeddedRootSF(sf, rpEnd - rpStart, indices, &embedSF)); in PetscSFCreateRemoteOffsets()
420 PetscCall(PetscLogEventEnd(PETSCSF_RemoteOff, sf, 0, 0, 0)); in PetscSFCreateRemoteOffsets()
445 PetscErrorCode PetscSFCreateSectionSF(PetscSF sf, PetscSection rootSection, PetscInt remoteOffsets[… in PetscSFCreateSectionSF() argument
457 PetscValidHeaderSpecific(sf, PETSCSF_CLASSID, 1); in PetscSFCreateSectionSF()
462 PetscCall(PetscObjectGetComm((PetscObject)sf, &comm)); in PetscSFCreateSectionSF()
466 PetscCall(PetscSFGetGraph(sf, &numRoots, &numPoints, &localPoints, &remotePoints)); in PetscSFCreateSectionSF()
468 PetscCall(PetscLogEventBegin(PETSCSF_SectSF, sf, 0, 0, 0)); in PetscSFCreateSectionSF()
501 PetscCall(PetscLogEventEnd(PETSCSF_SectSF, sf, 0, 0, 0)); in PetscSFCreateSectionSF()
529 PetscErrorCode PetscSFCreateFromLayouts(PetscLayout rmap, PetscLayout lmap, PetscSF *sf) in PetscSFCreateFromLayouts() argument
542 PetscAssertPointer(sf, 3); in PetscSFCreateFromLayouts()
547 PetscCall(PetscSFCreate(rcomm, sf)); in PetscSFCreateFromLayouts()
558 …PetscCall(PetscSFSetGraph(*sf, nroots, nleaves, NULL, PETSC_OWN_POINTER, remote, PETSC_COPY_VALUES… in PetscSFCreateFromLayouts()
568 PetscSF sf; in PetscLayoutMapLocal() local
595 PetscCall(PetscSFCreate(map->comm, &sf)); in PetscLayoutMapLocal()
596 PetscCall(PetscSFSetGraph(sf, n, nleaves, ilocal, PETSC_OWN_POINTER, ridxs, PETSC_OWN_POINTER)); in PetscLayoutMapLocal()
597 PetscCall(PetscSFReduceBegin(sf, MPIU_INT, (PetscInt *)idxs, lidxs, MPI_LOR)); in PetscLayoutMapLocal()
598 PetscCall(PetscSFReduceEnd(sf, MPIU_INT, (PetscInt *)idxs, lidxs, MPI_LOR)); in PetscLayoutMapLocal()
611 PetscCall(PetscSFReduceBegin(sf, MPIU_INT, work2, work, MPI_REPLACE)); in PetscLayoutMapLocal()
612 PetscCall(PetscSFReduceEnd(sf, MPIU_INT, work2, work, MPI_REPLACE)); in PetscLayoutMapLocal()
615 PetscCall(PetscSFDestroy(&sf)); in PetscLayoutMapLocal()
728 …fIndices[], const PetscInt leafLocalIndices[], PetscInt leafLocalOffset, PetscSF *sfA, PetscSF *sf) in PetscSFCreateByMatchingIndices() argument
744 PetscAssertPointer(sf, 11); in PetscSFCreateByMatchingIndices()
820 PetscCall(PetscSFCreate(comm, sf)); in PetscSFCreateByMatchingIndices()
821 PetscCall(PetscSFSetFromOptions(*sf)); in PetscSFCreateByMatchingIndices()
822 …PetscCall(PetscSFSetGraph(*sf, rootLocalOffset + numRootIndices, nleaves, ilocal, PETSC_OWN_POINTE… in PetscSFCreateByMatchingIndices()
927 PetscErrorCode PetscSFCreateStridedSF(PetscSF sf, PetscInt bs, PetscInt ldr, PetscInt ldl, PetscSF … in PetscSFCreateStridedSF() argument
940 PetscValidHeaderSpecific(sf, PETSCSF_CLASSID, 1); in PetscSFCreateStridedSF()
941 PetscValidLogicalCollectiveInt(sf, bs, 2); in PetscSFCreateStridedSF()
944 PetscCall(PetscObjectReference((PetscObject)sf)); in PetscSFCreateStridedSF()
945 *vsf = sf; in PetscSFCreateStridedSF()
948 PetscCall(PetscSFSetUp(sf)); in PetscSFCreateStridedSF()
949 PetscCall(PetscObjectGetComm((PetscObject)sf, &comm)); in PetscSFCreateStridedSF()
951 PetscCall(PetscSFGetGraph(sf, &nr, &nl, &ilocal, &iremote)); in PetscSFCreateStridedSF()
952 PetscCall(PetscSFGetLeafRange(sf, NULL, &maxl)); in PetscSFCreateStridedSF()
956 …ldl /= PetscMax(1, sf->vscat.bs); // SFs created from VecScatterCreate() may have a nonzero block … in PetscSFCreateStridedSF()
957 ldr /= PetscMax(1, sf->vscat.bs); in PetscSFCreateStridedSF()
966 PetscCall(PetscSFGetRanksSF(sf, &rankssf)); in PetscSFCreateStridedSF()
994 if (sf->vscat.bs > 1) { in PetscSFCreateStridedSF()
995 (*vsf)->vscat.bs = sf->vscat.bs; in PetscSFCreateStridedSF()
996 PetscCallMPI(MPI_Type_dup(sf->vscat.unit, &(*vsf)->vscat.unit)); in PetscSFCreateStridedSF()
997 (*vsf)->vscat.to_n = bs * sf->vscat.to_n; in PetscSFCreateStridedSF()
998 (*vsf)->vscat.from_n = bs * sf->vscat.from_n; in PetscSFCreateStridedSF()
1000 PetscCall(PetscSFGetType(sf, &sftype)); in PetscSFCreateStridedSF()