Home
last modified time | relevance | path

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

12

/petsc/src/mat/graphops/coarsen/impls/mis/
H A Dmis.c28 …PetscInt num_fine_ghosts, kk, n, ix, j, *idx, *ii, Iend, my0, nremoved, gid, lid, cpid, l… in MatCoarsenApply_MIS_private() local
84 for (ix = 0; ix < matB->compressedrow.nrows; ix++) { in MatCoarsenApply_MIS_private()
85 lid = matB->compressedrow.rindex[ix]; in MatCoarsenApply_MIS_private()
86 if (lid >= 0) lid_cprowID[lid] = ix; in MatCoarsenApply_MIS_private()
102 if ((ix = lid_cprowID[lid]) != -1) { /* if I have any ghost neighbors */ in MatCoarsenApply_MIS_private()
104 n = ii[ix + 1] - ii[ix]; in MatCoarsenApply_MIS_private()
105 idx = matB->j + ii[ix]; in MatCoarsenApply_MIS_private()
124 ix = lid_cprowID[lid]; in MatCoarsenApply_MIS_private()
125 if (ix == -1 || !(matB->compressedrow.i[ix + 1] - matB->compressedrow.i[ix])) { in MatCoarsenApply_MIS_private()
158 if ((ix = lid_cprowID[lid]) != -1) { /* if I have any ghost neighbors */ in MatCoarsenApply_MIS_private()
[all …]
/petsc/src/ksp/ksp/tutorials/
H A Dex56.c191 PetscInt jx, ix, idx[8], idx3[24]; in main() local
223 for (ix = 0; ix < 24; ix++) { in main()
224 for (jx = 0; jx < 24; jx++) DD[ix][jx] = alpha * DD1[ix][jx]; in main()
231 for (ix = 0; ix < 8; ix++) { in main()
232 idx3[3 * ix] = 3 * idx[ix]; in main()
233 idx3[3 * ix + 1] = 3 * idx[ix] + 1; in main()
234 idx3[3 * ix + 2] = 3 * idx[ix] + 2; in main()
241 for (ix = 0; ix < 24; ix++) { in main()
242 for (jx = 0; jx < 24; jx++) DD[ix][jx] = alpha * DD2[ix][jx]; in main()
248 for (ix = 0; ix < 8; ix++) { in main()
[all …]
H A Dex55.c13 PetscInt i, m, M, its, Istart, Iend, j, Ii, ix, ne = 4; in main() local
148 for (Ii = Istart / 2, ix = 0; Ii < Iend / 2; Ii++, ix++) { in main()
154 coords[2 * ix] = x; in main()
155 coords[2 * ix + 1] = y; in main()
H A Dex54.c10 PetscInt i, m, M, its, Istart, Iend, j, Ii, ix, ne = 4; in main() local
94 for (Ii = Istart, ix = 0; Ii < Iend; Ii++, ix++) { in main()
100 coords[2 * ix] = x; in main()
101 coords[2 * ix + 1] = y; in main()
/petsc/src/vec/is/sf/tests/
H A Dex15.c13 PetscInt i, n, *ix, *iy, *tomap, start; in main() local
49 PetscCall(PetscMalloc2(n, &ix, n, &iy)); in main()
51 for (i = ranges[rank]; i < ranges[rank + 1]; i++) ix[i - start] = i; in main()
52 PetscCall(ISCreateGeneral(PETSC_COMM_WORLD, n, ix, PETSC_COPY_VALUES, &isx)); in main()
94 PetscCall(PetscFree2(ix, iy)); in main()
119 PetscCall(PetscMalloc2(n, &ix, n, &iy)); in main()
120 for (i = 0; i < n; i++) ix[i] = i; in main()
121 PetscCall(ISCreateGeneral(PETSC_COMM_SELF, n, ix, PETSC_COPY_VALUES, &isx)); in main()
152 PetscCall(PetscFree2(ix, iy)); in main()
177 PetscCall(PetscMalloc2(n / 2, &ix, n / 2, &iy)); in main()
[all …]
H A Dex9.c15 IS ix, iy; in main() local
101 PetscCall(ISCreateStride(PETSC_COMM_SELF, high - low, low, 1, &ix)); in main()
102 PetscCall(ISDuplicate(ix, &iy)); in main()
105 PetscCall(VecScatterCreate(x, ix, yg, iy, &vscat)); in main()
146 PetscCall(ISCreateStride(PETSC_COMM_SELF, 0, 0, 1, &ix)); in main()
147 PetscCall(ISDuplicate(ix, &iy)); in main()
149 PetscCall(VecScatterCreate(x, ix, yg, iy, &vscat)); in main()
161 PetscCall(ISDestroy(&ix)); in main()
178 IS ix, iy; in main() local
237 PetscCall(ISCreateStride(PETSC_COMM_SELF, high - low, low, 1, &ix)); in main()
[all …]
H A Dex6.c13 IS ix; in main() local
35 PetscCall(ISCreateStride(PETSC_COMM_WORLD, n, rstart, 1, &ix)); in main()
42 PetscCall(VecScatterCreate(x, ix, y1, ix, &vscat1)); in main()
43 PetscCall(VecScatterCreate(x, ix, y2, ix, &vscat2)); in main()
72 PetscCall(ISDestroy(&ix)); in main()
H A Dex14.c8 PetscInt bs = 1, ix[2], iy[2]; in main() local
47 ix[0] = rank ? low - 1 : N - 1; /* ix[] contains global indices of the two ghost points */ in main()
48 ix[1] = (rank != nproc - 1) ? high : 0; in main()
52 PetscCall(ISCreateGeneral(PETSC_COMM_SELF, 2, ix, PETSC_COPY_VALUES, &isx)); in main()
70 if ((PetscInt)PetscRealPart(yval[0]) != ix[0] + i) errors++; in main()
71 if ((PetscInt)PetscRealPart(yval[1]) != ix[1] + i) errors++; in main()
107ix[0] = rank ? low / bs - 1 : N / bs - 1; /* ix[] contains global indices of the two ghost blocks … in main()
108 ix[1] = (rank != nproc - 1) ? high / bs : 0; in main()
112 PetscCall(ISCreateBlock(PETSC_COMM_SELF, bs, 2, ix, PETSC_COPY_VALUES, &isx)); in main()
132 if ((PetscInt)PetscRealPart(yval[0]) != ix[0] * bs + i) errors++; in main()
[all …]
H A Dex7.c9 IS ix, iy; in main() local
34 PetscCall(ISCreateBlock(PETSC_COMM_SELF, bs, 2, idx, PETSC_COPY_VALUES, &ix)); in main()
43 PetscCall(ISCreateBlock(PETSC_COMM_SELF, bs, 2, idx, PETSC_COPY_VALUES, &ix)); in main()
46 PetscCall(VecScatterCreate(x, ix, y, iy, &vscat)); in main()
58 PetscCall(ISDestroy(&ix)); in main()
H A Dex2.c17 IS ix, iy; in main() local
47 PetscCall(ISCreateStride(PETSC_COMM_SELF, n, 0, 1, &ix)); in main()
49 PetscCall(VecScatterCreate(x, ix, y, iy, &vscat)); in main()
63 PetscCall(ISDestroy(&ix)); in main()
H A Dex17.c17 IS ix; in main() local
68 PetscCall(ISCreateStride(PETSC_COMM_SELF, rend - rstart, rstart, 1, &ix)); in main()
69 PetscCall(VecScatterCreate(x, ix, y, ix, &vscat)); in main()
84 PetscCall(ISDestroy(&ix)); in main()
H A Dex22.c10 IS ix, iy; in main() local
27 PetscCall(ISCreateStride(PETSC_COMM_WORLD, n, rstart, 1, &ix)); in main()
33 PetscCall(VecScatterCreate(y, iy, x, ix, &vscat)); // y has roots, x has leaves in main()
51 PetscCall(ISDestroy(&ix)); in main()
H A Dex23.c11 IS ix, iy; in main() local
25 PetscCall(ISCreateStride(PETSC_COMM_WORLD, n, rstart, 1, &ix)); in main()
30 PetscCall(VecScatterCreate(y, iy, x, ix, &vscat)); // y has roots, x has leaves in main()
64 PetscCall(ISDestroy(&ix)); in main()
/petsc/src/mat/graphops/coarsen/impls/misk/
H A Dmisk.c74 …PetscInt num_fine_ghosts, kk, n, ix, j, *idx, *ai, Iend, my0, nremoved, gid, cpid, lidj, … in MatCoarsenApply_MISK_private() local
120 for (ix = 0; ix < matB->compressedrow.nrows; ix++) { in MatCoarsenApply_MISK_private()
121 const PetscInt lid = matB->compressedrow.rindex[ix]; in MatCoarsenApply_MISK_private()
122 if (lid >= 0) lid_cprowID[lid] = ix; in MatCoarsenApply_MISK_private()
139 if ((ix = lid_cprowID[lid]) != -1) { /* if I have any ghost neighbors */ in MatCoarsenApply_MISK_private()
141 n = ai[ix + 1] - ai[ix]; in MatCoarsenApply_MISK_private()
142 idx = matB->j + ai[ix]; in MatCoarsenApply_MISK_private()
159 ix = lid_cprowID[lid]; in MatCoarsenApply_MISK_private()
160 if (ix == -1 || !(matB->compressedrow.i[ix + 1] - matB->compressedrow.i[ix])) { in MatCoarsenApply_MISK_private()
195 for (ix = 0; ix < matB->compressedrow.nrows; ix++) { in MatCoarsenApply_MISK_private()
[all …]
/petsc/include/petsc/private/cpp/
H A Dfunctional.hpp36 template <std::size_t ix>
38 using type = util::tuple_element_t<ix, std::tuple<Args...>>;
47 template <std::size_t ix>
49 using type = util::tuple_element_t<ix, std::tuple<Args...>>;
57 template <std::size_t ix>
59 using type = util::tuple_element_t<ix, std::tuple<Args...>>;
/petsc/src/dm/impls/stag/
H A Dstagstencil.c385 … DMStagStencilToIndexLocal(DM dm, PetscInt dim, PetscInt n, const DMStagStencil *pos, PetscInt *ix) in DMStagStencilToIndexLocal() argument
395 ix[idx] = eLocal * epe + stag->locationOffsets[pos[idx].loc] + pos[idx].c; in DMStagStencilToIndexLocal()
405 ix[idx] = eLocal * epe + stag->locationOffsets[pos[idx].loc] + pos[idx].c; in DMStagStencilToIndexLocal()
417 ix[idx] = eLocal * epe + stag->locationOffsets[pos[idx].loc] + pos[idx].c; in DMStagStencilToIndexLocal()
452 PetscInt *ix; in DMStagVecGetValuesStencil() local
460 PetscCall(PetscMalloc1(n, &ix)); in DMStagVecGetValuesStencil()
461 PetscCall(DMStagStencilToIndexLocal(dm, dm->dim, n, pos, ix)); in DMStagVecGetValuesStencil()
463 for (idx = 0; idx < n; ++idx) val[idx] = arr[ix[idx]]; in DMStagVecGetValuesStencil()
465 PetscCall(PetscFree(ix)); in DMStagVecGetValuesStencil()
496 PetscInt *ix; in DMStagVecSetValuesStencil() local
[all …]
/petsc/src/vec/vec/tests/
H A Dex13.c10 PetscInt n, N, ix[2], iy[2]; in main() local
27 ix[0] = ((rank + 1) * n + 0) % N; in main()
28 ix[1] = ((rank + 1) * n + 1) % N; in main()
34 PetscCall(ISCreateGeneral(PETSC_COMM_WORLD, n, ix, PETSC_USE_POINTER, &is1)); in main()
/petsc/src/mat/graphops/coarsen/impls/hem/
H A Dhem.c420 PetscInt ix, *ii, *aj, Istart, bc_agg = -1, *rbuff = NULL, rbuff_sz = 0; in MatCoarsenApply_HEM_private() local
476 for (ix = 0; ix < matB->compressedrow.nrows; ix++) { in MatCoarsenApply_HEM_private()
477 PetscInt *ridx = matB->compressedrow.rindex, lid = ridx[ix]; in MatCoarsenApply_HEM_private()
478 if (ridx[ix] >= 0) lid_cprowID[lid] = ix; in MatCoarsenApply_HEM_private()
485 PetscCall(PetscCDCountAt(agg_llists, kk, &ix)); in MatCoarsenApply_HEM_private()
486 if (ix > 0) lid_matched[kk] = PETSC_FALSE; in MatCoarsenApply_HEM_private()
542 for (ix = 0, ncomm_procs = 0; ix < num_ghosts; ix++) { in MatCoarsenApply_HEM_private()
543 PetscMPIInt proc = lghost_pe[ix], idx = -1; in MatCoarsenApply_HEM_private()
569 if ((ix = lid_cprowID[lid]) != -1) { /* if I have any ghost neighbors */ in MatCoarsenApply_HEM_private()
571 n = ii[ix + 1] - ii[ix]; in MatCoarsenApply_HEM_private()
[all …]
/petsc/src/vec/is/tests/
H A Dex1.c8 PetscInt bs = 2, n = 3, ix[3] = {1, 7, 9}, iy[2] = {0, 2}, mp[2]; in main() local
15 PetscCall(ISCreateBlock(PETSC_COMM_SELF, bs, n, ix, PETSC_COPY_VALUES, &isx)); in main()
H A Dex3.c8 PetscInt bs = 2, n = 3, ix[3] = {1, 7, 9}; in main() local
16 PetscCall(ISCreateBlock(PETSC_COMM_SELF, bs, n, ix, PETSC_COPY_VALUES, &is)); in main()
H A Dex2.c9 PetscInt ix[3][3][3] = { in main() local
26 …for (i = 0; i < 3; i++) PetscCall(ISCreateGeneral(PETSC_COMM_WORLD, n, ix[i][rank], PETSC_COPY_VAL… in main()
95 … PetscCall(ISCreateBlock(PETSC_COMM_WORLD, blocksize, n, ix[i][rank], PETSC_COPY_VALUES, &isx[i])); in main()
/petsc/src/vec/vec/utils/
H A Dvscat.c667 PetscErrorCode VecScatterCreate(Vec x, IS ix, Vec y, IS iy, VecScatter *newsf) in VecScatterCreate() argument
671 IS ix_old = ix, iy_old = iy, ixx, iyy; in VecScatterCreate()
684 …PetscCheck(ix || iy, PetscObjectComm((PetscObject)x), PETSC_ERR_SUP, "Cannot pass default in for b… in VecScatterCreate()
707 if (!ix) { in VecScatterCreate()
710 PetscCall(ISCreateStride(PETSC_COMM_SELF, N, 0, 1, &ix)); in VecScatterCreate()
714 PetscCall(ISCreateStride(PETSC_COMM_SELF, n, xstart, 1, &ix)); in VecScatterCreate()
730 PetscCall(ISGetLocalSize(ix, &ixsize)); in VecScatterCreate()
735 PetscCall(ISGetMinMax(ix, &min, &max)); in VecScatterCreate()
741 PetscCall(ISGetTypeID_Private(ix, &ixid)); in VecScatterCreate()
743 if (ixid == IS_BLOCK) PetscCall(ISGetBlockSize(ix, &bsx)); in VecScatterCreate()
[all …]
/petsc/src/vec/vec/impls/seq/
H A Dbvec2.c489 PetscErrorCode VecGetValues_Seq(Vec xin, PetscInt ni, const PetscInt ix[], PetscScalar y[]) in VecGetValues_Seq() argument
497 if (ignorenegidx && (ix[i] < 0)) continue; in VecGetValues_Seq()
499 …PetscCheck(ix[i] >= 0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Out of range index value %" Pet… in VecGetValues_Seq()
500 …k(ix[i] < xin->map->n, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Out of range index value %" Pet… in VecGetValues_Seq()
502 y[i] = xx[ix[i]]; in VecGetValues_Seq()
508 PetscErrorCode VecSetValues_Seq(Vec xin, PetscInt ni, const PetscInt ix[], const PetscScalar y[], I… in VecSetValues_Seq() argument
519 if (ignorenegidx && (ix[i] < 0)) continue; in VecSetValues_Seq()
522 …PetscCheck(ix[i] >= 0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Out of range index value %" Pet… in VecSetValues_Seq()
523 …k(ix[i] < xin->map->n, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Out of range index value %" Pet… in VecSetValues_Seq()
526 xx[ix[i]] = yv; in VecSetValues_Seq()
[all …]
/petsc/src/vec/vec/impls/mpi/
H A Dpdvec.c710 PetscErrorCode VecGetValues_MPI(Vec xin, PetscInt ni, const PetscInt ix[], PetscScalar y[]) in VecGetValues_MPI() argument
718 if (xin->stash.ignorenegidx && ix[i] < 0) continue; in VecGetValues_MPI()
719 const PetscInt tmp = ix[i] - start; in VecGetValues_MPI()
721 …SC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Can only get local values, trying %" PetscInt_FMT, ix[i]); in VecGetValues_MPI()
728 PetscErrorCode VecSetValues_MPI(Vec xin, PetscInt ni, const PetscInt ix[], const PetscScalar y[], I… in VecSetValues_MPI() argument
748 if (ignorenegidx && ix[i] < 0) continue; in VecSetValues_MPI()
749 …PetscCheck(ix[i] >= 0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Out of range index value %" Pet… in VecSetValues_MPI()
750 if ((row = ix[i]) >= start && row < end) { in VecSetValues_MPI()
757 …k(ix[i] < xin->map->N, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Out of range index value %" Pet… in VecSetValues_MPI()
765 PetscErrorCode VecSetValuesBlocked_MPI(Vec xin, PetscInt ni, const PetscInt ix[], const PetscScalar… in VecSetValuesBlocked_MPI() argument
[all …]
/petsc/src/dm/impls/moab/
H A Ddmmbutil.cxx200 PetscInt x, y, z, ix, nnodes; in DMMoab_GenerateVertices_Private() local
226 ix = 0; in DMMoab_GenerateVertices_Private()
230 for (ii = 0; ii < genCtx.blockSizeVertexXYZ[0]; ii++, ix++) { in DMMoab_GenerateVertices_Private()
232 arrays[0][ix] = (x + ii) * genCtx.dx + genCtx.xyzbounds[0]; in DMMoab_GenerateVertices_Private()
233 arrays[1][ix] = (y + jj) * genCtx.dy + genCtx.xyzbounds[2]; in DMMoab_GenerateVertices_Private()
234 arrays[2][ix] = (z + kk) * genCtx.dz + genCtx.xyzbounds[4]; in DMMoab_GenerateVertices_Private()
235 … "Creating vertex with coordinates := %f, %f, %f\n", arrays[0][ix], arrays[1][ix], arrays[2][ix])); in DMMoab_GenerateVertices_Private()
241 gids[ix] = 1 + (x + ii) + (y + jj) * genCtx.NX + (z + kk) * (genCtx.NX * genCtx.NY); in DMMoab_GenerateVertices_Private()
255 PetscInt ix, ie, xe, ye, ze; in DMMoab_GenerateElements_Private() local
297 ix = ie = 0; /* index now in the elements, for global ids */ in DMMoab_GenerateElements_Private()
[all …]

12