Home
last modified time | relevance | path

Searched refs:nlocal (Results 1 – 25 of 61) sorted by relevance

123

/petsc/src/vec/is/ao/tests/
H A Dex4.c9 PetscInt *localvert = NULL, nlocal; in main() local
18 nlocal = 4; in main()
24 nlocal = 0; in main()
28 PetscCall(AOCreateBasic(PETSC_COMM_WORLD, nlocal, localvert, NULL, &ao)); in main()
32 PetscCall(AOCreateMemoryScalable(PETSC_COMM_WORLD, nlocal, localvert, NULL, &ao)); in main()
H A Dex4f.F9011 PetscInt localvert(4), nlocal
23 nlocal = 0
25 nlocal = 4
33 PetscCallA(AOCreateBasic(PETSC_COMM_WORLD, nlocal, localvert, PETSC_NULL_INTEGER_ARRAY, ao, ierr))
37 …PetscCallA(AOCreateMemoryScalable(PETSC_COMM_WORLD, nlocal, localvert, PETSC_NULL_INTEGER_ARRAY, a…
/petsc/src/vec/is/is/tests/
H A Dex5.c8 PetscInt nlocal, local[5], nneigh, *neigh, **ineigh, *numneigh; in main() local
17 nlocal = 4; in main()
23 nlocal = 4; in main()
29 nlocal = 4; in main()
35 …PetscCall(ISLocalToGlobalMappingCreate(PETSC_COMM_WORLD, 1, nlocal, local, PETSC_COPY_VALUES, &map… in main()
/petsc/src/mat/tests/
H A Dex18.c10 PetscInt i, j, k, b, m = 3, n, nlocal = 2, bs = 1, Ii, J; in main() local
22 n = nlocal * size; in main()
41 for (j = nlocal * rank; j < nlocal * (rank + 1); j++) { in main()
120 nboundary_nodes = size > m ? nlocal : m - size + nlocal; in main()
125 nboundary_nodes = nlocal + 1; in main()
130 nboundary_nodes = nlocal; in main()
134 for (j = nlocal * rank; j < nlocal * (rank + 1); j++, k++) boundary_nodes[k] = j; in main()
141 if (Ii >= rank * m * nlocal && Ii < (rank + 1) * m * nlocal) boundary_nodes[k++] = Ii; in main()
145 if (Ii >= rank * m * nlocal && Ii < (rank + 1) * m * nlocal) boundary_nodes[k++] = Ii; in main()
H A Dex73.c23 PetscInt *nlocal, m, n; in main() local
98 PetscCall(PetscMalloc1(size, &nlocal)); in main()
99 PetscCall(ISPartitioningCount(is, size, nlocal)); in main()
103 PetscCall(ISInvertPermutation(isn, useND ? PETSC_DECIDE : nlocal[rank], &is)); in main()
111 PetscCall(PetscFree(nlocal)); in main()
/petsc/src/vec/vec/tutorials/
H A Dex14f.F9018 PetscInt nlocal, nghost, ifrom(2)
26 nlocal = 6
29 nlocal = bs*nlocal
71 …PetscCallA(VecCreateGhostBlockWithArray(PETSC_COMM_WORLD, bs, nlocal, PETSC_DECIDE, nghost, ifrom,…
73 …PetscCallA(VecCreateGhostBlock(PETSC_COMM_WORLD, bs, nlocal, PETSC_DECIDE, nghost, ifrom, gxs, ier…
H A Dex9.c22 PetscInt nlocal = 6, nghost = 2, ifrom[2], i, rstart, rend; in main() local
73 PetscCall(PetscMalloc1(nlocal + nghost, &tarray)); in main()
74 …PetscCall(VecCreateGhostWithArray(PETSC_COMM_WORLD, nlocal, PETSC_DECIDE, nghost, ifrom, tarray, &… in main()
78 PetscCall(VecSetSizes(gxs, nlocal, PETSC_DECIDE)); in main()
81 PetscCall(VecCreateGhost(PETSC_COMM_WORLD, nlocal, PETSC_DECIDE, nghost, ifrom, &gxs)); in main()
125 …for (i = 0; i < nlocal + nghost; i++) PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "%" Pets… in main()
135 for (i = 0; i < nghost; i++) array[nlocal + i] = rank ? (PetscScalar)4 : (PetscScalar)8; in main()
145 …for (i = 0; i < nlocal + nghost; i++) PetscCall(PetscSynchronizedPrintf(PETSC_COMM_WORLD, "%" Pets… in main()
H A Dex9f.F9018 PetscInt nlocal, nghost, ifrom(2)
26 nlocal = 6
69 …PetscCallA(VecCreateGhostWithArray(PETSC_COMM_WORLD, nlocal, PETSC_DECIDE, nghost, ifrom, tarray, …
71 PetscCallA(VecCreateGhost(PETSC_COMM_WORLD, nlocal, PETSC_DECIDE, nghost, ifrom, gxs, ierr))
H A Dex3.c14 PetscInt i, istart, iend, n = 6, nlocal; in main() local
86 PetscCall(VecGetLocalSize(x, &nlocal)); in main()
88 for (i = 0; i < nlocal; i++) array[i] = rank + 1; in main()
/petsc/src/vec/vec/tests/
H A Dex23.c15 PetscInt i, blocks[2], nlocal; in main() local
31 if (rank == 0) nlocal = 8; in main()
32 else nlocal = 4; in main()
34 PetscCall(VecSetSizes(x, nlocal, 12)); in main()
H A Dex30f.F9011 PetscInt nlocal, n, row, i1
21 nlocal = 2
30 nlocal2 = 2*nlocal
34 PetscCallA(VecCreateFromOptions(PETSC_COMM_WORLD, PETSC_NULL_CHARACTER, i1, nlocal, n, v2, ierr))
/petsc/src/dm/tutorials/
H A Dswarm_ex2.c15 PetscInt p, bs, nlocal; in ex2_1() local
29 PetscCall(DMSwarmGetLocalSize(dms, &nlocal)); in ex2_1()
34 for (p = 0; p < nlocal; p++) array[p] = 11.1 + p * 0.1 + rank * 100.0; in ex2_1()
41 for (p = 0; p < nlocal; p++) { in ex2_1()
H A Dswarm_ex3.c131 PetscInt p, bs, nlocal, overlap, mx, tk; in ex3_1() local
178 PetscCall(DMSwarmGetLocalSize(dms, &nlocal)); in ex3_1()
183 for (p = 0; p < nlocal; p++) { in ex3_1()
204 PetscCall(DMSwarmGetLocalSize(dms, &nlocal)); in ex3_1()
206 for (p = 0; p < nlocal; p++) iarray[p] = (PetscInt)rank; in ex3_1()
218 PetscCall(DMSwarmGetLocalSize(dms, &nlocal)); in ex3_1()
220 for (p = 0; p < nlocal; p++) { in ex3_1()
/petsc/src/ksp/ksp/tutorials/
H A Dex23.c22 PetscInt i, n = 10, col[3], its, rstart, rend, nlocal; in main() local
51 PetscCall(VecGetLocalSize(x, &nlocal)); in main()
65 PetscCall(MatSetSizes(A, nlocal, nlocal, n, n)); in main()
H A Dex7f.F9027 PetscInt :: its, nlocal, first, Istart, Iend
170 PetscCallA(PCBJacobiGetSubKSP(myPc, nlocal, first, PETSC_NULL_KSP_POINTER, ierr))
171 PetscCallA(PCBJacobiGetSubKSP(myPc, nlocal, first, subksp, ierr))
175 do i = 0, nlocal - 1
H A Dex7.c36 PetscInt its, nlocal, first, Istart, Iend; in main() local
189 PetscCall(PCBJacobiGetSubKSP(pc, &nlocal, &first, &subksp)); in main()
195 for (i = 0; i < nlocal; i++) { in main()
/petsc/src/vec/is/sf/tests/
H A Dex1f.F909 PetscInt nlocal, row, i1
18 nlocal = 1
20 …PetscCallA(VecCreateFromOptions(PETSC_COMM_WORLD, PETSC_NULL_CHARACTER, i1, nlocal, PETSC_DECIDE, …
/petsc/src/ksp/ksp/tests/
H A Dex26.c47 PetscInt i, its, Nx = PETSC_DECIDE, Ny = PETSC_DECIDE, nlocal, nrhs = 1; in main() local
73 PetscCall(VecGetLocalSize(fine_ctx.x, &nlocal)); in main()
97 …PetscCall(MatCreateDense(PETSC_COMM_WORLD, nlocal, PETSC_DECIDE, fine_ctx.mx * fine_ctx.my, nrhs, … in main()
107 for (i = 0; i < nlocal * nrhs; i++) b[i] = 1.0; in main()
123 for (i = 0; i < nlocal; i++) { in main()
124 if (PetscAbsScalar(xx[i] - XX[nlocal * n + i]) > PETSC_SMALL) { in main()
H A Dex12f.F9014 PetscInt its, m, n, mlocal, nlocal
38 PetscCallA(MatGetLocalSize(A, mlocal, nlocal, ierr))
42 & mlocal, nlocal, &
H A Dex28.c12 PetscInt i, n = 10, col[3], its, rstart, rend, nlocal; in main() local
44 PetscCall(VecGetLocalSize(x, &nlocal)); in main()
48 PetscCall(MatSetSizes(A, nlocal, nlocal, n, n)); in main()
H A Dex29.c45 PetscInt its, n, Nx = PETSC_DECIDE, Ny = PETSC_DECIDE, nlocal, i; in main() local
76 PetscCall(VecGetLocalSize(fine_ctx.x, &nlocal)); in main()
79 PetscCall(MatCreateFromOptions(PETSC_COMM_WORLD, NULL, 1, nlocal, nlocal, n, n, &A)); in main()
/petsc/src/ksp/pc/impls/vpbjacobi/kokkos/
H A Dvpbjacobi_kok.kokkos.cxx148 PetscInt i, nlocal, nblocks, nsize = 0; in PCSetUp_VPBJacobi_Kokkos() local
155 PetscCall(MatGetLocalSize(pc->pmat, &nlocal, NULL)); in PCSetUp_VPBJacobi_Kokkos()
156 …PetscCheck(!nlocal || nblocks, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONGSTATE, "Must call MatSetVariabl… in PCSetUp_VPBJacobi_Kokkos()
171 if (pckok && (pckok->n != nlocal || pckok->nblocks != nblocks || pckok->nsize != nsize)) { in PCSetUp_VPBJacobi_Kokkos()
178 PetscCallCXX(pckok = new PC_VPBJacobi_Kokkos(nlocal, nblocks, nsize, bsizes)); in PCSetUp_VPBJacobi_Kokkos()
/petsc/src/binding/petsc4py/demo/legacy/petsc-examples/ksp/
H A Dex23.py55 nlocal = x.getLocalSize() variable
70 A.setSizes(n,nlocal)
/petsc/src/vec/is/is/impls/stride/
H A Dstride.c40 static PetscErrorCode ISInvertPermutation_Stride(IS is, PetscInt nlocal, IS *perm) in ISInvertPermutation_Stride() argument
42 PetscBool isident, samelocal = (PetscBool)(nlocal == PETSC_DECIDE); in ISInvertPermutation_Stride()
46 …if (isident && nlocal != PETSC_DECIDE) PetscCallMPI(MPIU_Allreduce(MPI_IN_PLACE, &samelocal, 1, MP… in ISInvertPermutation_Stride()
51 n = nlocal; in ISInvertPermutation_Stride()
54 … PetscCallMPI(MPI_Exscan(&nlocal, &start, 1, MPIU_INT, MPI_SUM, PetscObjectComm((PetscObject)is))); in ISInvertPermutation_Stride()
65 PetscCall(ISInvertPermutation(tmp, nlocal, perm)); in ISInvertPermutation_Stride()
/petsc/src/snes/impls/vi/ss/
H A Dviss.c59 PetscInt i, nlocal; in SNESVIComputeFunction() local
63 PetscCall(VecGetLocalSize(X, &nlocal)); in SNESVIComputeFunction()
70 for (i = 0; i < nlocal; i++) { in SNESVIComputeFunction()
99 PetscInt i, nlocal; in SNESVIComputeBsubdifferentialVectors() local
108 PetscCall(VecGetLocalSize(X, &nlocal)); in SNESVIComputeBsubdifferentialVectors()
110 for (i = 0; i < nlocal; i++) { in SNESVIComputeBsubdifferentialVectors()

123