| /petsc/src/ksp/ksp/impls/gmres/agmres/ |
| H A D | agmresleja.c | 6 …atic PetscErrorCode KSPAGMRESLejafmaxarray(PetscScalar *re, PetscInt pt, PetscInt n, PetscInt *pos) in KSPAGMRESLejafmaxarray() argument 13 *pos = 0; in KSPAGMRESLejafmaxarray() 17 *pos = i; in KSPAGMRESLejafmaxarray() 51 PetscInt i, pos, j; in KSPAGMRESLejaOrdering() local 70 PetscCall(KSPAGMRESLejafmaxarray(n_cmpl, 0, m, &pos)); in KSPAGMRESLejaOrdering() 72 if (im[pos] >= 0.0) { in KSPAGMRESLejaOrdering() 73 rre[0] = re[pos]; in KSPAGMRESLejaOrdering() 74 rim[0] = im[pos]; in KSPAGMRESLejaOrdering() 76 spos[0] = pos; in KSPAGMRESLejaOrdering() 79 if (im[pos] > 0) { in KSPAGMRESLejaOrdering() [all …]
|
| /petsc/src/dm/impls/stag/ |
| H A D | stagda.c | 209 DMStagStencil pos; in DMStagMigrateVecDMDA() local 210 pos.i = i; in DMStagMigrateVecDMDA() 211 pos.loc = loc; in DMStagMigrateVecDMDA() 212 pos.c = d; in DMStagMigrateVecDMDA() 213 PetscCall(DMStagVecGetValuesStencil(dm, vecLocal, 1, &pos, &arrTo[i][d])); in DMStagMigrateVecDMDA() 219 DMStagStencil pos; in DMStagMigrateVecDMDA() local 220 pos.i = i; in DMStagMigrateVecDMDA() 221 pos.loc = loc; in DMStagMigrateVecDMDA() 222 pos.c = c; in DMStagMigrateVecDMDA() 223 PetscCall(DMStagVecGetValuesStencil(dm, vecLocal, 1, &pos, &arrTo[i][0])); in DMStagMigrateVecDMDA() [all …]
|
| H A D | stagstencil.c | 385 PetscErrorCode DMStagStencilToIndexLocal(DM dm, PetscInt dim, PetscInt n, const DMStagStencil *pos,… in DMStagStencilToIndexLocal() argument 393 const PetscInt eLocal = pos[idx].i - stag->startGhost[0]; in DMStagStencilToIndexLocal() 395 ix[idx] = eLocal * epe + stag->locationOffsets[pos[idx].loc] + pos[idx].c; in DMStagStencilToIndexLocal() 401 const PetscInt eLocalx = pos[idx].i - stag->startGhost[0]; in DMStagStencilToIndexLocal() 402 const PetscInt eLocaly = pos[idx].j - stag->startGhost[1]; in DMStagStencilToIndexLocal() 405 ix[idx] = eLocal * epe + stag->locationOffsets[pos[idx].loc] + pos[idx].c; in DMStagStencilToIndexLocal() 412 const PetscInt eLocalx = pos[idx].i - stag->startGhost[0]; in DMStagStencilToIndexLocal() 413 const PetscInt eLocaly = pos[idx].j - stag->startGhost[1]; in DMStagStencilToIndexLocal() 414 const PetscInt eLocalz = pos[idx].k - stag->startGhost[2]; in DMStagStencilToIndexLocal() 417 ix[idx] = eLocal * epe + stag->locationOffsets[pos[idx].loc] + pos[idx].c; in DMStagStencilToIndexLocal() [all …]
|
| /petsc/src/dm/impls/stag/tutorials/ |
| H A D | ex6.c | 238 DMStagStencil pos; in CreateLame() local 240 pos.i = ex; in CreateLame() 241 pos.j = ey; in CreateLame() 242 pos.c = 0; in CreateLame() 243 pos.loc = DMSTAG_ELEMENT; in CreateLame() 244 …PetscCall(DMStagVecSetValuesStencil(ctx->dm_lame, ctx->lame, 1, &pos, &ctx->lambda, INSERT_VALUES)… in CreateLame() 245 pos.i = ex; in CreateLame() 246 pos.j = ey; in CreateLame() 247 pos.c = 1; in CreateLame() 248 pos.loc = DMSTAG_ELEMENT; in CreateLame() [all …]
|
| H A D | ex1.c | 186 DMStagStencil pos[3]; in main() local 191 pos[idxLoc].i = e; /* This element in the 1d ordering */ in main() 192 pos[idxLoc].loc = ELEMENT; /* Element-centered dofs (p) */ in main() 193 pos[idxLoc].c = 0; /* Component 0 : first (and only) p dof */ in main() 199 pos[idxLoc].i = e; /* This element in the 1d ordering */ in main() 200 pos[idxLoc].loc = LEFT; /* Left vertex */ in main() 201 pos[idxLoc].c = 0; in main() 209 pos[idxLoc].i = e; /* This element in the 1d ordering */ in main() 210 pos[idxLoc].loc = LEFT; /* vertex-centered dof (u) */ in main() 211 pos[idxLoc].c = 0; in main() [all …]
|
| /petsc/src/dm/impls/da/ |
| H A D | dageometry.c | 130 static PetscErrorCode private_DMDALocatePointsIS_2D_Regular(DM dmregular, Vec pos, IS *iscell) in private_DMDALocatePointsIS_2D_Regular() argument 155 PetscCall(VecGetLocalSize(pos, &n)); in private_DMDALocatePointsIS_2D_Regular() 156 PetscCall(VecGetBlockSize(pos, &bs)); in private_DMDALocatePointsIS_2D_Regular() 160 PetscCall(VecGetArrayRead(pos, &coor)); in private_DMDALocatePointsIS_2D_Regular() 187 PetscCall(VecRestoreArrayRead(pos, &coor)); in private_DMDALocatePointsIS_2D_Regular() 192 static PetscErrorCode private_DMDALocatePointsIS_3D_Regular(DM dmregular, Vec pos, IS *iscell) in private_DMDALocatePointsIS_3D_Regular() argument 222 PetscCall(VecGetLocalSize(pos, &n)); in private_DMDALocatePointsIS_3D_Regular() 223 PetscCall(VecGetBlockSize(pos, &bs)); in private_DMDALocatePointsIS_3D_Regular() 227 PetscCall(VecGetArrayRead(pos, &coor)); in private_DMDALocatePointsIS_3D_Regular() 261 PetscCall(VecRestoreArrayRead(pos, &coor)); in private_DMDALocatePointsIS_3D_Regular() [all …]
|
| /petsc/src/binding/petsc4py/conf/ |
| H A D | cyautodoc.py | 153 node.pos, 158 def _fmt_relative_position(self, pos): argument 160 (str(pos[0].get_filenametable_entry()), str(pos[1])) 163 def _embed_signature(self, signature, pos, node_doc): argument 164 pos = self._fmt_relative_position(pos) 167 return docfmt % (signature, node_doc, pos) 169 return docfmt % (signature, pos) 230 new_doc = self._embed_signature(signature, node.pos, old_doc) 256 new_doc = self._embed_signature(signature, node.pos, old_doc) 291 new_doc = self._embed_signature(signature, node.pos, entry.doc)
|
| /petsc/src/mat/graphops/coarsen/impls/misk/ |
| H A D | misk.c | 19 PetscCDIntNd *pos, *pos2; in PetscCoarsenDataView_private() local 23 PetscCall(PetscCDGetHeadPos(agg_lists, kk, &pos)); in PetscCoarsenDataView_private() 24 …if ((pos2 = pos)) PetscCall(PetscViewerASCIISynchronizedPrintf(viewer, "selected local %" PetscInt… in PetscCoarsenDataView_private() 25 while (pos) { in PetscCoarsenDataView_private() 27 PetscCall(PetscCDIntNdGetID(pos, &gid1)); in PetscCoarsenDataView_private() 28 PetscCall(PetscCDGetNextPos(agg_lists, kk, &pos)); in PetscCoarsenDataView_private() 257 PetscCDIntNd *pos, *pos2; in MatCoarsenApply_MISK_private() local 263 PetscCall(PetscCDGetHeadPos(agg_lists, lid, &pos)); in MatCoarsenApply_MISK_private() 264 pos2 = pos; in MatCoarsenApply_MISK_private() 265 while (pos) { in MatCoarsenApply_MISK_private() [all …]
|
| /petsc/config/BuildSystem/config/ |
| H A D | setsOrdered.py | 553 pos = self._data[element] 554 if isinstance(pos, tuple): 555 pos = tuple(list(pos)+[len(self._data)]) 557 pos = (pos, len(self._data)) 558 self._data[element] = pos 567 pos = self._data[e] 568 if isinstance(pos, tuple): 569 pos = tuple(list(pos)+[len(self._data)]) 571 pos = (pos, len(self._data))
|
| /petsc/src/dm/impls/plex/kokkos/ |
| H A D | plexlocalizationletkf.kokkos.cxx | 208 PetscInt pos = n_obs_vertex - 1; in DMPlexGetLETKFLocalizationMatrix() 209 while (pos > 0 && best_dists_dev(i, pos - 1) > dist2) { in DMPlexGetLETKFLocalizationMatrix() 210 best_dists_dev(i, pos) = best_dists_dev(i, pos - 1); in DMPlexGetLETKFLocalizationMatrix() 211 best_idxs_dev(i, pos) = best_idxs_dev(i, pos - 1); in DMPlexGetLETKFLocalizationMatrix() 212 pos--; in DMPlexGetLETKFLocalizationMatrix() 214 best_dists_dev(i, pos) = dist2; in DMPlexGetLETKFLocalizationMatrix() 215 best_idxs_dev(i, pos) = j; in DMPlexGetLETKFLocalizationMatrix()
|
| /petsc/src/dm/tutorials/ |
| H A D | swarm_ex3.c | 11 PetscErrorCode _DMLocatePoints_DMDARegular_IS(DM dm, Vec pos, IS *iscell) in _DMLocatePoints_DMDARegular_IS() argument 22 PetscCall(VecGetLocalSize(pos, &n)); in _DMLocatePoints_DMDARegular_IS() 23 PetscCall(VecGetBlockSize(pos, &bs)); in _DMLocatePoints_DMDARegular_IS() 34 PetscCall(VecGetArrayRead(pos, &coor)); in _DMLocatePoints_DMDARegular_IS() 55 PetscCall(VecRestoreArrayRead(pos, &coor)); in _DMLocatePoints_DMDARegular_IS() 60 PetscErrorCode DMLocatePoints_DMDARegular(DM dm, Vec pos, DMPointLocationType ltype, PetscSF cellSF) in DMLocatePoints_DMDARegular() argument 68 PetscCall(_DMLocatePoints_DMDARegular_IS(dm, pos, &iscell)); in DMLocatePoints_DMDARegular() 69 PetscCall(VecGetLocalSize(pos, &npoints)); in DMLocatePoints_DMDARegular() 70 PetscCall(VecGetBlockSize(pos, &bs)); in DMLocatePoints_DMDARegular()
|
| H A D | ex21.c | 120 PetscReal pos[2]; in pic_advect() local 121 pos[0] = s_coor[2 * p + 0]; in pic_advect() 122 pos[1] = s_coor[2 * p + 1]; in pic_advect() 125 …s_phi[p] = 1.0 + PetscExpReal(-200.0 * ((pos[0] - 0.5) * (pos[0] - 0.5) + (pos[1] - 0.5) * (pos… in pic_advect()
|
| /petsc/include/petsc/private/ |
| H A D | hashmap.h | 306 PetscInt pos; \ 310 pos = *off; \ 311 kh_foreach_key(ht, key, array[pos++] = key); \ 312 *off = pos; \ 319 PetscInt pos; \ 323 pos = *off; \ 324 kh_foreach_value(ht, val, array[pos++] = val); \ 325 *off = pos; \ 333 PetscInt pos; \ 337 pos = *off; \ [all …]
|
| H A D | hashset.h | 197 PetscInt pos; \ 201 pos = *off; \ 202 kh_foreach_key(ht, key, array[pos++] = key); \ 203 *off = pos; \
|
| /petsc/src/mat/graphops/coarsen/impls/hem/ |
| H A D | hem.c | 118 PetscErrorCode PetscCDGetHeadPos(const PetscCoarsenData *ail, PetscInt a_idx, PetscCDIntNd **pos) in PetscCDGetHeadPos() argument 122 *pos = ail->array[a_idx]; in PetscCDGetHeadPos() 128 PetscErrorCode PetscCDGetNextPos(const PetscCoarsenData *ail, PetscInt l_idx, PetscCDIntNd **pos) in PetscCDGetNextPos() argument 131 PetscCheck(*pos, PETSC_COMM_SELF, PETSC_ERR_PLIB, "NULL input position."); in PetscCDGetNextPos() 132 *pos = (*pos)->next; in PetscCDGetNextPos() 821 PetscCDIntNd *pos; in MatCoarsenApply_HEM_private() local 844 PetscCall(PetscCDGetHeadPos(ghost_deleted_list, proc, &pos)); in MatCoarsenApply_HEM_private() 845 while (pos) { in MatCoarsenApply_HEM_private() 848 PetscCall(PetscCDIntNdGetID(pos, &ghost_idx)); in MatCoarsenApply_HEM_private() 850 PetscCall(PetscCDGetNextPos(ghost_deleted_list, proc, &pos)); in MatCoarsenApply_HEM_private() [all …]
|
| /petsc/src/dm/dt/tests/ |
| H A D | ex14.c | 9 static PetscErrorCode VerifyDistribution(const char name[], PetscBool pos, PetscProbFn *pdf, PetscP… in VerifyDistribution() argument 12 PetscReal lower = pos ? 0. : -10., upper = 10.; in VerifyDistribution() 33 PetscBool pos[] = {PETSC_TRUE, PETSC_TRUE, PETSC_TRUE, PETSC_FALSE}; in TestDistributions() local 37 …PETSC_STATIC_ARRAY_LENGTH(pdf); ++i) PetscCall(VerifyDistribution(name[i], pos[i], pdf[i], cdf[i])… in TestDistributions()
|
| /petsc/src/dm/impls/stag/tests/ |
| H A D | ex15.c | 94 DMStagStencil pos[3]; in CreateSystem1d() local 101 pos[idxLoc].i = e; in CreateSystem1d() 102 pos[idxLoc].loc = DMSTAG_ELEMENT; in CreateSystem1d() 103 pos[idxLoc].c = 0; in CreateSystem1d() 108 pos[idxLoc].i = e; in CreateSystem1d() 109 pos[idxLoc].loc = DMSTAG_ELEMENT; in CreateSystem1d() 110 pos[idxLoc].c = 0; in CreateSystem1d() 116 pos[idxLoc].i = e; in CreateSystem1d() 117 pos[idxLoc].loc = DMSTAG_LEFT; in CreateSystem1d() 118 pos[idxLoc].c = 0; in CreateSystem1d() [all …]
|
| /petsc/src/ksp/pc/impls/gamg/ |
| H A D | agg.c | 516 PetscCDIntNd *pos; in formProl0() local 576 PetscCall(PetscCDGetHeadPos(agg_llists, lid, &pos)); in formProl0() 577 while (pos) { in formProl0() 580 PetscCall(PetscCDIntNdGetID(pos, &gid1)); in formProl0() 581 PetscCall(PetscCDGetNextPos(agg_llists, lid, &pos)); in formProl0() 889 PetscCDIntNd *pos; in fixAggregatesWithSquare() local 891 PetscCall(PetscCDGetHeadPos(aggs_2, lid, &pos)); in fixAggregatesWithSquare() 892 if (pos) { in fixAggregatesWithSquare() 895 PetscCall(PetscCDIntNdGetID(pos, &gid1)); in fixAggregatesWithSquare() 906 PetscCDIntNd *pos; in fixAggregatesWithSquare() local [all …]
|
| /petsc/share/petsc/saws/js/ |
| H A D | tree.js | 129 function getNthPos(endtag,pos) argument 131 if(pos == 0) 133 if(pos > getNumUnderscores(endtag)) 136 for(var i=0; i<pos; i++) { //remove 'pos' number of underscores
|
| /petsc/src/sys/tutorials/ |
| H A D | ex5.c | 36 TwoVec pos; member 92 PetscCall(PetscBagRegisterReal(bag, ¶ms->pos.x1, 1.0, "x1", "x position")); in main() 93 PetscCall(PetscBagRegisterReal(bag, ¶ms->pos.x2, 1.9, "x2", "y position")); in main()
|
| H A D | ex5f90.F90 | 24 type(tuple) :: pos component 79 …PetscCallA(PetscBagRegisterReal(bag, data%pos%x1, value, 'pos_x1', 'tuple value 1 help message', i… 81 …PetscCallA(PetscBagRegisterReal(bag, data%pos%x2, value, 'pos_x2', 'tuple value 2 help message', i…
|
| /petsc/src/dm/impls/swarm/ |
| H A D | swarmpic.c | 354 Vec pos; in DMSwarmSetPointsUniformCoordinates() local 404 PetscCall(VecCreate(PETSC_COMM_SELF, &pos)); in DMSwarmSetPointsUniformCoordinates() 405 PetscCall(VecSetSizes(pos, bs * n_estimate, PETSC_DECIDE)); in DMSwarmSetPointsUniformCoordinates() 406 PetscCall(VecSetBlockSize(pos, bs)); in DMSwarmSetPointsUniformCoordinates() 407 PetscCall(VecSetFromOptions(pos)); in DMSwarmSetPointsUniformCoordinates() 408 PetscCall(VecGetArray(pos, &_pos)); in DMSwarmSetPointsUniformCoordinates() 433 PetscCall(VecRestoreArray(pos, &_pos)); in DMSwarmSetPointsUniformCoordinates() 436 PetscCall(DMLocatePoints(dm, pos, DM_POINTLOCATION_NONE, &sfcell)); in DMSwarmSetPointsUniformCoordinates() 457 PetscCall(VecGetArrayRead(pos, &_coor)); in DMSwarmSetPointsUniformCoordinates() 470 PetscCall(VecRestoreArrayRead(pos, &_coor)); in DMSwarmSetPointsUniformCoordinates() [all …]
|
| /petsc/src/mat/impls/dense/mpi/ |
| H A D | mmdense.c | 27 PetscInt nmax, nstages, i, pos, max_no; in MatCreateSubMatrices_MPIDense() local 40 for (i = 0, pos = 0; i < nstages; i++) { in MatCreateSubMatrices_MPIDense() 41 if (pos + nmax <= ismax) max_no = nmax; in MatCreateSubMatrices_MPIDense() 42 else if (pos == ismax) max_no = 0; in MatCreateSubMatrices_MPIDense() 43 else max_no = ismax - pos; in MatCreateSubMatrices_MPIDense() 44 …ll(MatCreateSubMatrices_MPIDense_Local(C, max_no, isrow + pos, iscol + pos, scall, *submat + pos)); in MatCreateSubMatrices_MPIDense() 45 pos += max_no; in MatCreateSubMatrices_MPIDense()
|
| /petsc/src/mat/graphops/coarsen/impls/mis/ |
| H A D | mis.c | 292 PetscCDIntNd *pos, *pos2; in MatCoarsenView_MIS() local 294 PetscCall(PetscCDGetHeadPos(coarse->agg_lists, kk, &pos)); in MatCoarsenView_MIS() 295 …if ((pos2 = pos)) PetscCall(PetscViewerASCIISynchronizedPrintf(viewer, "selected %" PetscInt_FMT "… in MatCoarsenView_MIS() 296 while (pos) { in MatCoarsenView_MIS() 298 PetscCall(PetscCDIntNdGetID(pos, &gid1)); in MatCoarsenView_MIS() 299 PetscCall(PetscCDGetNextPos(coarse->agg_lists, kk, &pos)); in MatCoarsenView_MIS()
|
| /petsc/src/mat/impls/sbaij/mpi/ |
| H A D | sbaijov.c | 19 PetscInt *ai, brow, nz, nis, l, nmax, nstages, max_no, pos; in MatIncreaseOverlap_MPISBAIJ() local 70 for (i = 0, pos = 0; i < nstages; i++) { in MatIncreaseOverlap_MPISBAIJ() 71 if (pos + nmax <= is_max) max_no = nmax; in MatIncreaseOverlap_MPISBAIJ() 72 else if (pos == is_max) max_no = 0; in MatIncreaseOverlap_MPISBAIJ() 73 else max_no = is_max - pos; in MatIncreaseOverlap_MPISBAIJ() 76 …eateSubMatrices_MPIBAIJ_local(C, max_no, is_row + pos, is_new + pos, MAT_INITIAL_MATRIX, submats +… in MatIncreaseOverlap_MPISBAIJ() 77 pos += max_no; in MatIncreaseOverlap_MPISBAIJ()
|