Home
last modified time | relevance | path

Searched refs:lidx (Results 1 – 14 of 14) sorted by relevance

/petsc/src/dm/impls/da/
H A Ddaindex.c14 PetscInt Nlocal, i, j, k, *lidx, lict = 0, dim = da->dim; in DMDAGetNatural_Private() local
22 PetscCall(PetscMalloc1(Nlocal, &lidx)); in DMDAGetNatural_Private()
27 lidx[lict++] = i; in DMDAGetNatural_Private()
33 lidx[lict++] = i + j * dd->M * dd->w; in DMDAGetNatural_Private()
39 …for (i = dd->xs; i < dd->xe; i++) lidx[lict++] = i + j * dd->M * dd->w + k * dd->M * dd->N * dd->w; in DMDAGetNatural_Private()
44 …PetscCall(ISCreateGeneral(PetscObjectComm((PetscObject)da), Nlocal, lidx, PETSC_OWN_POINTER, isnat… in DMDAGetNatural_Private()
/petsc/src/mat/graphops/order/
H A Dsorder.c177 const PetscInt *lidx; in MatGetOrdering() local
183 PetscCall(ISGetIndices(lrowperm, &lidx)); in MatGetOrdering()
185 for (i = 0; i + rstart < rend; i++) idx[i] = rstart + lidx[i]; in MatGetOrdering()
186 PetscCall(ISRestoreIndices(lrowperm, &lidx)); in MatGetOrdering()
191 PetscCall(ISGetIndices(lcolperm, &lidx)); in MatGetOrdering()
193 for (i = 0; i + rstart < rend; i++) idx[i] = rstart + lidx[i]; in MatGetOrdering()
194 PetscCall(ISRestoreIndices(lcolperm, &lidx)); in MatGetOrdering()
/petsc/src/binding/petsc4py/demo/legacy/ode/
H A Dheat.py82 lidx = i + 1
84 [lidx], [lidx - 1, lidx, lidx + 1], [-1 / h, a * h + 2 / h, -1 / h]
/petsc/src/vec/is/utils/
H A Dpmap.c652 …orCode PetscLayoutFindOwnerIndex(PetscLayout map, PetscInt idx, PetscMPIInt *owner, PetscInt *lidx) in PetscLayoutFindOwnerIndex() argument
666 if (lidx) *lidx = idx - map->range[lo]; in PetscLayoutFindOwnerIndex()
/petsc/src/ksp/pc/impls/gamg/
H A Dclassical.c84 PetscInt s, f, n, idx, lidx, gidx; in PCGAMGCreateGraph_Classical() local
117 lidx = 0; in PCGAMGCreateGraph_Classical()
123 lidx++; in PCGAMGCreateGraph_Classical()
130 lsparse[r - s] = lidx; in PCGAMGCreateGraph_Classical()
564 const PetscInt *lidx, *icol, *gidx; in PCGAMGProlongator_Classical_Standard() local
591 PetscCall(ISGetIndices(lis, &lidx)); in PCGAMGProlongator_Classical_Standard()
592 PetscCall(PetscSFSetGraphLayout(sf, clayout, nl, NULL, PETSC_COPY_VALUES, lidx)); in PCGAMGProlongator_Classical_Standard()
593 PetscCall(ISRestoreIndices(lis, &lidx)); in PCGAMGProlongator_Classical_Standard()
H A Dgamg.c543 …PetscInt fine_level, level, level1, bs, M, N, qq, lidx, nASMBlocksArr[PETSC_MG_MAXLEVELS], cr_b… in PCSetUp_GAMG() local
843 for (lidx = 1, level = pc_gamg->Nlevels - 2; lidx <= fine_level; lidx++, level--) { in PCSetUp_GAMG()
847 PetscCall(PCMGGetSmoother(pc, lidx, &smoother)); in PCSetUp_GAMG()
853 PetscCall(PCMGSetInterpolation(pc, lidx, Parr[level + 1])); in PCSetUp_GAMG()
891 lidx = 0; in PCSetUp_GAMG()
893 PetscCall(PCMGGetSmoother(pc, lidx, &smoother)); in PCSetUp_GAMG()
918 for (lidx = 1, level = pc_gamg->Nlevels - 2; level >= 0; lidx++, level--) { in PCSetUp_GAMG()
922 PetscCall(PCMGGetSmoother(pc, lidx, &smoother)); in PCSetUp_GAMG()
/petsc/src/snes/tutorials/network/power/
H A DPFReadData.c97 Bus[busi].lidx[Bus[busi].nload++] = loadi; in PFReadMatPowerData()
195 …nload; j++) PetscCall(PetscMemcpy(&newload[loadj++], &pf->load[pf->bus[i].lidx[j]], sizeof(struct … in PFReadMatPowerData()
H A Dpower.h44 PetscInt lidx[NLOAD_AT_BUS_MAX]; member
/petsc/src/dm/impls/plex/cgns/
H A Dplexcgns2.c919 …dex_Internal(PetscLayout map, PetscInt idx, PetscMPIInt *owner, PetscInt *lidx, PetscBool *found_o… in PetscLayoutFindOwnerIndex_Internal() argument
926 if (lidx) *lidx = -1; in PetscLayoutFindOwnerIndex_Internal()
938 if (lidx) *lidx = idx - map->range[lo]; in PetscLayoutFindOwnerIndex_Internal()
946 …cLayout maps[], PetscInt nmaps, PetscInt idx, PetscMPIInt *owner, PetscInt *lidx, PetscInt *mapidx) in PetscLayoutFindOwnerIndex_CGNSSectionLayouts() argument
951 PetscCall(PetscLayoutFindOwnerIndex_Internal(maps[m], idx, owner, lidx, &found_owner)); in PetscLayoutFindOwnerIndex_CGNSSectionLayouts()
956 *lidx += size; in PetscLayoutFindOwnerIndex_CGNSSectionLayouts()
/petsc/src/mat/impls/aij/mpi/
H A Dmpiptap.c994 PetscInt lidx, *rdj, col, pcstart, pcend, *dnz, *onz, am, arstart, arend, *poj, *pdj; in MatPtAPSymbolic_MPIAIJ_MPIXAIJ_allatonce() local
1074 lidx = 0; in MatPtAPSymbolic_MPIAIJ_MPIXAIJ_allatonce()
1077 PetscCall(PetscLayoutFindOwnerIndex(P->cmap, p->garray[ii], &owner, &lidx)); in MatPtAPSymbolic_MPIAIJ_MPIXAIJ_allatonce()
1078 iremote[i].index = lidx * dof + offset; in MatPtAPSymbolic_MPIAIJ_MPIXAIJ_allatonce()
1260 PetscInt lidx, *rdj, col, pcstart, pcend, *dnz, *onz, am, arstart, arend, *poj, *pdj; in MatPtAPSymbolic_MPIAIJ_MPIXAIJ_allatonce_merged() local
1366 lidx = 0; in MatPtAPSymbolic_MPIAIJ_MPIXAIJ_allatonce_merged()
1369 PetscCall(PetscLayoutFindOwnerIndex(P->cmap, p->garray[ii], &owner, &lidx)); in MatPtAPSymbolic_MPIAIJ_MPIXAIJ_allatonce_merged()
1370 iremote[i].index = lidx * dof + offset; in MatPtAPSymbolic_MPIAIJ_MPIXAIJ_allatonce_merged()
H A Dmpiaij.c5424 PetscInt plocalsize, nrows, *ilocal, *oilocal, i, lidx, *nrcols, *nlcols, ncol; in MatCreateSeqSubMatrixWithRows_Private() local
5449 lidx = 0; in MatCreateSeqSubMatrixWithRows_Private()
5450 PetscCall(PetscLayoutFindOwnerIndex(P->rmap, lrowindices[i], &owner, &lidx)); in MatCreateSeqSubMatrixWithRows_Private()
5451 iremote[i].index = lidx; in MatCreateSeqSubMatrixWithRows_Private()
/petsc/src/vec/is/is/interface/
H A Dindex.c236 PetscInt *subis_indices, nroots, nleaves, *mine, i, lidx; in ISCreateSubIS() local
262 lidx = -1; in ISCreateSubIS()
263 PetscCall(PetscLayoutFindOwnerIndex(is->map, comps_indices[i], &owner, &lidx)); in ISCreateSubIS()
265 remote[i].index = lidx; in ISCreateSubIS()
/petsc/src/ksp/pc/impls/patch/
H A Dpcpatch.c2346 PetscInt dof, offset, lidx; in PCPatch_ScatterLocal_Private() local
2366 for (lidx = 0; lidx < dof; ++lidx) { in PCPatch_ScatterLocal_Private()
2367 const PetscInt gidx = gtolArray[offset + lidx]; in PCPatch_ScatterLocal_Private()
2369 if (mode == INSERT_VALUES) yArray[lidx] = xArray[gidx]; /* Forward */ in PCPatch_ScatterLocal_Private()
2370 else yArray[gidx] += xArray[lidx]; /* Reverse */ in PCPatch_ScatterLocal_Private()
/petsc/src/dm/impls/network/
H A Dnetwork.c2883 PetscInt *vltog, nroots, nleaves, *vrange, k, N, lidx, ii; in DMNetworkSetVertexLocalToGlobalOrdering() local
2960 lidx = (PetscInt)PetscRealPart(varr_read[i + 1]); in DMNetworkSetVertexLocalToGlobalOrdering()
2961 val = (PetscScalar)vltog[lidx]; /* global index for non-ghost vertex computed above */ in DMNetworkSetVertexLocalToGlobalOrdering()