| /petsc/src/vec/is/tests/ |
| H A D | ex7.c | 9 ISLocalToGlobalMapping ltog = NULL; in main() local 27 … PetscCall(ISLocalToGlobalMappingCreate(PETSC_COMM_WORLD, bs, 4, id, PETSC_COPY_VALUES, <og)); in main() 30 … PetscCall(ISLocalToGlobalMappingCreate(PETSC_COMM_WORLD, bs, 4, id, PETSC_COPY_VALUES, <og)); in main() 33 … PetscCall(ISLocalToGlobalMappingCreate(PETSC_COMM_WORLD, bs, 4, id, PETSC_COPY_VALUES, <og)); in main() 36 … PetscCall(ISLocalToGlobalMappingCreate(PETSC_COMM_WORLD, bs, 4, id, PETSC_COPY_VALUES, <og)); in main() 41 … PetscCall(ISLocalToGlobalMappingCreate(PETSC_COMM_WORLD, bs, 8, id, PETSC_COPY_VALUES, <og)); in main() 44 … PetscCall(ISLocalToGlobalMappingCreate(PETSC_COMM_WORLD, bs, 8, id, PETSC_COPY_VALUES, <og)); in main() 46 … PetscCall(ISLocalToGlobalMappingCreate(PETSC_COMM_WORLD, bs, 0, NULL, PETSC_COPY_VALUES, <og)); in main() 51 … PetscCall(ISLocalToGlobalMappingCreate(PETSC_COMM_WORLD, bs, 16, id, PETSC_COPY_VALUES, <og)); in main() 59 … PetscCall(ISLocalToGlobalMappingCreate(PETSC_COMM_WORLD, bs, 3, id, PETSC_COPY_VALUES, <og)); in main() [all …]
|
| H A D | ex1.c | 10 ISLocalToGlobalMapping ltog; in main() local 16 PetscCall(ISLocalToGlobalMappingCreateIS(isx, <og)); in main() 19 PetscCall(ISLocalToGlobalMappingApply(ltog, 2, iy, mp)); in main() 23 PetscCall(ISLocalToGlobalMappingApplyBlock(ltog, 2, iy, mp)); in main() 26 PetscCall(ISLocalToGlobalMappingDestroy(<og)); in main()
|
| /petsc/src/dm/tests/ |
| H A D | ex9.c | 11 ISLocalToGlobalMapping *ltog, ltogs; in main() local 47 PetscCall(DMCompositeGetISLocalToGlobalMappings(packer, <og)); in main() 49 PetscCall(ISLocalToGlobalMappingView(ltog[0], PETSC_VIEWER_STDOUT_WORLD)); in main() 51 PetscCall(ISLocalToGlobalMappingView(ltog[1], PETSC_VIEWER_STDOUT_WORLD)); in main() 52 for (i = 0; i < 2; i++) PetscCall(ISLocalToGlobalMappingDestroy(<og[i])); in main() 54 PetscCall(PetscFree(ltog)); in main()
|
| H A D | ex16.c | 12 ISLocalToGlobalMapping *ltog; in main() local 89 PetscCall(DMCompositeGetISLocalToGlobalMappings(packer, <og)); in main() 92 PetscCall(ISLocalToGlobalMappingView(ltog[0], PETSC_VIEWER_STDOUT_WORLD)); in main() 94 PetscCall(ISLocalToGlobalMappingView(ltog[1], PETSC_VIEWER_STDOUT_WORLD)); in main() 96 PetscCall(ISLocalToGlobalMappingView(ltog[2], PETSC_VIEWER_STDOUT_WORLD)); in main() 98 PetscCall(ISLocalToGlobalMappingView(ltog[3], PETSC_VIEWER_STDOUT_WORLD)); in main() 100 for (i = 0; i < 4; i++) PetscCall(ISLocalToGlobalMappingDestroy(<og[i])); in main() 101 PetscCall(PetscFree(ltog)); in main()
|
| H A D | ex4.c | 12 const PetscInt *ltog; in main() local 125 PetscCall(ISLocalToGlobalMappingGetIndices(ltogm, <og)); in main() 136 for (l = 0; l < w; l++) iglobal[kk++] = ltog[iloc + l]; in main() 153 if (iglobal[kk] != ltog[iloc + l]) { in main() 154 … ", petsc1=%" PetscInt_FMT ", petsc2=%" PetscInt_FMT "\n", rank, j, i, l, ltog[iloc + l], iglobal[… in main() 161 PetscCall(ISLocalToGlobalMappingRestoreIndices(ltogm, <og)); in main()
|
| H A D | ex6.c | 12 const PetscInt *ltog; in main() local 144 PetscCall(ISLocalToGlobalMappingGetIndices(ltogm, <og)); in main() 158 for (l = 0; l < w; l++) iglobal[kk++] = ltog[iloc + l]; in main() 177 if (iglobal[kk] != ltog[iloc + l]) { in main() 178 … petsc1=%" PetscInt_FMT ", petsc2=%" PetscInt_FMT "\n", rank, k, j, i, l, ltog[iloc + l], iglobal[… in main() 186 PetscCall(ISLocalToGlobalMappingRestoreIndices(ltogm, <og)); in main()
|
| /petsc/src/vec/is/utils/ |
| H A D | isltog.c | 288 PetscErrorCode ISLocalToGlobalMappingDuplicate(ISLocalToGlobalMapping ltog, ISLocalToGlobalMapping … in ISLocalToGlobalMappingDuplicate() argument 293 PetscValidHeaderSpecific(ltog, IS_LTOGM_CLASSID, 1); in ISLocalToGlobalMappingDuplicate() 294 …ll(ISLocalToGlobalMappingCreate(PetscObjectComm((PetscObject)ltog), ltog->bs, ltog->n, ltog->indic… in ISLocalToGlobalMappingDuplicate() 295 PetscCall(ISLocalToGlobalMappingGetType(ltog, &l2gtype)); in ISLocalToGlobalMappingDuplicate() 555 PetscInt i, maxlocal, nroots, nleaves, *globals, *ltog; in ISLocalToGlobalMappingCreateSF() local 570 PetscCall(PetscMalloc1(maxlocal, <og)); in ISLocalToGlobalMappingCreateSF() 572 for (i = 0; i < maxlocal; i++) ltog[i] = -1; in ISLocalToGlobalMappingCreateSF() 573 PetscCall(PetscSFBcastBegin(sf, MPIU_INT, globals, ltog, MPI_REPLACE)); in ISLocalToGlobalMappingCreateSF() 574 PetscCall(PetscSFBcastEnd(sf, MPIU_INT, globals, ltog, MPI_REPLACE)); in ISLocalToGlobalMappingCreateSF() 575 PetscCall(ISLocalToGlobalMappingCreate(comm, 1, maxlocal, ltog, PETSC_OWN_POINTER, mapping)); in ISLocalToGlobalMappingCreateSF() [all …]
|
| H A D | pmap.c | 348 PetscErrorCode PetscLayoutSetISLocalToGlobalMapping(PetscLayout in, ISLocalToGlobalMapping ltog) in PetscLayoutSetISLocalToGlobalMapping() argument 351 if (ltog) { in PetscLayoutSetISLocalToGlobalMapping() 354 PetscCall(ISLocalToGlobalMappingGetBlockSize(ltog, &bs)); in PetscLayoutSetISLocalToGlobalMapping() 357 PetscCall(PetscObjectReference((PetscObject)ltog)); in PetscLayoutSetISLocalToGlobalMapping() 359 in->mapping = ltog; in PetscLayoutSetISLocalToGlobalMapping()
|
| /petsc/src/vec/vec/tutorials/ |
| H A D | ex8.c | 52 ISLocalToGlobalMapping ltog; in main() local 53 …etscCall(ISLocalToGlobalMappingCreate(PETSC_COMM_SELF, 1, ng, gindices, PETSC_COPY_VALUES, <og)); in main() 54 PetscCall(VecSetLocalToGlobalMapping(x, ltog)); in main() 55 PetscCall(ISLocalToGlobalMappingDestroy(<og)); in main()
|
| H A D | ex8f.F90 | 15 ISLocalToGlobalMapping :: ltog 65 …lobalMappingCreate(PETSC_COMM_SELF, 1_PETSC_INT_KIND, ng, gindices, PETSC_COPY_VALUES, ltog, ierr)) 66 PetscCallA(VecSetLocalToGlobalMapping(x, ltog, ierr)) 67 PetscCallA(ISLocalToGlobalMappingDestroy(ltog, ierr))
|
| /petsc/src/dm/impls/da/ |
| H A D | fdda.c | 739 ISLocalToGlobalMapping ltog; in DMCreateMatrix_DA() local 743 PetscCall(DMGetLocalToGlobalMapping(da, <og)); in DMCreateMatrix_DA() 744 PetscCall(MatSetLocalToGlobalMapping(A, ltog, ltog)); in DMCreateMatrix_DA() 763 ISLocalToGlobalMapping ltog; in DMCreateMatrix_DA_IS() local 774 PetscCall(DMGetLocalToGlobalMapping(dm, <og)); in DMCreateMatrix_DA_IS() 777 PetscCall(ISLocalToGlobalMappingGetSize(ltog, &nv)); in DMCreateMatrix_DA_IS() 784 PetscCall(ISLocalToGlobalMappingGetBlockIndices(ltog, &idx)); in DMCreateMatrix_DA_IS() 786 PetscCall(ISLocalToGlobalMappingRestoreBlockIndices(ltog, &idx)); in DMCreateMatrix_DA_IS() 791 PetscCall(ISLocalToGlobalMappingCreateIS(is, <og)); in DMCreateMatrix_DA_IS() 792 PetscCall(MatSetLocalToGlobalMapping(J, ltog, ltog)); in DMCreateMatrix_DA_IS() [all …]
|
| /petsc/src/ksp/ksp/tests/ |
| H A D | ex29.c | 123 const PetscInt *ltog; in FormJacobian_Grid() local 138 PetscCall(ISLocalToGlobalMappingGetIndices(ltogm, <og)); in FormJacobian_Grid() 145 grow = ltog[row]; in FormJacobian_Grid() 148 col[0] = ltog[row - Xm]; in FormJacobian_Grid() 150 col[1] = ltog[row - 1]; in FormJacobian_Grid() 154 col[3] = ltog[row + 1]; in FormJacobian_Grid() 156 col[4] = ltog[row + Xm]; in FormJacobian_Grid() 167 PetscCall(ISLocalToGlobalMappingRestoreIndices(ltogm, <og)); in FormJacobian_Grid()
|
| H A D | ex26.c | 152 const PetscInt *ltog; in FormJacobian_Grid() local 168 PetscCall(ISLocalToGlobalMappingGetIndices(ltogm, <og)); in FormJacobian_Grid() 175 grow = ltog[row]; in FormJacobian_Grid() 178 col[0] = ltog[row - Xm]; in FormJacobian_Grid() 180 col[1] = ltog[row - 1]; in FormJacobian_Grid() 184 col[3] = ltog[row + 1]; in FormJacobian_Grid() 186 col[4] = ltog[row + Xm]; in FormJacobian_Grid() 197 PetscCall(ISLocalToGlobalMappingRestoreIndices(ltogm, <og)); in FormJacobian_Grid()
|
| H A D | ex19.c | 177 const PetscInt *ltog; in FormJacobian_Grid() local 192 PetscCall(ISLocalToGlobalMappingGetIndices(ltogm, <og)); in FormJacobian_Grid() 199 grow = ltog[row]; in FormJacobian_Grid() 202 col[0] = ltog[row - Xm]; in FormJacobian_Grid() 204 col[1] = ltog[row - 1]; in FormJacobian_Grid() 208 col[3] = ltog[row + 1]; in FormJacobian_Grid() 210 col[4] = ltog[row + Xm]; in FormJacobian_Grid() 221 PetscCall(ISLocalToGlobalMappingRestoreIndices(ltogm, <og)); in FormJacobian_Grid()
|
| H A D | ex14.c | 425 const PetscInt *ltog; /* local-to-global mapping */ in ComputeJacobian() local 464 PetscCall(ISLocalToGlobalMappingGetIndices(ltogm, <og)); in ComputeJacobian() 482 grow = ltog[row]; in ComputeJacobian() 490 col[0] = ltog[row - gxm]; in ComputeJacobian() 492 col[1] = ltog[row - 1]; in ComputeJacobian() 496 col[3] = ltog[row + 1]; in ComputeJacobian() 498 col[4] = ltog[row + gxm]; in ComputeJacobian() 502 PetscCall(ISLocalToGlobalMappingRestoreIndices(ltogm, <og)); in ComputeJacobian()
|
| /petsc/src/mat/impls/localref/ |
| H A D | mlocalref.c | 93 static PetscErrorCode ISL2GCompose(IS is, ISLocalToGlobalMapping ltog, ISLocalToGlobalMapping *clto… in ISL2GCompose() argument 102 PetscValidHeaderSpecific(ltog, IS_LTOGM_CLASSID, 2); in ISL2GCompose() 109 PetscCall(ISLocalToGlobalMappingGetBlockSize(ltog, &lbs)); in ISL2GCompose() 115 PetscCall(ISLocalToGlobalMappingApplyBlock(ltog, m, idx, idxm)); in ISL2GCompose() 125 if (ltog) { in ISL2GCompose() 126 PetscCall(ISLocalToGlobalMappingApply(ltog, m, idx, idxm)); in ISL2GCompose() 135 static PetscErrorCode ISL2GComposeBlock(IS is, ISLocalToGlobalMapping ltog, ISLocalToGlobalMapping … in ISL2GComposeBlock() argument 142 PetscValidHeaderSpecific(ltog, IS_LTOGM_CLASSID, 2); in ISL2GComposeBlock() 146 PetscCall(ISLocalToGlobalMappingGetBlockSize(ltog, &bs)); in ISL2GComposeBlock() 148 if (ltog) { in ISL2GComposeBlock() [all …]
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex14f.F90 | 242 PetscInt, pointer ::ltog(:) 275 PetscCall(ISLocalToGlobalMappingGetIndices(ltogm, ltog, ierr)) 292 grow(1) = ltog(row) 298 col(1) = ltog(row - gxm) 300 col(2) = ltog(row - 1) 304 col(4) = ltog(row + 1) 306 col(5) = ltog(row + gxm) 311 PetscCall(ISLocalToGlobalMappingRestoreIndices(ltogm, ltog, ierr))
|
| /petsc/src/dm/impls/shell/ |
| H A D | dmshell.c | 10 VecScatter ltog; member 90 …PetscCheck(shell->ltog, ((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONGSTATE, "Cannot be used without… in DMLocalToGlobalBeginDefaultShell() 91 PetscCall(VecScatterBegin(shell->ltog, l, g, mode, SCATTER_FORWARD)); in DMLocalToGlobalBeginDefaultShell() 114 …PetscCheck(shell->ltog, ((PetscObject)dm)->comm, PETSC_ERR_ARG_WRONGSTATE, "Cannot be used without… in DMLocalToGlobalEndDefaultShell() 115 PetscCall(VecScatterEnd(shell->ltog, l, g, mode, SCATTER_FORWARD)); in DMLocalToGlobalEndDefaultShell() 658 PetscErrorCode DMShellSetLocalToGlobalVecScatter(DM dm, VecScatter ltog) in DMShellSetLocalToGlobalVecScatter() argument 664 PetscValidHeaderSpecific(ltog, PETSCSF_CLASSID, 2); in DMShellSetLocalToGlobalVecScatter() 665 PetscCall(PetscObjectReference((PetscObject)ltog)); in DMShellSetLocalToGlobalVecScatter() 666 PetscCall(VecScatterDestroy(&shell->ltog)); in DMShellSetLocalToGlobalVecScatter() 667 shell->ltog = ltog; in DMShellSetLocalToGlobalVecScatter() [all …]
|
| /petsc/src/mat/tests/ |
| H A D | ex240.c | 19 ISLocalToGlobalMapping ltog; in main() local 33 PetscCall(DMGetLocalToGlobalMapping(da, <og)); in main() 36 PetscCall(ISLocalToGlobalMappingApply(ltog, n, map, map)); in main()
|
| /petsc/src/dm/impls/redundant/ |
| H A D | dmredundant.c | 13 ISLocalToGlobalMapping ltog; in DMCreateMatrix_Redundant() local 26 PetscCall(DMGetLocalToGlobalMapping(dm, <og)); in DMCreateMatrix_Redundant() 27 PetscCall(MatSetLocalToGlobalMapping(*J, ltog, ltog)); in DMCreateMatrix_Redundant() 57 ISLocalToGlobalMapping ltog; in DMCreateGlobalVector_Redundant() local 66 PetscCall(DMGetLocalToGlobalMapping(dm, <og)); in DMCreateGlobalVector_Redundant() 67 PetscCall(VecSetLocalToGlobalMapping(*gvec, ltog)); in DMCreateGlobalVector_Redundant()
|
| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex49.c | 83 ISLocalToGlobalMapping ltog; in CheckOffsets() local 129 PetscCall(DMGetLocalToGlobalMapping(dm, <og)); in CheckOffsets() 130 PetscCall(ISLocalToGlobalMappingViewFromOptions(ltog, NULL, "-ltog_view")); in CheckOffsets() 184 PetscCall(DMGetLocalToGlobalMapping(cdm, <og)); in CheckOffsets() 185 PetscCall(ISLocalToGlobalMappingViewFromOptions(ltog, NULL, "-coord_ltog_view")); in CheckOffsets()
|
| /petsc/src/dm/impls/stag/ |
| H A D | stagstencil.c | 37 ISLocalToGlobalMapping ltog; in DMStagCreateISFromStencils() local 79 PetscCall(DMGetLocalToGlobalMapping(dm, <og)); in DMStagCreateISFromStencils() 80 PetscCall(ISLocalToGlobalMappingGetIndices(ltog, <ogidx)); in DMStagCreateISFromStencils() 112 PetscCall(ISLocalToGlobalMappingRestoreIndices(ltog, <ogidx)); in DMStagCreateISFromStencils()
|
| /petsc/src/dm/impls/da/hypre/ |
| H A D | mhyp.c | 106 ISLocalToGlobalMapping ltog; in MatSetUp_HYPREStruct() local 220 PetscCall(DMGetLocalToGlobalMapping(ex->da, <og)); in MatSetUp_HYPREStruct() 221 PetscCall(ISLocalToGlobalMappingGetIndices(ltog, (const PetscInt **)&ex->gindices)); in MatSetUp_HYPREStruct() 539 ISLocalToGlobalMapping ltog; in MatSetUp_HYPRESStruct() local 684 PetscCall(DMGetLocalToGlobalMapping(ex->da, <og)); in MatSetUp_HYPRESStruct() 685 PetscCall(ISLocalToGlobalMappingGetIndices(ltog, (const PetscInt **)&ex->gindices)); in MatSetUp_HYPRESStruct() 792 ISLocalToGlobalMapping ltog; in MatDestroy_HYPRESStruct() local 795 PetscCall(DMGetLocalToGlobalMapping(ex->da, <og)); in MatDestroy_HYPRESStruct() 796 PetscCall(ISLocalToGlobalMappingRestoreIndices(ltog, (const PetscInt **)&ex->gindices)); in MatDestroy_HYPRESStruct()
|
| /petsc/src/ksp/pc/impls/asm/ |
| H A D | asm.c | 331 ISLocalToGlobalMapping ltog; in PCSetUp_ASM() local 341 PetscCall(ISLocalToGlobalMappingCreateIS(osm->lis, <og)); in PCSetUp_ASM() 345 PetscCall(ISGlobalToLocalMappingApply(ltog, IS_GTOLM_DROP, m, idx_is, &nout, idx_lis)); in PCSetUp_ASM() 349 PetscCall(ISLocalToGlobalMappingDestroy(<og)); in PCSetUp_ASM() 355 ISLocalToGlobalMapping ltog; in PCSetUp_ASM() local 363 PetscCall(ISLocalToGlobalMappingCreateIS(osm->is[i], <og)); in PCSetUp_ASM() 365 … PetscCall(ISGlobalToLocalMappingApply(ltog, IS_GTOLM_DROP, m_local, idx_local, &nout, idx1)); in PCSetUp_ASM() 366 PetscCall(ISLocalToGlobalMappingDestroy(<og)); in PCSetUp_ASM() 370 PetscCall(ISLocalToGlobalMappingCreateIS(osm->lis, <og)); in PCSetUp_ASM() 372 … PetscCall(ISGlobalToLocalMappingApply(ltog, IS_GTOLM_DROP, m_local, idx_local, &nout, idx2)); in PCSetUp_ASM() [all …]
|
| /petsc/src/vec/is/is/utils/ |
| H A D | isdiff.c | 747 ISLocalToGlobalMapping ltog; in ISEmbed() local 756 PetscCall(ISLocalToGlobalMappingCreateIS(b, <og)); in ISEmbed() 761 PetscCall(ISGlobalToLocalMappingApply(ltog, gtoltype, alen, aindices, &clen, cindices)); in ISEmbed() 763 PetscCall(ISLocalToGlobalMappingDestroy(<og)); in ISEmbed()
|