| /petsc/src/dm/impls/plex/ |
| H A D | plexdd.c | 58 PetscInt rst, ren, c, *gidxs, *lidxs, *tidxs; in DMCreateDomainDecomposition_Plex() local 157 PetscCall(ISGetIndices(gi_is, (const PetscInt **)&gidxs)); in DMCreateDomainDecomposition_Plex() 158 PetscCall(PetscSFBcastBegin(sectionSF, MPIU_INT, gidxs, lidxs, MPI_REPLACE)); in DMCreateDomainDecomposition_Plex() 159 PetscCall(PetscSFBcastEnd(sectionSF, MPIU_INT, gidxs, lidxs, MPI_REPLACE)); in DMCreateDomainDecomposition_Plex() 160 PetscCall(ISRestoreIndices(gi_is, (const PetscInt **)&gidxs)); in DMCreateDomainDecomposition_Plex() 200 PetscCall(PetscMalloc1(no, &gidxs)); in DMCreateDomainDecomposition_Plex() 202 PetscCall(PetscSFReduceBegin(sectionSF, MPIU_INT, lidxs, gidxs, MPI_REPLACE)); in DMCreateDomainDecomposition_Plex() 203 PetscCall(PetscSFReduceEnd(sectionSF, MPIU_INT, lidxs, gidxs, MPI_REPLACE)); in DMCreateDomainDecomposition_Plex() 210 if (gidxs[i] >= rst && gidxs[i] < ren) lidxs[c++] = i; in DMCreateDomainDecomposition_Plex() 216 …PetscCall(ISCreateGeneral(PetscObjectComm((PetscObject)dm), no, gidxs, PETSC_OWN_POINTER, &go_is)); in DMCreateDomainDecomposition_Plex() [all …]
|
| /petsc/src/vec/is/is/interface/ |
| H A D | index.c | 39 PetscInt *leaf_data, *root_data, *gidxs, *ilocal, *ilocalneg; in ISRenumber() local 88 PetscCall(PetscMalloc1(PetscMax(n_n, n), &gidxs)); /* allocating extra space to reuse gidxs */ in ISRenumber() 94 for (i = 0; i < n_n; i++) gidxs[i] = -1; in ISRenumber() 95 …PetscCall(ISCreateGeneral(PetscObjectComm((PetscObject)subset), n_n, gidxs, PETSC_COPY_VALUES, sub… in ISRenumber() 98 PetscCall(PetscFree(gidxs)); in ISRenumber() 115 for (i = 0; i < npos; i++) gidxs[i] = (ilocal ? idxs[ilocal[i]] : idxs[i]) - gbounds[0]; in ISRenumber() 118 PetscCall(PetscSFSetGraphLayout(sf, map, npos, ilocal, PETSC_USE_POINTER, gidxs)); in ISRenumber() 154 PetscCall(PetscFree(gidxs)); in ISRenumber() 183 for (i = 0; i < n_n; i++) gidxs[i] = -1; in ISRenumber() 189 for (PetscInt j = 0; j < idxs_mult[i]; j++) gidxs[cum++] = leaf_data[i] - idxs_mult[i] + j; in ISRenumber() [all …]
|
| /petsc/src/vec/is/utils/ |
| H A D | isltog.c | 1229 const PetscInt *gidxs, *rootdegree; in ISLocalToGlobalMappingSetUpBlockInfo_Private() local 1242 PetscCall(ISLocalToGlobalMappingGetBlockIndices(mapping, &gidxs)); in ISLocalToGlobalMappingSetUpBlockInfo_Private() 1247 for (i = 0, m = 0; i < nleaves; i++) m = PetscMax(m, gidxs[i]); in ISLocalToGlobalMappingSetUpBlockInfo_Private() 1255 PetscCall(PetscSFSetGraphLayout(sf, layout, nleaves, NULL, PETSC_OWN_POINTER, gidxs)); in ISLocalToGlobalMappingSetUpBlockInfo_Private() 1355 tmpg[m] = gidxs[i]; in ISLocalToGlobalMappingSetUpBlockInfo_Private() 1378 PetscCall(ISLocalToGlobalMappingRestoreBlockIndices(mapping, &gidxs)); in ISLocalToGlobalMappingSetUpBlockInfo_Private()
|
| /petsc/src/mat/impls/shell/ |
| H A D | shell.c | 255 PetscInt *idxs, *gidxs; in MatZeroRowsColumns_Local_Shell() local 288 PetscCall(PetscMalloc1(nr, &gidxs)); in MatZeroRowsColumns_Local_Shell() 291 gidxs[cum] = ridxs[i]; in MatZeroRowsColumns_Local_Shell() 294 …PetscCall(ISCreateGeneral(PetscObjectComm((PetscObject)mat), cum, gidxs, PETSC_OWN_POINTER, &is1)); in MatZeroRowsColumns_Local_Shell()
|
| /petsc/src/ksp/pc/impls/bddc/ |
| H A D | bddcprivate.c | 169 PetscInt *extrow, *extrowcum, *marks, *vmarks, *gidxs; in PCBDDCNedelecSupport() local 1021 PetscCall(PetscMalloc2(i, &extrow, i, &gidxs)); in PCBDDCNedelecSupport() 1042 PetscCall(ISLocalToGlobalMappingApply(vl2g, cum, extrow, gidxs)); in PCBDDCNedelecSupport() 1043 PetscCall(PetscSortIntWithArray(cum, gidxs, extrow)); in PCBDDCNedelecSupport() 1188 PetscCall(ISLocalToGlobalMappingApply(vl2g, cum, extrow, gidxs)); in PCBDDCNedelecSupport() 1189 PetscCall(PetscSortIntWithArray(cum, gidxs, extrow)); in PCBDDCNedelecSupport() 1203 PetscCall(PetscFree2(extrow, gidxs)); in PCBDDCNedelecSupport() 3109 const PetscInt *gidxs; in PCBDDCBenignDetectSaddlePoint() local 3112 PetscCall(ISLocalToGlobalMappingGetIndices(l2gmap, &gidxs)); in PCBDDCBenignDetectSaddlePoint() 3115 … PetscCall(ISCreateGeneral(PetscObjectComm((PetscObject)pc), n, gidxs, PETSC_COPY_VALUES, &col)); in PCBDDCBenignDetectSaddlePoint() [all …]
|
| /petsc/src/mat/impls/is/ |
| H A D | matis.c | 1532 const PetscInt *gidxs; in MatISSetUpSF_IS() local 1538 PetscCall(ISLocalToGlobalMappingGetIndices(matis->rmapping, &gidxs)); in MatISSetUpSF_IS() 1540 PetscCall(PetscSFSetGraphLayout(matis->sf, B->rmap, nleaves, NULL, PETSC_OWN_POINTER, gidxs)); in MatISSetUpSF_IS() 1541 PetscCall(ISLocalToGlobalMappingRestoreIndices(matis->rmapping, &gidxs)); in MatISSetUpSF_IS() 1546 PetscCall(ISLocalToGlobalMappingGetIndices(matis->cmapping, &gidxs)); in MatISSetUpSF_IS() 1547 PetscCall(PetscSFSetGraphLayout(matis->csf, B->cmap, nleaves, NULL, PETSC_OWN_POINTER, gidxs)); in MatISSetUpSF_IS() 1548 PetscCall(ISLocalToGlobalMappingRestoreIndices(matis->cmapping, &gidxs)); in MatISSetUpSF_IS()
|
| /petsc/src/ts/tutorials/ |
| H A D | ex30.c | 1179 PetscInt *cranks_leaf, *cranks_root, *npoints, *points, *ranks, *starts, *gidxs; in LoadFromFile() local 1197 …alloc4(cEnd - cStart, &points, cEnd - cStart, &ranks, nparts + 1, &starts, cEnd - cStart, &gidxs)); in LoadFromFile() 1205 for (PetscInt c = 0; c < cEnd - cStart; c++) gidxs[c] = (PetscInt)PetscRealPart(array[c]); in LoadFromFile() 1210 PetscCall(PetscSFSetGraphLayout(sf, clayout, cEnd - cStart, NULL, PETSC_OWN_POINTER, gidxs)); in LoadFromFile() 1225 PetscCall(PetscFree4(points, ranks, starts, gidxs)); in LoadFromFile()
|