| /petsc/src/mat/tests/ |
| H A D | ex230.c | 42 PetscInt ii, jj; in ex1_nonsquare_bs1() local 46 jj = 3; in ex1_nonsquare_bs1() 47 PetscCall(MatSetValues(preallocator, 1, &ii, 1, &jj, &vv, INSERT_VALUES)); in ex1_nonsquare_bs1() 50 jj = 4; in ex1_nonsquare_bs1() 51 PetscCall(MatSetValues(preallocator, 1, &ii, 1, &jj, &vv, INSERT_VALUES)); in ex1_nonsquare_bs1() 54 jj = 7; in ex1_nonsquare_bs1() 55 PetscCall(MatSetValue(preallocator, ii, jj, vv, INSERT_VALUES)); in ex1_nonsquare_bs1() 78 PetscInt ii, jj; in ex1_nonsquare_bs1() local 82 jj = 3; in ex1_nonsquare_bs1() 84 PetscCall(MatSetValue(A, ii, jj, vv, INSERT_VALUES)); in ex1_nonsquare_bs1() [all …]
|
| H A D | ex137.c | 8 PetscInt m = 4, bs = 1, ii[5], jj[7]; in main() local 24 jj[0] = 0; in main() 25 jj[1] = 1; in main() 26 jj[2] = 1; in main() 27 jj[3] = 2; in main() 28 jj[4] = 6; in main() 29 jj[5] = 3; in main() 30 jj[6] = 7; in main() 47 jj[0] = 4; in main() 48 jj[1] = 5; in main() [all …]
|
| H A D | ex259.c | 37 PetscInt ii, jj; in ex1_nonsquare_bs1() local 41 jj = 3; in ex1_nonsquare_bs1() 42 PetscCall(MatSetValue(A, ii, jj, vv, INSERT_VALUES)); in ex1_nonsquare_bs1() 45 jj = 4; in ex1_nonsquare_bs1() 46 PetscCall(MatSetValue(A, ii, jj, vv, INSERT_VALUES)); in ex1_nonsquare_bs1() 47 PetscCall(MatSetValue(A, jj, ii, vv, INSERT_VALUES)); in ex1_nonsquare_bs1() 50 jj = 7; in ex1_nonsquare_bs1() 51 PetscCall(MatSetValue(A, ii, jj, vv, INSERT_VALUES)); in ex1_nonsquare_bs1() 52 PetscCall(MatSetValue(A, jj, ii, vv, INSERT_VALUES)); in ex1_nonsquare_bs1() 64 PetscInt ii, jj; in ex1_nonsquare_bs1() local [all …]
|
| /petsc/src/mat/tutorials/ |
| H A D | ex11.c | 17 PetscInt *ii, *jj; in main() local 29 PetscCall(PetscMalloc1(6, &jj)); in main() 34 jj[0] = 0; in main() 35 jj[1] = 1; in main() 36 jj[2] = 2; in main() 37 jj[3] = 1; in main() 38 jj[4] = 2; in main() 39 jj[5] = 3; in main() 41 jj[0] = 1; in main() 42 jj[1] = 4; in main() [all …]
|
| H A D | ex11f.F90 | 12 PetscInt :: ii(3), jj(6) 25 jj(1) = 0 26 jj(2) = 1 27 jj(3) = 2 28 jj(4) = 1 29 jj(5) = 2 30 jj(6) = 3 32 jj(1) = 1 33 jj(2) = 4 34 jj(3) = 5 [all …]
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex4.c | 19 PetscInt i, j, Ii, J, Istart, Iend, m = 8, n = 7, its, bs = 1, II, JJ, jj; in main() local 51 for (jj = 0; jj < bs; jj++) { in main() 52 II = Ii * bs + jj; in main() 53 JJ = J * bs + jj; in main() 59 for (jj = 0; jj < bs; jj++) { in main() 60 II = Ii * bs + jj; in main() 61 JJ = J * bs + jj; in main() 67 for (jj = 0; jj < bs; jj++) { in main() 68 II = Ii * bs + jj; in main() 69 JJ = J * bs + jj; in main() [all …]
|
| H A D | ex55.c | 157 PetscInt jj, ii, idx[4]; in main() local 168 for (jj = 0; jj < 8; jj++) DD[ii][jj] = alpha * DD1[ii][jj]; in main() 175 for (jj = 0; jj < 8; jj++) DD[ii][jj] = alpha * DD2[ii][jj]; in main() 182 PetscInt jj = 2 * Ii; /* load in x direction */ in main() local 183 PetscCall(VecSetValues(bb, 1, &jj, &v, INSERT_VALUES)); in main()
|
| H A D | ex54.c | 103 PetscInt jj, ii, idx[4]; in main() local 113 for (jj = 0; jj < 4; jj++) DD[ii][jj] = alpha * DD1[ii][jj]; in main() 121 for (jj = 0; jj < 4; jj++) DD[ii][jj] = alpha * DD2[ii][jj]; in main() 128 PetscInt jj = Ii; in main() local 129 PetscCall(VecSetValues(bb, 1, &jj, &v, INSERT_VALUES)); in main()
|
| H A D | ex61f.F90 | 79 integer :: i, j, ij, ij2, ii, jj, nz, ip, dx, dy, icase 135 jj = j + dy 137 ij2 = ii + (jj - 1)*n 139 isvalid_jj = (1 <= jj) .and. (jj <= n) 184 jj = jlist(ip) 186 PetscCallA(MatSetValue(col_f_mat, ii, jj, aij, INSERT_VALUES, ierr))
|
| /petsc/src/snes/tutorials/ |
| H A D | ex16.c | 284 PetscInt ii, jj, kk, l; in DeformationGradient() local 291 for (jj = 0; jj < NB; jj++) { in DeformationGradient() 293 PetscInt idx = ii + jj * NB + kk * NB * NB; in DeformationGradient() 311 void DeformationGradientJacobian(PetscInt qi, PetscInt qj, PetscInt qk, PetscInt ii, PetscInt jj, P… in DeformationGradientJacobian() argument 315 PetscInt idx = ii + jj * NB + kk * NB * NB; in DeformationGradientJacobian() 372 PetscInt i, j, k, ii, jj, kk; in FormElements() local 382 for (jj = 0; jj < NQ; jj++) { in FormElements() 384 … PetscInt idx = ii + NQ * jj + NQ * NQ * kk + NEQ * i + NEQ * NB * j + NEQ * NB * NB * k; in FormElements() 386 by = pts[jj]; in FormElements() 419 PetscInt ii, jj, kk; in GatherElementData() local [all …]
|
| /petsc/src/ts/tutorials/advection-diffusion-reaction/ |
| H A D | shashi.F90 | 402 PetscInt jj, jb, ii3, id, ib, i 579 do jj = 2, 26 580 d_eq(5, jj) = d_eq(5, 1) 595 do jj = 2, 26 596 d_eq(3, jj) = d_eq(3, 1) 616 do jj = 2, 26 617 d_eq(7, jj) = d_eq(7, 1) 627 do jj = 2, 26 628 d_eq(8, jj) = d_eq(8, 1) 638 do jj = 2, 26 [all …]
|
| /petsc/src/mat/impls/aij/seq/ftn-kernels/ |
| H A D | fmult.F90 | 12 PetscInt, intent(in) :: n, ii(*), jj(0:*) 20 y(jj(jstart:jend - 1)) = y(jj(jstart:jend - 1)) + x(i - 1)*a(jstart:jend - 1) 29 PetscInt, intent(in) :: n, ii(*), jj(0:*) 39 y(i) = sum(a(jstart:jend - 1)*x(jj(jstart:jend - 1)))
|
| /petsc/src/mat/utils/ |
| H A D | zerodiag.c | 72 PetscInt prow, k, nz, n, repl, *j, *col, *row, m, *icol, nnz, *jj, kk; in MatReorderForNonzeroDiagonal_SeqAIJ() local 114 PetscCall(MatGetRow_SeqAIJ(mat, row[repl], &nnz, &jj, &vv)); in MatReorderForNonzeroDiagonal_SeqAIJ() 116 if (icol[jj[kk]] == prow && PetscAbsScalar(vv[kk]) > abstol) { in MatReorderForNonzeroDiagonal_SeqAIJ() 117 PetscCall(MatRestoreRow_SeqAIJ(mat, row[repl], &nnz, &jj, &vv)); in MatReorderForNonzeroDiagonal_SeqAIJ() 123 PetscCall(MatRestoreRow_SeqAIJ(mat, row[repl], &nnz, &jj, &vv)); in MatReorderForNonzeroDiagonal_SeqAIJ() 131 PetscCall(MatGetRow_SeqAIJ(mat, row[k], &nnz, &jj, &vv)); in MatReorderForNonzeroDiagonal_SeqAIJ() 133 if (icol[jj[kk]] == prow && PetscAbsScalar(vv[kk]) > abstol) { in MatReorderForNonzeroDiagonal_SeqAIJ() 139 PetscCall(MatRestoreRow_SeqAIJ(mat, row[k], &nnz, &jj, &vv)); in MatReorderForNonzeroDiagonal_SeqAIJ()
|
| /petsc/src/mat/graphops/coarsen/impls/hem/ |
| H A D | hem.c | 365 PetscInt lsz, ii, kk, *idxs, jj, gid; in PetscCDGetASMBlocks() local 381 for (jj = 0; jj < a_bs; lsz++, jj++) idxs[lsz] = a_bs * gid + jj; in PetscCDGetASMBlocks() 561 for (PetscInt jj = 0; jj < n; jj++) { in MatCoarsenApply_HEM_private() local 562 PetscInt lidj = aj[jj]; in MatCoarsenApply_HEM_private() 564 if ((tt = PetscRealPart(ap[jj])) > threshold && lidj != lid) { in MatCoarsenApply_HEM_private() 574 for (PetscInt jj = 0; jj < n; jj++) { in MatCoarsenApply_HEM_private() local 575 if ((tt = PetscRealPart(ap[jj])) > threshold) { in MatCoarsenApply_HEM_private() 578 if ((pe = lghost_pe[aj[jj]]) > max_pe) max_pe = pe; in MatCoarsenApply_HEM_private() 633 for (PetscInt jj = 0; jj < n; jj++) { in MatCoarsenApply_HEM_private() local 634 PetscInt lidj = aj[jj]; in MatCoarsenApply_HEM_private() [all …]
|
| /petsc/src/ksp/pc/impls/gamg/ |
| H A D | util.c | 27 PetscInt nnodes, num_ghosts, dir, kk, jj, my0, Iend, nloc; in PCGAMGGetDataWithGhosts() local 59 …for (kk = nloc, jj = 0; jj < num_ghosts; kk++, jj++) datas[dir * nnodes + kk] = PetscRealPart(data… in PCGAMGGetDataWithGhosts()
|
| H A D | agg.c | 357 PetscInt arrsz, kk, ii, jj, nloc, ndatarows, ndf; in PCSetCoordinates_AGG() local 390 for (jj = 0; jj < ndatarows; jj++) { in PCSetCoordinates_AGG() 391 if (ii == jj) data[ii * M + jj] = 1.0; in PCSetCoordinates_AGG() 392 else data[ii * M + jj] = 0.0; in PCSetCoordinates_AGG() 513 …PetscInt Istart, my0, Iend, nloc, clid, flid = 0, aggID, kk, jj, ii, mm, nSelected, minsz, ng… in formProl0() local 539 PetscCall(MatGetOwnershipRangeColumn(a_Prol, &ii, &jj)); in formProl0() 541 …jj - ii) / nSAvec, PETSC_COMM_SELF, PETSC_ERR_PLIB, "nSelected %" PetscInt_FMT " != (jj %" PetscIn… in formProl0() 553 PetscCall(PetscCDCountAt(agg_llists, mm, &jj)); in formProl0() 554 if (jj > 0) { in formProl0() 563 PetscCall(PetscBLASIntCast(jj, &asz)); in formProl0() [all …]
|
| H A D | geo.c | 129 PetscInt jj, tid, tt, idx, nselected_2; in triangulateAndFormProl() local 252 for (jj = 0; jj < nFineLoc; jj++) { in triangulateAndFormProl() 256 if (lid == jj) sel = PETSC_FALSE; in triangulateAndFormProl() 258 … if (sel) fprintf(file, "%d %e %e\n", sid++, (double)coords[jj], (double)coords[data_stride + jj]); in triangulateAndFormProl() 273 for (jj = 0; jj < 3; jj++) { in triangulateAndFormProl() 307 for (tid = node_tri[clid], jj = 0; jj < 5 && !haveit && tid != -1; jj++) { in triangulateAndFormProl() 386 PetscInt jj = cgid * bs, ii = fgid * bs; /* need to gloalize */ in triangulateAndFormProl() local 387 …for (tt = 0; tt < bs; tt++, ii++, jj++) PetscCall(MatSetValues(a_Prol, 1, &ii, 1, &jj, &shp, INSER… in triangulateAndFormProl() 607 PetscInt Istart, Iend, nloc, my0, jj, kk, ncols, nLocalSelected, bs, *clid_flid; in PCGAMGProlongator_GEO() local 629 PetscCall(ISGetSize(selected_1, &jj)); in PCGAMGProlongator_GEO() [all …]
|
| /petsc/src/dm/impls/da/ |
| H A D | fdda.c | 927 …PetscInt istart, iend, jstart, jend, kstart, kend, zs, nz, gzs, gnz, ii, jj, kk, M, … in DMCreateMatrix_DA_3d_MPISELL() local 966 for (jj = jstart; jj < jend + 1; jj++) { in DMCreateMatrix_DA_3d_MPISELL() 968 …if (st == DMDA_STENCIL_BOX || ((!ii && !jj) || (!jj && !kk) || (!ii && !kk))) { /* entries on star… in DMCreateMatrix_DA_3d_MPISELL() 969 cols[cnt++] = l + nc * (slot + ii + gnx * jj + gnx * gny * kk); in DMCreateMatrix_DA_3d_MPISELL() 1008 for (jj = jstart; jj < jend + 1; jj++) { in DMCreateMatrix_DA_3d_MPISELL() 1010 …if (st == DMDA_STENCIL_BOX || ((!ii && !jj) || (!jj && !kk) || (!ii && !kk))) { /* entries on star… in DMCreateMatrix_DA_3d_MPISELL() 1011 cols[cnt++] = l + nc * (slot + ii + gnx * jj + gnx * gny * kk); in DMCreateMatrix_DA_3d_MPISELL() 1273 …PetscInt istart, iend, jstart, jend, kstart, kend, zs, nz, gzs, gnz, ii, jj, kk, M, … in DMCreateMatrix_DA_3d_MPIAIJ() local 1322 for (jj = jstart; jj < jend + 1; jj++) { in DMCreateMatrix_DA_3d_MPIAIJ() 1324 …if (st == DMDA_STENCIL_BOX || ((!ii && !jj) || (!jj && !kk) || (!ii && !kk))) { /* entries on star… in DMCreateMatrix_DA_3d_MPIAIJ() [all …]
|
| /petsc/src/binding/petsc4py/demo/legacy/perftest/ |
| H A D | App.f90 | 59 integer :: i,j,k,ii(-1:1),jj(-1:1),kk(-1:1) local 74 jj = [j-1, j, j+1] 76 jj(-1) = j 78 jj(+1) = j 89 P2 = x(i,jj,k)
|
| /petsc/src/dm/tutorials/ |
| H A D | ex20.c | 97 PetscInt ii, jj, cnt; in pic_insert_DMPLEX_with_cell_list() local 113 for (jj = 0; jj < nx[1]; jj++) { in pic_insert_DMPLEX_with_cell_list() 116 trivert[2 * cnt + 1] = 0.0 + jj * dy; in pic_insert_DMPLEX_with_cell_list() 123 for (jj = 0; jj < cells_per_dim[1]; jj++) { in pic_insert_DMPLEX_with_cell_list() 127 idx = (ii) + (jj)*nx[0]; in pic_insert_DMPLEX_with_cell_list()
|
| H A D | ex2.c | 64 PetscInt ii, jj; in main() local 66 for (jj = -1; jj <= 1; jj++) x[j + jj][i + ii] = GLIDER[1 - jj][ii + 1]; in main()
|
| /petsc/src/dm/impls/swarm/ |
| H A D | swarmpic_da.c | 11 PetscInt ii, jj, kk; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular() local 39 for (jj = 0; jj < np[1]; jj++) { in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular() 42 xi[dim * cnt + 1] = -1.0 + 0.5 * ds[1] + jj * ds[1]; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular() 51 for (jj = 0; jj < np[1]; jj++) { in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular() 54 xi[dim * cnt + 1] = -1.0 + 0.5 * ds[1] + jj * ds[1]; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
|
| /petsc/src/dm/impls/stag/ |
| H A D | stagmulti.c | 1067 PetscInt xc, yc, mc, nc, nExtraxc, nExtrayc, i, j, d, ii, jj, count; in DMStagPopulateRestriction2d_Internal() local 1102 for (jj = -(factory - 1); jj <= factory - 1; ++jj) in DMStagPopulateRestriction2d_Internal() 1105 colf[count].j = j * factory + jj; in DMStagPopulateRestriction2d_Internal() 1109 PetscCall(SetRestrictionCoefficientVertex_Private(jj, factory, &ay)); in DMStagPopulateRestriction2d_Internal() 1132 for (jj = 0; jj < factory; ++jj) in DMStagPopulateRestriction2d_Internal() 1135 colf[count].j = j * factory + jj; in DMStagPopulateRestriction2d_Internal() 1139 PetscCall(SetRestrictionCoefficientCenter_Private(jj, factory, &ay)); in DMStagPopulateRestriction2d_Internal() 1160 for (jj = -(factory - 1); jj <= factory - 1; ++jj) in DMStagPopulateRestriction2d_Internal() 1163 colf[count].j = j * factory + jj; in DMStagPopulateRestriction2d_Internal() 1167 PetscCall(SetRestrictionCoefficientVertex_Private(jj, factory, &ay)); in DMStagPopulateRestriction2d_Internal() [all …]
|
| /petsc/src/sys/tests/ |
| H A D | ex63.c | 18 PetscInt64 ii, jj, count = 0; in Prime() local 27 for (jj = 2; jj <= PetscFloorReal(PetscSqrtReal(ii)); jj++) { in Prime() 28 if (ii % jj == 0) { in Prime()
|
| /petsc/src/mat/impls/baij/seq/ftn-kernels/ |
| H A D | fsolvebaij.F90 | 89 PetscInt :: ii, jj, i, j 129 do jj = 0, nn 130 s(ii) = s(ii) - a(ax + 4*jj + ii)*w(jj) 157 do jj = 0, nn 158 s(ii) = s(ii) - a(ax + 4*jj + ii)*w(jj)
|