Home
last modified time | relevance | path

Searched refs:n (Results 1 – 25 of 1576) sorted by relevance

12345678910>>...64

/petsc/src/binding/petsc4py/demo/legacy/poisson3d/
H A Ddel2lib.f909 integer , intent(in) :: n local
10 real(kind=8) , intent(inout) :: F(0:n+1,0:n+1,0:n+1)
11 real(kind=8) , intent(in) :: x(n,n,n)
12 real(kind=8) , intent(inout) :: y(n,n,n)
14 F(1:n,1:n,1:n) = x
16 y(:,:,:) = 6.0 * F(1:n,1:n,1:n) &
17 - F(0:n-1,1:n,1:n) &
18 - F(2:n+1,1:n,1:n) &
19 - F(1:n,0:n-1,1:n) &
20 - F(1:n,2:n+1,1:n) &
[all …]
H A Dpoisson3d.c12 PetscInt n; in main() local
30 n = 32; in main()
31 h = 1.0/(n+1); /* grid spacing */ in main()
34 MatSetSizes(A, n*n*n, n*n*n, n*n*n, n*n*n); in main()
36 shell.N = n; in main()
37 PetscMalloc((n+2)*(n+2)*(n+2)*sizeof(PetscScalar),&shell.F); in main()
38 PetscMemzero(shell.F, (n+2)*(n+2)*(n+2)*sizeof(PetscScalar)); in main()
/petsc/src/binding/petsc4py/docs/ipynb/
H A Ddmplex.ipynb7 "Decoding the DMPlex\n",
8 "===================\n",
9 "\n",
19 "from __future__ import print_function\n",
20 "import sys,petsc4py\n",
21 "petsc4py.init(sys.argv)\n",
22 "from petsc4py import PETSc\n",
39 "dim = 2\n",
40 "coords = np.asarray([[0.0, 0.0],\n",
41 " [0.5, 0.0],\n",
[all …]
/petsc/src/mat/graphops/color/impls/minpack/
H A Ddsm.c7 PetscErrorCode MINPACKdsm(PetscInt *m, PetscInt *n, PetscInt *npairs, PetscInt *indrow, PetscInt *i… in MINPACKdsm() argument
111 …PetscCall(MINPACKdegr(n, &indrow[1], &jpntr[1], &indcol[1], &ipntr[1], &iwa[*n * 5 + 1], &iwa[*n +… in MINPACKdsm()
116 …o(n, &indrow[1], &jpntr[1], &indcol[1], &ipntr[1], &iwa[*n * 5 + 1], &iwa[(*n << 2) + 1], &maxclq,… in MINPACKdsm()
117 …PetscCall(MINPACKseq(n, &indrow[1], &jpntr[1], &indcol[1], &ipntr[1], &iwa[(*n << 2) + 1], &ngrp[1… in MINPACKdsm()
127 …, n, &indrow[1], &jpntr[1], &indcol[1], &ipntr[1], &iwa[*n * 5 + 1], &iwa[(*n << 2) + 1], &maxclq,… in MINPACKdsm()
128 …PetscCall(MINPACKseq(n, &indrow[1], &jpntr[1], &indcol[1], &ipntr[1], &iwa[(*n << 2) + 1], &iwa[1]… in MINPACKdsm()
135 i__1 = *n; in MINPACKdsm()
146 i__1 = *n - 1; in MINPACKdsm()
147 …PetscCall(MINPACKnumsrt(n, &i__1, &iwa[*n * 5 + 1], &c_n1, &iwa[(*n << 2) + 1], &iwa[(*n << 1) + 1… in MINPACKdsm()
148 …PetscCall(MINPACKseq(n, &indrow[1], &jpntr[1], &indcol[1], &ipntr[1], &iwa[(*n << 2) + 1], &iwa[1]… in MINPACKdsm()
[all …]
/petsc/doc/manualpages/doctext/
H A Dmyst.def10 key %n`%1`
11 synopsis %n%1
12 definition %n**%1**%n
15 #section %n%n#### %1%n
22 section %n%n## %1%n
23 s_synopsis %n%n## Synopsis%n```%n
24 e_synopsis %n```%n
31 s_arg_list %n%n
35 e_defn_inlist %n
36 e_arg_list %n%n
[all …]
H A Dlatex.def6 postamble %n
7 key %n\k{%1}
8 definition \DeFn{%1}}%n
12 section %n\subhead{%1}%n
13 s_synopsis %n\subhead{Synopsis}%n\startvb\begin{verbatim}%n%m="verbatim"
14 e_synopsis %n\end{verbatim}%n\endvb%n%m=""
16 eop \endmanpage%n
17 bop \startmanpage%n
18 linebreak \nextline%n
19 s_arg %n\startarg{
[all …]
H A Dhtml.def13 end_par %n<P>%n
16 s_verbatim <PRE>%n
17 e_verbatim </PRE>%n
19 key %n%p<CODE>%1</CODE>
20 synopsis %n<PRE>%1</PRE>
21 definition %n<B>%1</B>%n
22 section %n<H3><FONT COLOR="#CC3333">%1</FONT></H3>%n
23 s_synopsis %n<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>%n<PRE>%n
24 e_synopsis %n</PRE>%n
26 eop %n</BODY></HTML>%n
[all …]
H A Dnroff.def5 key %n%p<CODE>%1</CODE>
6 definition %n.B %1%n
25 s_synopsis %n.SH SYNOPSIS%n.nf%n
26 e_synopsis %n.fi%n
30 em %n.B
31 s_arg %n.PD 0%n.TP%n.B
32 s_defn %n-
33 e_defn %n.PD 1%n
34 e_arg %n
35 mantitle %n.TH %1 %2 "%3" " " "%4"%n.SH NAME%n%1
[all …]
/petsc/src/sys/tests/
H A Dex41.c11 PetscInt n, off, array[4], na, nb, i, *marray, size; in main() local
19 PetscCall(PetscHSetIGetSize(ht, &n)); in main()
20 PetscTestCheck(n == 0); in main()
23 PetscCall(PetscHSetIGetSize(ht, &n)); in main()
24 PetscTestCheck(n == 0); in main()
30 PetscCall(PetscHSetIGetSize(ht, &n)); in main()
31 PetscTestCheck(n == 1); in main()
36 PetscCall(PetscHSetIGetSize(ht, &n)); in main()
37 PetscTestCheck(n == 0); in main()
53 PetscCall(PetscHSetIGetSize(ht, &n)); in main()
[all …]
H A Dex40.c25 PetscInt n, v, koff, keys[4], voff, vals[4], na, nb, i, size, *karray, off; in PETSC_HASH_MAP() local
34 PetscCall(PetscHMapIGetSize(ht, &n)); in PETSC_HASH_MAP()
35 PetscTestCheck(n == 0); in PETSC_HASH_MAP()
38 PetscCall(PetscHMapIGetSize(ht, &n)); in PETSC_HASH_MAP()
39 PetscTestCheck(n == 0); in PETSC_HASH_MAP()
47 PetscCall(PetscHMapIGetSize(ht, &n)); in PETSC_HASH_MAP()
48 PetscTestCheck(n == 1); in PETSC_HASH_MAP()
55 PetscCall(PetscHMapIGetSize(ht, &n)); in PETSC_HASH_MAP()
56 PetscTestCheck(n == 0); in PETSC_HASH_MAP()
72 PetscCall(PetscHMapIGetSize(ht, &n)); in PETSC_HASH_MAP()
[all …]
/petsc/src/vec/vec/tests/
H A Dex32.c14 PetscInt i, l, n = 100, r = 10, d = 1, vsize = 1; in main() local
30 PetscCall(PetscOptionsGetInt(NULL, NULL, "-n", &n, NULL)); in main()
36n >= 1 && r >= 1 && d >= 1 && d <= n, PETSC_COMM_WORLD, PETSC_ERR_SUP, "Wrong input n=%" PetscInt_… in main()
38 PetscCall(PetscCalloc6(n, &X, n, &X1, n, &XR, n, &XSO, n, &Y, n, &Z)); in main()
43 for (i = 0; i < n; ++i) { in main()
46 if (d > 1) XR[i] = XR[i] % (n / d); in main()
48 if (d > 1) XSO[i] = XSO[i] % (n / d); in main()
51 nreal = (PetscReal)n; in main()
55 for (i = 0; i < n / 10; ++i) { in main()
65 if (vwr) PetscCall(PetscIntView(n, order ? XSO : XR, vwr)); in main()
[all …]
/petsc/src/sys/utils/
H A Dpsplit.c26 PetscErrorCode PetscSplitOwnershipBlock(MPI_Comm comm, PetscInt bs, PetscInt *n, PetscInt *N) in PetscSplitOwnershipBlock() argument
31 …PetscCheck(*N != PETSC_DECIDE || *n != PETSC_DECIDE, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Both … in PetscSplitOwnershipBlock()
34 …PetscCheck(*n % bs == 0, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "local size %" PetscInt_FMT " not … in PetscSplitOwnershipBlock()
35 PetscCallMPI(MPIU_Allreduce(n, N, 1, MPIU_INT, MPI_SUM, comm)); in PetscSplitOwnershipBlock()
36 } else if (*n == PETSC_DECIDE) { in PetscSplitOwnershipBlock()
40 *n = bs * (Nbs / size + ((Nbs % size) > rank)); in PetscSplitOwnershipBlock()
67 PetscErrorCode PetscSplitOwnership(MPI_Comm comm, PetscInt *n, PetscInt *N) in PetscSplitOwnership() argument
72 …PetscCheck(*N != PETSC_DECIDE || *n != PETSC_DECIDE, PETSC_COMM_SELF, PETSC_ERR_ARG_INCOMP, "Both … in PetscSplitOwnership()
75 l[0] = (*n == PETSC_DECIDE) ? 1 : 0; in PetscSplitOwnership()
84 PetscCallMPI(MPIU_Allreduce(n, N, 1, MPIU_INT, MPI_SUM, comm)); in PetscSplitOwnership()
[all …]
H A Dsorti.c153 #define QuickSort1(FuncName, X, n, pivot, t1) \ argument
155 PetscCount i, j, p, l, r, hi = n - 1; \
156 if (n < 8) { \
157 for (i = 0; i < n; i++) { \
159 for (j = i + 1; j < n; j++) { \
176 #define QuickSortReverse1(FuncName, X, n, pivot, t1) \ argument
178 PetscCount i, j, p, l, r, hi = n - 1; \
179 if (n < 8) { \
180 for (i = 0; i < n; i++) { \
182 for (j = i + 1; j < n; j++) { \
[all …]
/petsc/src/ts/interface/
H A Dtshistory.c7 PetscCount n; /* current number of steps registered */ member
13 PetscErrorCode TSHistoryGetNumSteps(TSHistory tsh, PetscInt *n) in TSHistoryGetNumSteps() argument
16 PetscAssertPointer(n, 2); in TSHistoryGetNumSteps()
17 PetscCall(PetscIntCast(tsh->n, n)); in TSHistoryGetNumSteps()
24 if (tsh->n == tsh->c) { /* reallocation */ in TSHistoryUpdate()
29 …tsh->sorted = (PetscBool)(tsh->sorted && (tsh->n ? (PetscBool)(time >= tsh->hist[tsh->n - 1]) : PE… in TSHistoryUpdate()
31 if (tsh->n) { /* id should be unique */ in TSHistoryUpdate()
34 PetscCall(PetscMalloc1(tsh->n, &ids)); in TSHistoryUpdate()
35 PetscCall(PetscArraycpy(ids, tsh->hist_id, tsh->n)); in TSHistoryUpdate()
36 PetscCall(PetscSortInt(tsh->n, ids)); in TSHistoryUpdate()
[all …]
/petsc/include/petsc/private/kernels/
H A Dpetscaxpy.h32 #define PetscKernelAXPY(U, a1, p1, n) \ argument
35 PetscBLASInt nn = (PetscBLASInt)n; \
38 #define PetscKernelAXPY2(U, a1, a2, p1, p2, n) \ argument
40 fortranmaxpy2_(U, &a1, &a2, p1, p2, &n); \
42 #define PetscKernelAXPY3(U, a1, a2, a3, p1, p2, p3, n) \ argument
44 fortranmaxpy3_(U, &a1, &a2, &a3, p1, p2, p3, &n); \
46 #define PetscKernelAXPY4(U, a1, a2, a3, a4, p1, p2, p3, p4, n) \ argument
48 fortranmaxpy4_(U, &a1, &a2, &a3, &a4, p1, p2, p3, p4, &n); \
53 #define PetscKernelAXPY(U, Alpha, P, n) \ argument
55 switch (n & 0x3) { \
[all …]
/petsc/src/mat/tests/
H A Dex226.c6 PetscInt global_index(PetscInt i, PetscInt j, PetscInt k, PetscInt m, PetscInt n) in global_index() argument
8 return i + j * m + k * m * n; in global_index()
14 PetscInt i, M, N, Istart, Iend, n = 7, j, J, Ii, m = 8, k, o = 1; in main() local
23 PetscCall(PetscOptionsGetInt(NULL, NULL, "-n", &n, NULL)); in main()
29 M = N = m * n * o; in main()
36 …PetscCheck(o >= 1 && m > 1 && n >= 1, PETSC_COMM_WORLD, PETSC_ERR_USER, "Dimensions need to be lar… in main()
46 k = Ii / (m * n); in main()
47 j = (Ii - k * m * n) / m; in main()
48 i = (Ii - k * m * n - j * m); in main()
50 J = global_index(i - 1, j, k, m, n); in main()
[all …]
/petsc/src/sys/classes/viewer/impls/socket/mex-scripts/
H A Dbread.c17 static void SYByteSwapInt(int *buff, PetscCount n) in SYByteSwapInt() argument
21 for (PetscCount j = 0; j < n; j++) { in SYByteSwapInt()
30 static void SYByteSwapShort(short *buff, PetscCount n) in SYByteSwapShort() argument
34 for (PetscCount j = 0; j < n; j++) { in SYByteSwapShort()
44 static void SYByteSwapScalar(PetscScalar *buff, PetscCount n) in SYByteSwapScalar() argument
49 n *= 2; in SYByteSwapScalar()
51 for (PetscCount j = 0; j < n; j++) { in SYByteSwapScalar()
79 PetscErrorCode PetscBinaryRead(int fd, void *p, PetscCount n, PetscInt *dummy, PetscDataType type) in PetscBinaryRead() argument
83 PetscCount ntmp = n, wsize; in PetscBinaryRead()
87 if (type == PETSC_INT) n *= sizeof(int); in PetscBinaryRead()
[all …]
/petsc/src/ksp/ksp/tests/
H A Dex17.c20 PetscInt n = 10, its, dim, p = 1, use_random; in main() local
29 PetscCall(PetscOptionsGetInt(NULL, NULL, "-n", &n, NULL)); in main()
34 dim = n; in main()
38 dim = n; in main()
42 dim = n; in main()
46 dim = n * n; in main()
50 dim = n * n; in main()
54 dim = n; in main()
81 PetscCall(FormTestMatrix(A, n, type)); in main()
119 PetscErrorCode FormTestMatrix(Mat A, PetscInt n, TestType type) in FormTestMatrix() argument
[all …]
/petsc/src/vec/vec/impls/seq/ftn-kernels/
H A Dfmaxpy.F9014 PetscInt, intent(in) :: n
22 x(1:n) = x(1:n) + (a0*y0(1:n) + a1*y1(1:n) + a2*y2(1:n) + a3*y3(1:n))
31 PetscInt, intent(in) :: n
38 x(1:n) = x(1:n) + (a0*y0(1:n) + a1*y1(1:n) + a2*y2(1:n))
47 PetscInt, intent(in) :: n
53 x(1:n) = x(1:n) + (a0*y0(1:n) + a1*y1(1:n))
/petsc/src/vec/is/sf/tests/
H A Dex15.c13 PetscInt i, n, *ix, *iy, *tomap, start; in main() local
33 n = 64; /* long enough to trigger memcpy optimizations both in local scatter and remote scatter */ in main()
36 PetscCall(VecCreateFromOptions(PETSC_COMM_WORLD, NULL, 1, n, PETSC_DECIDE, &x)); in main()
49 PetscCall(PetscMalloc2(n, &ix, n, &iy)); in main()
52 PetscCall(ISCreateGeneral(PETSC_COMM_WORLD, n, ix, PETSC_COPY_VALUES, &isx)); in main()
55 for (i = 0; i < n; i++) iy[i] = i + 32; in main()
57 for (i = 0; i < n / 2; i++) { in main()
59 iy[i + n / 2] = i; in main()
62 PetscCall(ISCreateGeneral(PETSC_COMM_WORLD, n, iy, PETSC_COPY_VALUES, &isy)); in main()
80 PetscCall(PetscMalloc1(n, &tomap)); in main()
[all …]
/petsc/src/dm/impls/plex/transform/impls/refine/bl/
H A Dplexrefbl.c17 const PetscInt n = bl->n; in DMPlexTransformSetUp_BL() local
84 PetscCall(PetscMalloc1(n, &bl->h)); in DMPlexTransformSetUp_BL()
90 PetscReal d = (bl->r - 1.) / (PetscPowRealInt(bl->r, n + 1) - 1.); in DMPlexTransformSetUp_BL()
93 for (i = 1; i < n; ++i) { in DMPlexTransformSetUp_BL()
99 for (i = 0; i < n; ++i) bl->h[i] = (i + 1.) / (n + 1); in DMPlexTransformSetUp_BL()
113 Nc = 7 * 2 + 6 * (n - 1); in DMPlexTransformSetUp_BL()
114 No = 2 * (n + 1); in DMPlexTransformSetUp_BL()
118 bl->size[ct][0] = n; in DMPlexTransformSetUp_BL()
119 bl->size[ct][1] = n + 1; in DMPlexTransformSetUp_BL()
128 for (i = 0; i < n - 1; ++i) { in DMPlexTransformSetUp_BL()
[all …]
/petsc/src/ksp/ksp/interface/
H A Dxmon.c4 PetscErrorCode KSPMonitorLGRange(KSP ksp, PetscInt n, PetscReal rnorm, void *monctx) in KSPMonitorLGRange() argument
15 PetscCall(KSPMonitorRange_Private(ksp, n, &per)); in KSPMonitorLGRange()
16 if (!n) prev = rnorm; in KSPMonitorLGRange()
19 if (!n) PetscCall(PetscDrawLGReset(lg)); in KSPMonitorLGRange()
22 x = (PetscReal)n; in KSPMonitorLGRange()
26 if (n < 20 || !(n % 5) || ksp->reason) { in KSPMonitorLGRange()
32 if (!n) PetscCall(PetscDrawLGReset(lg)); in KSPMonitorLGRange()
35 x = (PetscReal)n; in KSPMonitorLGRange()
38 if (n < 20 || !(n % 5) || ksp->reason) { in KSPMonitorLGRange()
44 if (!n) PetscCall(PetscDrawLGReset(lg)); in KSPMonitorLGRange()
[all …]
/petsc/src/vec/is/is/impls/block/
H A Dblock.c67 PetscInt i, j, k, bs, n, *ii, *jj; in ISGetIndices_Block() local
71 PetscCall(PetscLayoutGetLocalSize(in->map, &n)); in ISGetIndices_Block()
72 n /= bs; in ISGetIndices_Block()
75 if (n) { in ISGetIndices_Block()
76 PetscCall(PetscMalloc1(bs * n, &jj)); in ISGetIndices_Block()
80 for (i = 0; i < n; i++) in ISGetIndices_Block()
101 …PetscCheck(is->map->n <= 0 || *idx == sub->idx, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "Must restor… in ISRestoreIndices_Block()
109 PetscInt i, *ii, bs, n, *idx = sub->idx; in ISInvertPermutation_Block() local
115 PetscCall(PetscLayoutGetLocalSize(is->map, &n)); in ISInvertPermutation_Block()
116 n /= bs; in ISInvertPermutation_Block()
[all …]
/petsc/src/ksp/ksp/tutorials/
H A Dex83f.F9014 PetscInt i, n, one
34 n = 3
35 PetscCallA(PetscOptionsGetInt(PETSC_NULL_OPTIONS, PETSC_NULL_CHARACTER, '-n', n, flg, ierr))
36 nz = 3*n - 4
38 allocate (b(n), x(n))
41 allocate (ia(n + 1), ja(nz), a(nz))
44 do i = 1, n
51 do i = 3, n
54 ia(n + 1) = ia(n) + 1
59 do i = 2, n - 1
[all …]
/petsc/src/dm/dt/tests/
H A Dex6.c8 PetscInt n = 3, i; in main() local
13 PetscCall(PetscOptionsGetInt(NULL, NULL, "-n", &n, NULL)); in main()
15 PetscCall(PetscMalloc1(n, &la_nodes)); in main()
16 PetscCall(PetscMalloc1(n, &la_weights)); in main()
17 PetscCall(PetscMalloc1(n, &n_nodes)); in main()
18 PetscCall(PetscMalloc1(n, &n_weights)); in main()
19 …PetscCall(PetscDTGaussLobattoLegendreQuadrature(n, PETSCGAUSSLOBATTOLEGENDRE_VIA_LINEAR_ALGEBRA, l… in main()
22 PetscCall(PetscRealView(n, la_nodes, PETSC_VIEWER_STDOUT_SELF)); in main()
23 PetscCall(PetscRealView(n, la_weights, PETSC_VIEWER_STDOUT_SELF)); in main()
24 …PetscCall(PetscDTGaussLobattoLegendreQuadrature(n, PETSCGAUSSLOBATTOLEGENDRE_VIA_NEWTON, n_nodes, … in main()
[all …]

12345678910>>...64