| /petsc/src/ksp/pc/impls/gamg/ |
| H A D | geo.c | 38 PetscInt arrsz, bs, my0, kk, ii, nloc, Iend, aloc; in PCSetCoordinates_GEO() local 61 for (kk = 0; kk < arrsz; kk++) pc_gamg->data[kk] = -999.; in PCSetCoordinates_GEO() 65 for (kk = 0; kk < nloc; kk++) { in PCSetCoordinates_GEO() 66 for (ii = 0; ii < ndm; ii++) pc_gamg->data[ii * nloc + kk] = coords[kk * ndm + ii]; in PCSetCoordinates_GEO() 69 for (kk = 0; kk < nloc; kk++) { in PCSetCoordinates_GEO() 70 for (ii = 0; ii < ndm; ii++) pc_gamg->data[ii * nloc + kk] = coords[bs * kk * ndm + ii]; in PCSetCoordinates_GEO() 134 int kk, nPlotPts, sid; in triangulateAndFormProl() local 162 for (kk = 0, sid = 0; kk < nselected_2; kk++, sid += 2) { in triangulateAndFormProl() 163 PetscInt lid = selected_idx_2[kk]; in triangulateAndFormProl() 223 …for (kk = 0, sid = 0; kk < in.numberofpoints; kk++, sid += 2) fprintf(file, "%d %e %e\n", kk, in.p… in triangulateAndFormProl() [all …]
|
| H A D | util.c | 27 PetscInt nnodes, num_ghosts, dir, kk, jj, my0, Iend, nloc; in PCGAMGGetDataWithGhosts() local 46 for (kk = 0; kk < nloc; kk++) { in PCGAMGGetDataWithGhosts() 47 PetscInt gid = my0 + kk; in PCGAMGGetDataWithGhosts() 48 PetscScalar crd = data_in[dir * nloc + kk]; /* col oriented */ in PCGAMGGetDataWithGhosts() 49 datas[dir * nnodes + kk] = PetscRealPart(crd); // get local part now in PCGAMGGetDataWithGhosts() 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 382 for (kk = 0; kk < nloc; kk++) { in PCSetCoordinates_AGG() 384 PetscReal *data = &pc_gamg->data[kk * ndatarows]; /* start of cell */ in PCSetCoordinates_AGG() 400 data[0] = -coords[2 * kk + 1]; in PCSetCoordinates_AGG() 401 data[1] = coords[2 * kk]; in PCSetCoordinates_AGG() 405 data[M + 0] = coords[3 * kk + 2]; in PCSetCoordinates_AGG() 406 data[2 * M + 0] = -coords[3 * kk + 1]; in PCSetCoordinates_AGG() 407 data[1] = -coords[3 * kk + 2]; in PCSetCoordinates_AGG() 409 data[2 * M + 1] = coords[3 * kk]; in PCSetCoordinates_AGG() 410 data[2] = coords[3 * kk + 1]; in PCSetCoordinates_AGG() [all …]
|
| H A D | gamg.c | 156 …PetscInt *counts, *newproc_idx, ii, jj, kk, strideNew, *tidx, ncrs_new, ncrs_eq_new, nloc_old, exp… in PCGAMGCreateLevel_GAMG() local 168 for (kk = 1; kk <= size; kk++) { in PCGAMGCreateLevel_GAMG() 169 if (!(size % kk)) { /* a candidate */ in PCGAMGCreateLevel_GAMG() 170 PetscReal nactpe = (PetscReal)size / (PetscReal)kk, fact = nactpe / (PetscReal)new_size; in PCGAMGCreateLevel_GAMG() 174 jj = kk; in PCGAMGCreateLevel_GAMG() 286 for (kk = jj = 0; kk < nloc_old; kk++) { in PCGAMGCreateLevel_GAMG() 287 …for (ii = 0; ii < cr_bs; ii++, jj++) newproc_idx[jj] = is_idx[kk] * expand_factor; /* distribution… in PCGAMGCreateLevel_GAMG() 355 for (kk = 0; kk < node_data_sz; kk++, jj++) tidx[jj] = id * node_data_sz + kk; in PCGAMGCreateLevel_GAMG() 367 for (kk = 0; kk < ndata_rows; kk++) { in PCGAMGCreateLevel_GAMG() 368 …PetscInt ix = ii * ndata_rows + kk + jj * stride0, jx = ii * node_data_sz + kk * ndata_cols + j… in PCGAMGCreateLevel_GAMG() [all …]
|
| /petsc/src/mat/graphops/coarsen/impls/hem/ |
| H A D | hem.c | 315 PetscInt ii, kk; in PetscCDGetNonemptyIS() local 319 for (ii = kk = 0; ii < ail->size; ii++) { in PetscCDGetNonemptyIS() 321 if (n) kk++; in PetscCDGetNonemptyIS() 323 PetscCall(PetscMalloc1(kk, &permute)); in PetscCDGetNonemptyIS() 324 for (ii = kk = 0; ii < ail->size; ii++) { in PetscCDGetNonemptyIS() 326 if (n) permute[kk++] = ii; in PetscCDGetNonemptyIS() 328 PetscCall(ISCreateGeneral(PETSC_COMM_SELF, kk, permute, PETSC_OWN_POINTER, a_mis)); in PetscCDGetNonemptyIS() 365 PetscInt lsz, ii, kk, *idxs, jj, gid; in PetscCDGetASMBlocks() local 369 for (ii = kk = 0; ii < ail->size; ii++) { in PetscCDGetASMBlocks() 370 if (ail->array[ii]) kk++; in PetscCDGetASMBlocks() [all …]
|
| /petsc/src/mat/graphops/coarsen/impls/mis/ |
| H A D | mis.c | 28 …PetscInt num_fine_ghosts, kk, n, ix, j, *idx, *ii, Iend, my0, nremoved, gid, lid, cpid, l… in MatCoarsenApply_MIS_private() local 60 for (kk = 0, gid = my0; kk < nloc; kk++, gid++) lid_gid[kk] = gid; in MatCoarsenApply_MIS_private() 68 for (kk = 0; kk < num_fine_ghosts; kk++) cpcol_state[kk] = MIS_NOT_DONE; in MatCoarsenApply_MIS_private() 76 for (kk = 0; kk < nloc; kk++) { in MatCoarsenApply_MIS_private() 77 lid_cprowID[kk] = -1; in MatCoarsenApply_MIS_private() 78 lid_removed[kk] = PETSC_FALSE; in MatCoarsenApply_MIS_private() 79 if (strict_aggs) lid_parent_gid[kk] = -1.0; in MatCoarsenApply_MIS_private() 80 lid_state[kk] = MIS_NOT_DONE; in MatCoarsenApply_MIS_private() 95 for (kk = 0; kk < nloc; kk++) { in MatCoarsenApply_MIS_private() 96 lid = perm_ix[kk]; in MatCoarsenApply_MIS_private() [all …]
|
| /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 115 for (kk = 0; kk < nnz; kk++) { in MatReorderForNonzeroDiagonal_SeqAIJ() 116 if (icol[jj[kk]] == prow && PetscAbsScalar(vv[kk]) > abstol) { in MatReorderForNonzeroDiagonal_SeqAIJ() 132 for (kk = 0; kk < nnz; kk++) { in MatReorderForNonzeroDiagonal_SeqAIJ() 133 if (icol[jj[kk]] == prow && PetscAbsScalar(vv[kk]) > abstol) { in MatReorderForNonzeroDiagonal_SeqAIJ()
|
| /petsc/src/snes/tutorials/ |
| H A D | ex16.c | 284 PetscInt ii, jj, kk, l; in DeformationGradient() local 290 for (kk = 0; kk < NB; kk++) { in DeformationGradient() 293 PetscInt idx = ii + jj * NB + kk * NB * NB; in DeformationGradient() 311 …(PetscInt qi, PetscInt qj, PetscInt qk, PetscInt ii, PetscInt jj, PetscInt kk, PetscInt fld, Petsc… 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 381 for (kk = 0; kk < NQ; kk++) { in FormElements() 384 … PetscInt idx = ii + NQ * jj + NQ * NQ * kk + NEQ * i + NEQ * NB * j + NEQ * NB * NB * k; in FormElements() 387 bz = pts[kk]; in FormElements() 419 PetscInt ii, jj, kk; in GatherElementData() local [all …]
|
| /petsc/src/mat/graphops/coarsen/impls/misk/ |
| H A D | misk.c | 22 for (PetscInt kk = 0; kk < agg_lists->size; kk++) { in PetscCoarsenDataView_private() local 23 PetscCall(PetscCDGetHeadPos(agg_lists, kk, &pos)); in PetscCoarsenDataView_private() 24 …)) PetscCall(PetscViewerASCIISynchronizedPrintf(viewer, "selected local %" PetscInt_FMT ": ", kk)); in PetscCoarsenDataView_private() 28 PetscCall(PetscCDGetNextPos(agg_lists, kk, &pos)); in PetscCoarsenDataView_private() 74 …PetscInt num_fine_ghosts, kk, n, ix, j, *idx, *ai, Iend, my0, nremoved, gid, cpid, lidj, … in MatCoarsenApply_MISK_private() local 97 for (kk = 0, gid = my0; kk < nloc_inner; kk++, gid++) lid_gid[kk] = gid; in MatCoarsenApply_MISK_private() 105 for (kk = 0; kk < num_fine_ghosts; kk++) cpcol_state[kk] = MIS_NOT_DONE; in MatCoarsenApply_MISK_private() 112 for (kk = 0; kk < nloc_inner; kk++) { in MatCoarsenApply_MISK_private() 113 lid_cprowID[kk] = -1; in MatCoarsenApply_MISK_private() 114 lid_removed[kk] = PETSC_FALSE; in MatCoarsenApply_MISK_private() [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 81 kk = [k-1, k, k+1] 83 kk(-1) = k 85 kk(+1) = k 90 P3 = x(i,j,kk)
|
| /petsc/src/dm/tests/ |
| H A D | ex4.c | 10 PetscInt s = 2, w = 2, n = PETSC_DECIDE, nloc, l, i, j, kk; in main() local 132 kk = 0; in main() 136 for (l = 0; l < w; l++) iglobal[kk++] = ltog[iloc + l]; in main() 148 kk = 0; in main() 153 if (iglobal[kk] != ltog[iloc + l]) { in main() 154 …etsc1=%" PetscInt_FMT ", petsc2=%" PetscInt_FMT "\n", rank, j, i, l, ltog[iloc + l], iglobal[kk])); in main() 156 kk++; in main()
|
| H A D | ex6.c | 10 …PetscInt M = 3, N = 5, P = 3, s = 1, w = 2, nloc, l, i, j, k, kk, m = PETSC_DECIDE, n = PET… in main() local 153 kk = 0; in main() 158 for (l = 0; l < w; l++) iglobal[kk++] = ltog[iloc + l]; in main() 171 kk = 0; in main() 177 if (iglobal[kk] != ltog[iloc + l]) { in main() 178 …c1=%" PetscInt_FMT ", petsc2=%" PetscInt_FMT "\n", rank, k, j, i, l, ltog[iloc + l], iglobal[kk])); in main() 180 kk++; in main()
|
| /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 967 for (kk = kstart; kk < kend + 1; kk++) { 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() 1009 for (kk = kstart; kk < kend + 1; kk++) { 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 1323 for (kk = kstart; kk < kend + 1; kk++) { 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 …]
|
| H A D | dadd.c | 39 PetscInt ii, jj, kk; in DMDACreatePatchIS() local 133 kk = k; in DMDACreatePatchIS() 136 if (kk < 0) kk = P + kk; in DMDACreatePatchIS() 139 if (kk > P - 1) kk = kk - P; in DMDACreatePatchIS() 165 while (kk > pe - 1 || kk < ps) { in DMDACreatePatchIS() 184 sk = kk - ps; in DMDACreatePatchIS()
|
| /petsc/src/dm/impls/stag/ |
| H A D | stagmulti.c | 1210 …PetscInt xc, yc, zc, mc, nc, pc, nExtraxc, nExtrayc, nExtrazc, i, j, k, d, ii, jj, kk, count; in DMStagPopulateRestriction3d_Internal() local 1248 for (kk = -(factorz - 1); kk <= factorz - 1; ++kk) in DMStagPopulateRestriction3d_Internal() 1253 colf[count].k = k * factorz + kk; in DMStagPopulateRestriction3d_Internal() 1258 PetscCall(SetRestrictionCoefficientVertex_Private(kk, factorz, &az)); in DMStagPopulateRestriction3d_Internal() 1285 for (kk = 0; kk < factorz; ++kk) in DMStagPopulateRestriction3d_Internal() 1290 colf[count].k = k * factorz + kk; in DMStagPopulateRestriction3d_Internal() 1295 PetscCall(SetRestrictionCoefficientCenter_Private(kk, factorz, &az)); in DMStagPopulateRestriction3d_Internal() 1320 for (kk = -(factorz - 1); kk <= factorz - 1; ++kk) in DMStagPopulateRestriction3d_Internal() 1325 colf[count].k = k * factorz + kk; in DMStagPopulateRestriction3d_Internal() 1330 PetscCall(SetRestrictionCoefficientVertex_Private(kk, factorz, &az)); in DMStagPopulateRestriction3d_Internal() [all …]
|
| H A D | stag3d.c | 106 const PetscInt ii = i * factorx, jj = j * factory, kk = k * factorz; in DMStagRestrictSimple_3d() local 108 arrc[k][j][i][ibackdownleftc + d] = arrf[kk][jj][ii][ibackdownleftf + d]; in DMStagRestrictSimple_3d() 115 const PetscInt ii = i * factorx + factorx / 2, jj = j * factory, kk = k * factorz; in DMStagRestrictSimple_3d() local 117 …x % 2 == 0) arrc[k][j][i][ibackdownc + d] = 0.5 * (arrf[kk][jj][ii - 1][ibackdownf + d] + arrf[kk]… in DMStagRestrictSimple_3d() 118 else arrc[k][j][i][ibackdownc + d] = arrf[kk][jj][ii][ibackdownf + d]; in DMStagRestrictSimple_3d() 125 const PetscInt ii = i * factorx, jj = j * factory + factory / 2, kk = k * factorz; in DMStagRestrictSimple_3d() local 127 …y % 2 == 0) arrc[k][j][i][ibackleftc + d] = 0.5 * (arrf[kk][jj - 1][ii][ibackleftf + d] + arrf[kk]… in DMStagRestrictSimple_3d() 128 else arrc[k][j][i][ibackleftc + d] = arrf[kk][jj][ii][ibackleftf + d]; in DMStagRestrictSimple_3d() 135 const PetscInt ii = i * factorx, jj = j * factory, kk = k * factorz + factorz / 2; in DMStagRestrictSimple_3d() local 137 …z % 2 == 0) arrc[k][j][i][idownleftc + d] = 0.5 * (arrf[kk - 1][jj][ii][idownleftf + d] + arrf[kk]… in DMStagRestrictSimple_3d() [all …]
|
| /petsc/src/dm/impls/plex/tutorials/ |
| H A D | ex6.c | 75 PetscInt ki, kj, kk, o = 0; in LoadData3D() local 81 for (kk = 0; kk <= user->k[f]; ++kk) { in LoadData3D() 84 …for (c = 0; c < user->Nc[f]; ++c) closure[o++] = (((kk + koff) * (Nj * user->k[f] + 1) + kj + joff… in LoadData3D() 160 PetscInt closureSize, ki, kj, kk, f, c, foff = 0; in ReadData3D() local 166 for (kk = user->k[f]; kk >= 0; --kk) { in ReadData3D() 172 …PetscCall(PetscPrintf(PETSC_COMM_SELF, "%2.0f", (double)PetscRealPart(closure[((kk * (user->k[f] +… in ReadData3D()
|
| H A D | ex19.c | 261 for (PetscInt kk = faceWStartRow; kk < faceWStartRow + numCntrlPnts; ++kk) { in main() local 263 PetscCall(MatGetValue(cpEquiv, faceWStartRow + ii, kk, &matValue)); in main() 267 weight = wData[kk]; in main()
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexegads.c | 3078 for (int kk = 0; kk < eSize; ++kk) { in DMPlex_Surface_Grad() local 3079 … PetscCall(PetscHMapIFind(currFaceUniquePoints, eIndices[kk], &eHashKeyIter, &eHashKeyFound)); in DMPlex_Surface_Grad() 3082 PetscCall(PetscHMapISet(currFaceUniquePoints, eIndices[kk], cfCntr)); in DMPlex_Surface_Grad() 3086 … PetscCall(PetscHMapIFind(pointSurfGradRow_Start, eIndices[kk], &pHashKeyIter, &pHashKeyFound)); in DMPlex_Surface_Grad() 3089 PetscCall(PetscHMapISet(pointSurfGradRow_Start, eIndices[kk], gcntr)); in DMPlex_Surface_Grad() 3113 for (int kk = 0; kk < nSize; ++kk) { in DMPlex_Surface_Grad() local 3114 … PetscCall(PetscHMapIFind(currFaceUniquePoints, nIndices[kk], &nHashKeyIter, &nHashKeyFound)); in DMPlex_Surface_Grad() 3117 PetscCall(PetscHMapISet(currFaceUniquePoints, nIndices[kk], cfCntr)); in DMPlex_Surface_Grad() 3121 … PetscCall(PetscHMapIFind(pointSurfGradRow_Start, nIndices[kk], &pHashKeyIter, &pHashKeyFound)); in DMPlex_Surface_Grad() 3123 PetscCall(PetscHMapISet(pointSurfGradRow_Start, nIndices[kk], gcntr)); in DMPlex_Surface_Grad() [all …]
|
| /petsc/src/dm/impls/swarm/ |
| H A D | swarmpic_da.c | 11 PetscInt ii, jj, kk; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular() local 50 for (kk = 0; kk < np[2]; kk++) { in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular() 55 xi[dim * cnt + 2] = -1.0 + 0.5 * ds[2] + kk * ds[2]; in private_DMSwarmCreateCellLocalCoords_DA_Q1_Regular()
|
| /petsc/src/snes/tutorials/network/power/ |
| H A D | power.c | 169 PetscInt key,kk,numComponents; in main() 182 for (kk=0; kk < numComponents; kk++) { in main() 183 PetscCall(DMNetworkGetComponent(networkdm,i,kk,&key,&component)); in main()
|
| /petsc/src/ksp/pc/impls/ml/ |
| H A D | ml.c | 407 PetscInt arrsz, oldarrsz, bs, my0, kk, ii, nloc, Iend, aloc; in PCSetCoordinates_ML() local 431 for (kk = 0; kk < arrsz; kk++) pc_ml->coords[kk] = -999.; in PCSetCoordinates_ML() 434 for (kk = 0; kk < nloc; kk++) { in PCSetCoordinates_ML() 435 for (ii = 0; ii < ndm; ii++) pc_ml->coords[ii * nloc + kk] = coords[kk * ndm + ii]; in PCSetCoordinates_ML() 438 for (kk = 0; kk < nloc; kk++) { in PCSetCoordinates_ML() 439 for (ii = 0; ii < ndm; ii++) pc_ml->coords[ii * nloc + kk] = coords[bs * kk * ndm + ii]; in PCSetCoordinates_ML()
|
| /petsc/src/tao/bound/tutorials/ |
| H A D | jbearing2.c | 211 PetscInt i, j, k, kk; in FormFunctionGradient() local 298 for (kk = 0; kk < k; kk++) tt += v[kk] * x[col[kk]]; in FormFunctionGradient()
|
| /petsc/src/dm/impls/moab/ |
| H A D | dmmbutil.cxx | 201 PetscInt ii, jj, kk; in DMMoab_GenerateVertices_Private() local 228 for (kk = 0; kk < (genCtx.dim > 2 ? genCtx.blockSizeVertexXYZ[2] : 1); kk++) { in DMMoab_GenerateVertices_Private() 234 arrays[2][ix] = (z + kk) * genCtx.dz + genCtx.xyzbounds[4]; in DMMoab_GenerateVertices_Private() 241 gids[ix] = 1 + (x + ii) + (y + jj) * genCtx.NX + (z + kk) * (genCtx.NX * genCtx.NY); in DMMoab_GenerateVertices_Private() 256 PetscInt ii, jj, kk, nvperelem; in DMMoab_GenerateElements_Private() local 309 for (kk = 0; kk < (genCtx.dim > 2 ? genCtx.blockSizeElementXYZ[2] : 1); kk++) { in DMMoab_GenerateElements_Private() 312 … corner = startv + genCtx.q * ii + genCtx.q * jj * genCtx.ystride + genCtx.q * kk * genCtx.zstride; in DMMoab_GenerateElements_Private() 320 … gids[ie + j] = 1 + ((xe + ii) + (ye + jj) * genCtx.nex + (ze + kk) * (genCtx.nex * genCtx.ney)); in DMMoab_GenerateElements_Private()
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex56.c | 27 PetscInt m, nn, M, Istart, Iend, i, j, k, ii, jj, kk, ic, ne = 4, id; in main() local 180 for (k = Nk0, kk = 0; k < Nk1; k++, kk++, ic++) { in main() 186 id = id0 + ii + NN * jj + NN * NN * kk; in main()
|