| /petsc/src/vec/is/sf/tests/ |
| H A D | ex5.c | 85 PetscInt i, m, n, k, nl = 2, mA, mB, nldataA, nldataB; in main() local 91 PetscCall(PetscOptionsGetInt(NULL, NULL, "-nl", &nl, NULL)); in main() 112 n = 4 * nl * size; in main() 113 m = 2 * nl; in main() 114 k = nl; in main() 117 nldataB = 3 * nl; in main() 134 ilocalA[i] = nl + i / m * 4 * nl + i % m; in main() 142 iremoteB[i].index = rank * 4 * nl + nl + i % m; in main() 143 ilocalB[i] = 2 * nl - i - 1; in main()
|
| /petsc/src/vec/is/tests/ |
| H A D | ex7.c | 12 PetscInt nl, mnl, mnr, i, j, k, n, np, bs = 1, test = 0; in main() local 135 PetscCall(ISLocalToGlobalMappingGetSize(ltog, &nl)); in main() 136 nl /= bs; in main() 138 …Check(mnr == nl, PETSC_COMM_SELF, PETSC_ERR_PLIB, "Invalid number of roots in multi-leaves SF %" P… in main() 140 PetscCall(PetscMalloc2(2 * nl, &leaves, 2 * mnl, &mleaves)); in main() 141 for (i = 0; i < nl; i++) { in main() 147 …for (i = 0; i < nl; i++) PetscCall(PetscViewerASCIISynchronizedPrintf(viewer, "[%d] input[%" Pet… in main()
|
| /petsc/src/mat/tutorials/ |
| H A D | ex20f.F90 | 18 PetscInt :: ml, nl 21 PetscCall(MatGetLocalSize(F, ml, nl, ierr)) 25 …PetscCall(MatCreateShell(PETSC_COMM_WORLD, ml, nl, PETSC_DETERMINE, PETSC_DETERMINE, ctxM, M, ierr…
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexdd.c | 52 PetscInt n, mh, ddovl = 0, pStart, pEnd, ni, no, nl; in DMCreateDomainDecomposition_Plex() local 150 PetscCall(PetscSectionGetStorageSize(sec, &nl)); in DMCreateDomainDecomposition_Plex() 155 PetscCall(PetscMalloc1(nl, &lidxs)); in DMCreateDomainDecomposition_Plex() 156 for (PetscInt i = 0; i < nl; i++) lidxs[i] = -1; in DMCreateDomainDecomposition_Plex() 161 PetscCall(ISCreateGeneral(PetscObjectComm((PetscObject)dm), nl, lidxs, PETSC_OWN_POINTER, &lis)); in DMCreateDomainDecomposition_Plex() 199 PetscCall(PetscSectionGetStorageSize(olsec, &nl)); /* local dofs in the overlap */ in DMCreateDomainDecomposition_Plex() 221 PetscCall(PetscMalloc1(nl, &lidxs)); in DMCreateDomainDecomposition_Plex() 222 PetscCall(PetscMalloc1(nl, &gidxs)); in DMCreateDomainDecomposition_Plex() 225 for (PetscInt i = 0; i < nl; i++) { in DMCreateDomainDecomposition_Plex()
|
| /petsc/src/sys/objects/ |
| H A D | olist.c | 248 PetscErrorCode PetscObjectListDuplicate(PetscObjectList fl, PetscObjectList *nl) in PetscObjectListDuplicate() argument 251 PetscAssertPointer(nl, 2); in PetscObjectListDuplicate() 253 PetscCall(PetscObjectListAdd(nl, fl->name, fl->obj)); in PetscObjectListDuplicate()
|
| /petsc/src/vec/is/is/tests/ |
| H A D | ex9.c | 64 PetscInt nl; in main() local 66 PetscCall(PetscSFGetGraphLayout(sf, <, &nl, NULL, &ind)); in main() 69 for (i = 0; i < nl; i++) in main()
|
| /petsc/src/dm/impls/da/ |
| H A D | grglvis.c | 201 PetscInt ien, jen, ken, nc, nl, cdof, deg; in DMSetUpGLVisViewer_DMDA() local 209 PetscCall(VecGetLocalSize(xcoor, &nl)); in DMSetUpGLVisViewer_DMDA() 210 …c || (nl % nc) == 0, PETSC_COMM_SELF, PETSC_ERR_SUP, "Incompatible local coordinate size %" PetscI… in DMSetUpGLVisViewer_DMDA() 218 if (nc && nl) { in DMSetUpGLVisViewer_DMDA() 219 cdof = nl / (nc * dim); in DMSetUpGLVisViewer_DMDA() 453 PetscInt nc, nl; in DMDAView_GLVis_ASCII() local 463 PetscCall(VecGetLocalSize(xcoorl, &nl)); in DMDAView_GLVis_ASCII() 465 cdof = nc ? nl / nc : 0; in DMDAView_GLVis_ASCII()
|
| /petsc/src/vec/is/sf/interface/ftn-custom/ |
| H A D | zsf.c | 35 PetscInt nl, one = 1; in petscsfgetgraph_() local 39 nl = *nleaves; in petscsfgetgraph_() 40 if (!ilocal) nl = 0; in petscsfgetgraph_() 41 *ierr = F90Array1dCreate((void *)ilocal, MPIU_INT, 1, nl, ailocal PETSC_F90_2PTR_PARAM(pilocal)); in petscsfgetgraph_()
|
| /petsc/src/vec/vec/impls/seq/cupm/ |
| H A D | vecseqcupm_impl.hpp | 1851 const auto nl = U->map->n; in ErrorWnorm() local 1882 thrust::make_tuple(uptr + nl, yptr + nl, eptr + nl, ait, rit), in ErrorWnorm() 1892 thrust::make_tuple(uptr + nl, yptr + nl, ait, rit), in ErrorWnorm() 1904 thrust::make_tuple(uptr + nl, yptr + nl, eptr + nl, ait, rptr + nl), in ErrorWnorm() 1914 thrust::make_tuple(uptr + nl, yptr + nl, ait, rptr + nl), in ErrorWnorm() 1926 thrust::make_tuple(uptr + nl, yptr + nl, eptr + nl, aptr + nl, rit), in ErrorWnorm() 1936 thrust::make_tuple(uptr + nl, yptr + nl, aptr + nl, rit), in ErrorWnorm() 1948 thrust::make_tuple(uptr + nl, yptr + nl, eptr + nl, aptr + nl, rptr + nl), in ErrorWnorm() 1958 thrust::make_tuple(uptr + nl, yptr + nl, aptr + nl, rptr + nl), in ErrorWnorm()
|
| /petsc/src/dm/tests/ |
| H A D | ex50.c | 29 PetscInt nl, i; in test_3d() local 135 PetscCall(VecGetLocalSize(v, &nl)); in test_3d() 137 for (i = 0; i < nl / 3; i++) PetscCall(MapPoint(c + 3 * i, c + 3 * i)); in test_3d()
|
| H A D | ex36.c | 570 PetscInt mx = 2, my = 2, mz = 2, l, nl, dim; in main() local 577 nl = 1; in main() 578 PetscCall(PetscOptionsGetInt(NULL, NULL, "-nl", &nl, 0)); in main() 582 for (l = 0; l < nl; l++) { in main()
|
| /petsc/src/vec/is/sf/utils/ |
| H A D | sfutils.c | 88 PetscInt nr, nl; in PetscSFGetGraphLayout() local 98 PetscCall(PetscSFGetGraph(sf, &nr, &nl, ilocal, &ir)); in PetscSFGetGraphLayout() 106 PetscCall(PetscMalloc1(nl, &gr)); in PetscSFGetGraphLayout() 107 for (i = 0; i < nl; i++) gr[i] = range[ir[i].rank] + ir[i].index; in PetscSFGetGraphLayout() 110 if (nleaves) *nleaves = nl; in PetscSFGetGraphLayout() 934 PetscInt nranks, nr, nl, vnr, vnl, maxl; in PetscSFCreateStridedSF() local 951 PetscCall(PetscSFGetGraph(sf, &nr, &nl, &ilocal, &iremote)); in PetscSFCreateStridedSF() 961 vnl = nl * bs; in PetscSFCreateStridedSF() 972 for (PetscInt i = 0, rold = -1, lda = -1; i < nl; i++) { in PetscSFCreateStridedSF() 987 viremote[v * nl + i].rank = r; in PetscSFCreateStridedSF() [all …]
|
| /petsc/src/sys/dll/ |
| H A D | reg.c | 586 PetscErrorCode PetscFunctionListDuplicate(PetscFunctionList fl, PetscFunctionList *nl) in PetscFunctionListDuplicate() argument 592 if (!*nl) { in PetscFunctionListDuplicate() 596 PetscCall(PetscFunctionListCreate_Private(n, nl)); in PetscFunctionListDuplicate() 598 dup_map = (*nl)->map; in PetscFunctionListDuplicate()
|
| /petsc/src/mat/tests/ |
| H A D | ex23.c | 740 PetscInt *idxs2, diff, perm, nl, bs, st, en, in; in main() local 754 nl = en - st; in main() 759 nl = n / size; in main() 760 if (rank < n % size) nl++; in main() 766 nl = en - st; in main() 769 PetscCall(ISCreateStride(PETSC_COMM_WORLD, nl, st, in, &is)); in main() 770 PetscCall(ISGetLocalSize(is, &nl)); in main() 772 PetscCall(PetscMalloc1(nl, &idxs2)); in main() 773 for (i = 0; i < nl; i++) { in main() 776 idxs2[i] = rank % 2 ? idxs[i] : idxs[nl - i - 1]; in main() [all …]
|
| /petsc/src/ksp/ksp/impls/fetidp/ |
| H A D | fetidp.c | 591 PetscInt nl, ni, *widxs; in KSPFETIDPSetUpOperators() local 596 PetscCall(MatGetLocalSize(A, &nl, NULL)); in KSPFETIDPSetUpOperators() 617 PetscCall(PetscArrayzero(matis->sf_rootdata, nl)); in KSPFETIDPSetUpOperators() 624 PetscCall(PetscMalloc1(PetscMax(nl, n), &widxs)); in KSPFETIDPSetUpOperators() 625 for (i = 0, ni = 0; i < nl; i++) in KSPFETIDPSetUpOperators() 698 PetscCall(PetscArrayzero(matis->sf_rootdata, nl)); in KSPFETIDPSetUpOperators() 712 PetscCall(PetscArrayzero(matis->sf_rootdata, nl)); in KSPFETIDPSetUpOperators() 719 for (i = 0, ni = 0; i < nl; i++) in KSPFETIDPSetUpOperators() 743 PetscCall(PetscArrayzero(matis->sf_rootdata, nl)); in KSPFETIDPSetUpOperators() 776 for (i = 0, ni = 0; i < nl; i++) in KSPFETIDPSetUpOperators() [all …]
|
| /petsc/src/ksp/pc/impls/gamg/ |
| H A D | classical.c | 562 PetscInt fs, fe, cs, ce, nl, i, j, k, li, lni, ci, ncols, maxcols, fn, cn, cid; in PCGAMGProlongator_Classical_Standard() local 589 PetscCall(ISGetLocalSize(lis, &nl)); in PCGAMGProlongator_Classical_Standard() 592 PetscCall(PetscSFSetGraphLayout(sf, clayout, nl, NULL, PETSC_COPY_VALUES, lidx)); in PCGAMGProlongator_Classical_Standard() 596 nl = fn; in PCGAMGProlongator_Classical_Standard() 599 PetscCall(PetscMalloc3(fn, &lsparse, fn, &gsparse, nl, &pcontrib)); in PCGAMGProlongator_Classical_Standard() 620 PetscCall(PetscMalloc1(nl, &lcid)); in PCGAMGProlongator_Classical_Standard() 630 for (i = 0; i < nl; i++) { in PCGAMGProlongator_Classical_Standard() 695 for (i = 0; i < nl; i++) { in PCGAMGProlongator_Classical_Standard()
|
| /petsc/src/dm/impls/plex/transform/impls/extrude/ |
| H A D | plextrextrude.c | 41 PetscInt nl, Nc; in DMPlexTransformSetFromOptions_Extrude() local 47 …"-dm_plex_transform_extrude_layers", "Number of layers to extrude", "", ex->layers, &nl, &flg, 1)); in DMPlexTransformSetFromOptions_Extrude() 48 if (flg) PetscCall(DMPlexTransformExtrudeSetLayers(tr, nl)); in DMPlexTransformSetFromOptions_Extrude() 71 nl = ex->layers; in DMPlexTransformSetFromOptions_Extrude() 72 PetscCall(PetscMalloc1(nl, &thicknesses)); in DMPlexTransformSetFromOptions_Extrude() 73 …_extrude_thicknesses", "Thickness of each individual extruded layer", "", thicknesses, &nl, &flg)); in DMPlexTransformSetFromOptions_Extrude() 75 …PetscCheck(nl, PetscObjectComm((PetscObject)tr), PETSC_ERR_ARG_OUTOFRANGE, "Must give at least one… in DMPlexTransformSetFromOptions_Extrude() 76 PetscCall(DMPlexTransformExtrudeSetThicknesses(tr, nl, thicknesses)); in DMPlexTransformSetFromOptions_Extrude()
|
| /petsc/src/dm/impls/moab/ |
| H A D | dmmbutil.cxx | 516 PetscInt ml = 0, nl = 0, kl = 0; in DMMoabCreateBoxMesh() local 591 ml = nl = kl = 0; in DMMoabCreateBoxMesh() 597 nl = (genCtx.cumfraction); in DMMoabCreateBoxMesh() 642 …PetscCall(DMMoab_GenerateVertices_Private(mbImpl, readMeshIface, genCtx, ml, nl, kl, a, b, c, glob… in DMMoabCreateBoxMesh() 646 …PetscCall(DMMoab_GenerateElements_Private(mbImpl, readMeshIface, genCtx, ml, nl, kl, a, b, c, glob… in DMMoabCreateBoxMesh() 654 part_num += (b + nl * genCtx.B) * (genCtx.M * genCtx.A); in DMMoabCreateBoxMesh()
|
| /petsc/src/binding/petsc4py/conf/ |
| H A D | confpetsc.py | 94 ruler, ws, nl = '*' * 80, ' ', '\n' 101 printer(ruler, nl) 102 printer(ws, message, nl) 103 printer(ws, ws, advise, nl)
|
| /petsc/src/ksp/pc/impls/bddc/ |
| H A D | bddcprivate.c | 1350 PetscInt nl; in PCBDDCNedelecSupport() local 1352 PetscCall(ISGetLocalSize(eedges[i], &nl)); in PCBDDCNedelecSupport() 1354 PetscCall(VecSetValuesLocal(w, nl, idxs, NULL, INSERT_VALUES)); in PCBDDCNedelecSupport() 2045 PetscInt d, cdim, nl, nf, **ctxs; in PCBDDCComputeLocalTopologyInfo() local 2057 PetscCall(VecGetLocalSize(vcoords, &nl)); in PCBDDCComputeLocalTopologyInfo() 2058 PetscCall(PetscMalloc1(nl * cdim, &coords)); in PCBDDCComputeLocalTopologyInfo() 2079 for (i = 0; i < nl; i++) coords[i * cdim + d] = PetscRealPart(v[i]); in PCBDDCComputeLocalTopologyInfo() 2083 PetscCall(PCSetCoordinates(pc, cdim, nl, coords)); in PCBDDCComputeLocalTopologyInfo() 2183 PetscInt nl, i; in PCBDDCBenignMatMult_Private_Private() local 2185 PetscCall(VecGetLocalSize(x, &nl)); in PCBDDCBenignMatMult_Private_Private() [all …]
|
| H A D | bddcfetidp.c | 583 PetscInt nl, N; in PCBDDCSetupFETIDPMatContext() local 586 PetscCall(PetscLayoutGetLocalSize(llay, &nl)); in PCBDDCSetupFETIDPMatContext() 589 PetscCall(MatSetSizes(T, nl, nl, N, N)); in PCBDDCSetupFETIDPMatContext()
|
| /petsc/src/vec/is/sf/interface/ |
| H A D | sf.c | 2490 PetscInt nl; in PetscSFConcatenate() local 2492 PetscCall(PetscSFGetGraph(sfs[s], NULL, &nl, NULL, NULL)); in PetscSFConcatenate() 2493 leafArrayOffsets[s + 1] = leafArrayOffsets[s] + nl; in PetscSFConcatenate() 2585 PetscInt i, nl, nr; in PetscSFConcatenate() local 2591 PetscCall(PetscSFGetGraph(sfs[s], &nr, &nl, NULL, &iremote)); in PetscSFConcatenate() 2594 …PetscCall(PetscSFSetGraph(tmp_sf, nr, nl, NULL, PETSC_USE_POINTER, (PetscSFNode *)iremote, PETSC_C… in PetscSFConcatenate()
|
| /petsc/src/mat/impls/dense/mpi/ |
| H A D | mpidense.c | 676 PetscInt lda, len, i, nl, ng, m = A->rmap->n, radd; in MatGetDiagonal_MPIDense() local 684 PetscCall(VecGetLocalSize(v, &nl)); in MatGetDiagonal_MPIDense() 691 if (nl - i > 0) PetscCall(PetscArrayzero(x + i, nl - i)); in MatGetDiagonal_MPIDense() 2697 PetscInt nr[2], nl[2]; in MatDenseScatter_Private() local 2699 PetscCall(PetscSFGetGraph(sf, nr, nl, NULL, NULL)); in MatDenseScatter_Private() 2700 PetscCall(PetscSFGetGraph(vsf, nr + 1, nl + 1, NULL, NULL)); in MatDenseScatter_Private() 2701 if (N * nr[0] != nr[1] || N * nl[0] != nl[1]) vsf = NULL; in MatDenseScatter_Private()
|
| /petsc/src/mat/impls/shell/ |
| H A D | shell.c | 325 PetscInt *gcols, i, st, nl, nc; in MatZeroRows_Shell() local 341 PetscCall(VecGetLocalSize(xt, &nl)); in MatZeroRows_Shell() 343 for (i = 0; i < nl; i++) { in MatZeroRows_Shell() 373 PetscInt *grows, *gcols, i, st, nl; in MatZeroRowsColumns_Shell() local 399 PetscCall(VecGetLocalSize(xt, &nl)); in MatZeroRowsColumns_Shell() 401 for (i = 0; i < nl; i++) { in MatZeroRowsColumns_Shell()
|
| /petsc/src/mat/impls/is/ |
| H A D | matis.c | 422 PetscInt bs, i, cnt, nl, *ncount, *ndmapc; in MatMPIXAIJComputeLocalToGlobalMapping_Private() local 456 PetscCall(ISLocalToGlobalMappingGetNodeInfo(*l2g, &nl, &ncount, NULL)); in MatMPIXAIJComputeLocalToGlobalMapping_Private() 459 PetscCall(PetscSFSetGraphLayout(sf, A->rmap, nl, NULL, PETSC_OWN_POINTER, garray)); in MatMPIXAIJComputeLocalToGlobalMapping_Private() 483 PetscCall(PetscMalloc1(nl, &lndmapi)); in MatMPIXAIJComputeLocalToGlobalMapping_Private() 551 for (i = 0, j = 0; i < nl; i++) in MatMPIXAIJComputeLocalToGlobalMapping_Private() 2885 PetscInt nr, nl, len; in MatZeroRowsColumns_Private_IS() local 2898 PetscCall(MatGetSize(matis->A, &nl, NULL)); in MatZeroRowsColumns_Private_IS() 2913 PetscCall(PetscArrayzero(matis->sf_leafdata, nl)); in MatZeroRowsColumns_Private_IS() 2919 PetscCall(PetscMalloc1(nl, &lrows)); in MatZeroRowsColumns_Private_IS() 2921 for (PetscInt i = 0; i < nl; i++) in MatZeroRowsColumns_Private_IS()
|