Home
last modified time | relevance | path

Searched refs:P (Results 1 – 25 of 283) sorted by relevance

12345678910>>...12

/petsc/share/petsc/datafiles/meshes/
H A Dnozzle.igs287 314,0.,50.1960813999176,50.1960813999176,10HMixedColor; 1P 1
288 116,-0.00000660767124,-0.2642362,0.0006305092161; 3P 2
289 123,0.,-1.,0.; 5P 3
290 123,0.,0.,-1.; 7P 4
291 190,3,5,7; 9P 5
292 110,-0.01066068966857,-0.0206502,-0.0055286755095, 11P 6
293 -0.01066068966857,-0.05104557792513,-0.0055286755095; 11P 7
294 502,14,-0.01066068966857,-0.05104557792513,-0.0055286755095, 13P 8
295 -0.06151692830778,-0.2642362,-0.03492895310324, 13P 9
296 -0.00511661235243,-0.0600060308374,-0.00232361323087, 13P 10
[all …]
/petsc/src/mat/utils/
H A Disltog.c3 …apping(ISLocalToGlobalMapping lgmap, Mat A, PetscBool cols, PetscBool trans, MatType ptype, Mat *P) in MatCreateFromISLocalToGlobalMapping() argument
15 PetscAssertPointer(P, 6); in MatCreateFromISLocalToGlobalMapping()
42 PetscCall(MatCreateScatter(PetscObjectComm((PetscObject)A), sct, P)); in MatCreateFromISLocalToGlobalMapping()
46 PetscCall(MatConvert(*P, ptype, MAT_INITIAL_MATRIX, &tP)); in MatCreateFromISLocalToGlobalMapping()
47 PetscCall(MatDestroy(P)); in MatCreateFromISLocalToGlobalMapping()
48 *P = tP; in MatCreateFromISLocalToGlobalMapping()
58 PetscCall(MatCreate(PetscObjectComm((PetscObject)A), P)); in MatCreateFromISLocalToGlobalMapping()
59 PetscCall(MatSetType(*P, ptype)); in MatCreateFromISLocalToGlobalMapping()
60 PetscCall(MatSetSizes(*P, msize, cols ? lac : lar, PETSC_DECIDE, PETSC_DECIDE)); in MatCreateFromISLocalToGlobalMapping()
61 PetscCall(MatSeqAIJSetPreallocation(*P, 1, NULL)); in MatCreateFromISLocalToGlobalMapping()
[all …]
/petsc/src/ksp/ksp/tests/
H A Dex7.c20 Mat P; in MyMatShellMult() local
24 PetscCall(MatShellGetContext(As, &P)); in MyMatShellMult()
25 PetscCall(MatMult(P, x, y)); in MyMatShellMult()
32 …Mat P, As; /* the matrix used to compute the preconditioner and the linear system (matri… in main() local
59 PetscCall(MatCreate(PETSC_COMM_WORLD, &P)); in main()
60 PetscCall(MatSetSizes(P, PETSC_DECIDE, PETSC_DECIDE, n, n)); in main()
61 PetscCall(MatSetFromOptions(P)); in main()
62 PetscCall(MatSetUp(P)); in main()
71 PetscCall(MatSetValues(P, 1, &i, 3, col, value, INSERT_VALUES)); in main()
76 PetscCall(MatSetValues(P, 1, &i, 2, col, value, INSERT_VALUES)); in main()
[all …]
H A Dex13.c23 Mat A, P; in main() local
73 PetscCall(MatCreate(PETSC_COMM_WORLD, &P)); in main()
74 PetscCall(MatSetSizes(P, PETSC_DECIDE, PETSC_DECIDE, m, m)); in main()
75 PetscCall(MatSetFromOptions(P)); in main()
76 PetscCall(MatMPIAIJSetPreallocation(P, pnnz, NULL, pnnz, NULL)); in main()
77 PetscCall(MatSeqAIJSetPreallocation(P, pnnz, NULL)); in main()
78 PetscCall(MatSetUp(P)); in main()
99 PetscCall(MatSetValue(P, row, row, 1.0 / 4.0, INSERT_VALUES)); in main()
126 PetscCall(MatSetValue(P, row, row, PetscSqr(0.84201), INSERT_VALUES)); in main()
133 PetscCall(MatSetValue(P, row, row, PetscSqr(0.81228), INSERT_VALUES)); in main()
[all …]
H A Dex5.c7 PC P; in main() local
29 PetscCall(PCCreate(PETSC_COMM_WORLD, &P)); in main()
30 PetscCall(PCSetType(P, PCMAT)); in main()
31 PetscCall(PCSetOperators(P, A, A)); in main()
32 PetscCall(PCSetUp(P)); in main()
33 PetscCall(PCView(P, NULL)); in main()
55 PetscCall(PCApply(P, b, x2)); in main()
69 PetscCall(PCDestroy(&P)); in main()
/petsc/src/sys/objects/device/impls/cupm/
H A Dcupmallocator.hpp47 template <DeviceType T, typename P>
49 inline PetscErrorCode HostAllocator<T, P>::allocate(value_type **ptr, size_type n, const StreamBase… in allocate()
56 template <DeviceType T, typename P>
58 inline PetscErrorCode HostAllocator<T, P>::deallocate(value_type *ptr, const StreamBase<U> *) noexc… in deallocate()
65 template <DeviceType T, typename P>
67 inline PetscErrorCode HostAllocator<T, P>::uninitialized_copy(value_type *dest, const value_type *s… in uninitialized_copy()
102 template <DeviceType T, typename P>
104 inline PetscErrorCode DeviceAllocator<T, P>::allocate(value_type **ptr, size_type n, const StreamBa… in allocate()
111 template <DeviceType T, typename P>
113 inline PetscErrorCode DeviceAllocator<T, P>::deallocate(value_type *ptr, const StreamBase<U> *strea… in deallocate()
[all …]
/petsc/src/mat/tests/
H A Dex93.c104 Mat A, P, C; in testPTAPRectangular() local
114 PetscCall(MatCreateSeqAIJ(PETSC_COMM_WORLD, rows, cols, 5, NULL, &P)); in testPTAPRectangular()
115 PetscCall(MatSetValue(P, 0, 0, 1.0, INSERT_VALUES)); in testPTAPRectangular()
116 PetscCall(MatSetValue(P, 0, 1, 2.0, INSERT_VALUES)); in testPTAPRectangular()
117 PetscCall(MatSetValue(P, 0, 2, 0.0, INSERT_VALUES)); in testPTAPRectangular()
119 PetscCall(MatSetValue(P, 0, 3, -1.0, INSERT_VALUES)); in testPTAPRectangular()
121 PetscCall(MatSetValue(P, 1, 0, 0.0, INSERT_VALUES)); in testPTAPRectangular()
122 PetscCall(MatSetValue(P, 1, 1, -1.0, INSERT_VALUES)); in testPTAPRectangular()
123 PetscCall(MatSetValue(P, 1, 2, 1.0, INSERT_VALUES)); in testPTAPRectangular()
125 PetscCall(MatSetValue(P, 2, 0, 3.0, INSERT_VALUES)); in testPTAPRectangular()
[all …]
H A Dex186.c7 Mat A, P, PtAP, RARt, ABC, Pt; in main() local
16 PetscCall(MatCreateSeqDense(PETSC_COMM_SELF, n, m, NULL, &P)); in main()
20 PetscCall(MatSetValues(P, n, rows, m, cols, P_values, INSERT_VALUES)); in main()
21 PetscCall(MatAssemblyBegin(P, MAT_FINAL_ASSEMBLY)); in main()
22 PetscCall(MatAssemblyEnd(P, MAT_FINAL_ASSEMBLY)); in main()
23 PetscCall(MatTranspose(P, MAT_INITIAL_MATRIX, &Pt)); in main()
34 PetscCall(MatPtAP(A, P, MAT_INITIAL_MATRIX, PETSC_DEFAULT, &PtAP)); in main()
36 PetscCall(MatMatMatMult(Pt, A, P, MAT_INITIAL_MATRIX, PETSC_DEFAULT, &ABC)); in main()
40 PetscCall(MatView(P, PETSC_VIEWER_STDOUT_SELF)); in main()
55 PetscCall(MatDestroy(&P)); in main()
H A Dex94.c25 Mat A, A_save, B, AT, ATT, BT, BTT, P, R, C, C1; in main() local
187 PetscCall(MatCreate(PETSC_COMM_WORLD, &P)); in main()
188 PetscCall(MatSetSizes(P, PETSC_DECIDE, PETSC_DECIDE, M, PN)); in main()
189 PetscCall(MatSetType(P, mattype)); in main()
190 PetscCall(MatSeqAIJSetPreallocation(P, nzp, NULL)); in main()
191 PetscCall(MatMPIAIJSetPreallocation(P, nzp, NULL, nzp, NULL)); in main()
192 PetscCall(MatGetOwnershipRange(P, &rstart, &rend)); in main()
199 PetscCall(MatSetValues(P, 1, &i, nzp, idxn, a, ADD_VALUES)); in main()
201 PetscCall(MatAssemblyBegin(P, MAT_FINAL_ASSEMBLY)); in main()
202 PetscCall(MatAssemblyEnd(P, MAT_FINAL_ASSEMBLY)); in main()
[all …]
H A Dex62.c25 Mat A, A_save, B, C, P, C1, R; in main() local
146 PetscCall(MatCreate(PETSC_COMM_WORLD, &P)); in main()
147 PetscCall(MatSetSizes(P, PETSC_DECIDE, PETSC_DECIDE, PM, PN)); in main()
148 PetscCall(MatSetType(P, MATAIJ)); in main()
149 PetscCall(MatSeqAIJSetPreallocation(P, nzp, NULL)); in main()
150 PetscCall(MatMPIAIJSetPreallocation(P, nzp, NULL, nzp, NULL)); in main()
151 PetscCall(MatGetOwnershipRange(P, &rstart, &rend)); in main()
158 PetscCall(MatSetValues(P, 1, &i, nzp, idxn, a, ADD_VALUES)); in main()
160 PetscCall(MatAssemblyBegin(P, MAT_FINAL_ASSEMBLY)); in main()
161 PetscCall(MatAssemblyEnd(P, MAT_FINAL_ASSEMBLY)); in main()
[all …]
H A Dex90.c47 Mat A, P, PtAP; in main() local
64 …2, 1, PETSC_DETERMINE, PETSC_DETERMINE, rank ? pi2 : pi1, rank ? pj2 : pj1, rank ? pa2 : pa1, &P)); in main()
65 PetscCall(MatPtAP(A, P, MAT_INITIAL_MATRIX, 1.1, &PtAP)); in main()
67 PetscCall(MatView(P, NULL)); in main()
69 PetscCall(MatPtAP(A, P, MAT_REUSE_MATRIX, 1.1, &PtAP)); in main()
71 PetscCall(MatView(P, NULL)); in main()
74 PetscCall(MatDestroy(&P)); in main()
/petsc/src/ksp/ksp/tutorials/
H A Dex51.c225 static PetscErrorCode Form1DElementMass(PetscReal H, PetscInt P, PetscReal *gqn, PetscReal *gqw, Pe… in Form1DElementMass() argument
231 for (j = 0; j < (P + 1); ++j) { in Form1DElementMass()
232 for (i = 0; i < (P + 1); ++i) { in Form1DElementMass()
233 indx = j * (P + 1) + i; in Form1DElementMass()
235 …for (k = 0; k < (P + 1); ++k) Me1D[indx] += H * gqw[k] * polyBasisFunc(P, i, gqn, gqn[k]) * polyBa… in Form1DElementMass()
244 static PetscErrorCode Form1DElementStiffness(PetscReal H, PetscInt P, PetscReal *gqn, PetscReal *gq… in Form1DElementStiffness() argument
250 for (j = 0; j < (P + 1); ++j) { in Form1DElementStiffness()
251 for (i = 0; i < (P + 1); ++i) { in Form1DElementStiffness()
252 indx = j * (P + 1) + i; in Form1DElementStiffness()
254 …for (k = 0; k < (P + 1); ++k) Ke1D[indx] += (1. / H) * gqw[k] * derivPolyBasisFunc(P, i, gqn, gqn[… in Form1DElementStiffness()
[all …]
H A Dexample100.py122 A, P = get_op_pc(ksp, transpose=False)
123 pcg(ksp, A, P, b, x, *self.work)
127 A, P = get_op_pc(ksp, transpose=True)
128 pcg(ksp, A, P, b, x, *self.work)
135 P = pc.apply
138 P = pc.applyTranspose
139 return A, P
154 def pcg(ksp, A, P, b, x, r, z, p): argument
157 P(r, z)
165 P(r, z)
[all …]
/petsc/src/dm/tests/output/
H A Dex34_1.out3 Processor [0] M 11 N 5 P 7 m 3 n 2 p 2 w 2 s 1
5 Processor [1] M 11 N 5 P 7 m 3 n 2 p 2 w 2 s 1
7 Processor [2] M 11 N 5 P 7 m 3 n 2 p 2 w 2 s 1
9 Processor [3] M 11 N 5 P 7 m 3 n 2 p 2 w 2 s 1
11 Processor [4] M 11 N 5 P 7 m 3 n 2 p 2 w 2 s 1
13 Processor [5] M 11 N 5 P 7 m 3 n 2 p 2 w 2 s 1
15 Processor [6] M 11 N 5 P 7 m 3 n 2 p 2 w 2 s 1
17 Processor [7] M 11 N 5 P 7 m 3 n 2 p 2 w 2 s 1
19 Processor [8] M 11 N 5 P 7 m 3 n 2 p 2 w 2 s 1
21 Processor [9] M 11 N 5 P 7 m 3 n 2 p 2 w 2 s 1
[all …]
/petsc/doc/manual/
H A Ddt.md11 …bability density at a given location $P(x)$, so that the probability for an event at location in $…
14 \int_\Omega P(x) dx = 1.
20 pdf(x) = \lambda^d P(\lambda x).
27 \int_\Omega P(x) dx &= \int_\Omega P(\lambda s) \lambda^d ds \\
28 &= \int_\Omega P(s) \lambda^{-d} \lambda^d ds \\
29 &= \int_\Omega P(s) ds \\
37 C(x) = \int^x_{x_-} P(s) ds
44 C(\lambda x) &= \int^{\lambda x}_{x_-} P(s) ds \\
45 &= \int^{x}_{x_-} \lambda^d P(\lambda t) dt \\
46 &= \int^{x}_{x_-} P(t) dt \\
/petsc/src/dm/impls/stag/tests/output/
H A Dex50_dim-3_coords-false.out3 Processor [0] M 4 N 3 P 3 m 1 n 1 p 1 w 3 s 1
117 Processor [0] M 4 N 3 P 3 m 1 n 1 p 1 w 1 s 1
159 Processor [0] M 4 N 3 P 3 m 1 n 1 p 1 w 1 s 1
201 Processor [0] M 4 N 3 P 2 m 1 n 1 p 1 w 3 s 1
279 Processor [0] M 4 N 3 P 2 m 1 n 1 p 1 w 1 s 1
309 Processor [0] M 4 N 3 P 2 m 1 n 1 p 1 w 1 s 1
339 Processor [0] M 4 N 3 P 2 m 1 n 1 p 1 w 1 s 1
369 Processor [0] M 4 N 2 P 3 m 1 n 1 p 1 w 3 s 1
447 Processor [0] M 4 N 2 P 3 m 1 n 1 p 1 w 1 s 1
477 Processor [0] M 4 N 2 P 3 m 1 n 1 p 1 w 1 s 1
[all …]
H A Dex50_dim-3_coords-true.out3 Processor [0] M 4 N 3 P 3 m 1 n 1 p 1 w 3 s 1
118 Processor [0] M 4 N 3 P 3 m 1 n 1 p 1 w 1 s 1
161 Processor [0] M 4 N 3 P 3 m 1 n 1 p 1 w 1 s 1
204 Processor [0] M 4 N 3 P 2 m 1 n 1 p 1 w 3 s 1
283 Processor [0] M 4 N 3 P 2 m 1 n 1 p 1 w 1 s 1
314 Processor [0] M 4 N 3 P 2 m 1 n 1 p 1 w 1 s 1
345 Processor [0] M 4 N 3 P 2 m 1 n 1 p 1 w 1 s 1
376 Processor [0] M 4 N 2 P 3 m 1 n 1 p 1 w 3 s 1
455 Processor [0] M 4 N 2 P 3 m 1 n 1 p 1 w 1 s 1
486 Processor [0] M 4 N 2 P 3 m 1 n 1 p 1 w 1 s 1
[all …]
/petsc/src/snes/tutorials/
H A Dex48.c98 #define P (0.5) macro
111 …{{M * H, M *H, M}, {P * H, 0, 0}, {0, 0, 0}, {0, P *H, 0}, {M * L, M *L, P}, {P * L,…
112 …{{M * H, 0, 0}, {P * H, M *H, M}, {0, P *H, 0}, {0, 0, 0}, {M * L, 0, 0}, {P * L,…
113 …0, 0}, {0, M *H, 0}, {P * H, P *H, M}, {M * H, 0, 0}, {0, 0, 0}, {0, M *L, 0}…
114 … {0, 0, 0}, {P * H, 0, 0}, {M * H, P *H, M}, {0, M *L, 0}, {0, 0, 0}, {P
115 …{{M * L, M *L, M}, {P * L, 0, 0}, {0, 0, 0}, {0, P *L, 0}, {M * H, M *H, P}, {P * H,…
116 …{{M * L, 0, 0}, {P * L, M *L, M}, {0, P *L, 0}, {0, 0, 0}, {M * H, 0, 0}, {P * H,…
117 …0, 0}, {0, M *L, 0}, {P * L, P *L, M}, {M * L, 0, 0}, {0, 0, 0}, {0, M *H, 0}…
118 … {0, 0, 0}, {P * L, 0, 0}, {M * L, P *L, M}, {0, M *H, 0}, {0, 0, 0}, {P
132P * H * H, L * M * H, L * H * M}, {P * L * H, L * P * H, L * L * M}, {M * L * H, H * P * H, H * L …
[all …]
/petsc/src/ksp/ksp/impls/lcd/
H A Dlcd.c12 PetscCall(VecDuplicateVecs(ksp->work[0], restart + 1, &lcd->P)); in KSPSetUp_LCD()
73 PetscCall(VecCopy(R, lcd->P[0])); in KSPSolve_LCD()
77 PetscCall(KSP_MatMult(ksp, Amat, lcd->P[it], Z)); in KSPSolve_LCD()
82 PetscCall(VecDot(lcd->P[it], R, &num)); in KSPSolve_LCD()
83 PetscCall(VecDot(lcd->P[it], lcd->Q[it], &den)); in KSPSolve_LCD()
86 PetscCall(VecAXPY(X, alfa, lcd->P[it])); in KSPSolve_LCD()
100 PetscCall(VecCopy(R, lcd->P[it + 1])); in KSPSolve_LCD()
101 PetscCall(KSP_MatMult(ksp, Amat, lcd->P[it + 1], Z)); in KSPSolve_LCD()
105 PetscCall(VecDot(lcd->P[j], lcd->Q[it + 1], &num)); in KSPSolve_LCD()
107 PetscCall(VecDot(lcd->P[j], lcd->Q[j], &den)); in KSPSolve_LCD()
[all …]
/petsc/src/ts/tutorials/
H A Dex14.c81 #define P (0.5) macro
94 …{{M * H, M *H, M}, {P * H, 0, 0}, {0, 0, 0}, {0, P *H, 0}, {M * L, M *L, P}, {P * L,…
95 …{{M * H, 0, 0}, {P * H, M *H, M}, {0, P *H, 0}, {0, 0, 0}, {M * L, 0, 0}, {P * L,…
96 …0, 0}, {0, M *H, 0}, {P * H, P *H, M}, {M * H, 0, 0}, {0, 0, 0}, {0, M *L, 0}…
97 … {0, 0, 0}, {P * H, 0, 0}, {M * H, P *H, M}, {0, M *L, 0}, {0, 0, 0}, {P
98 …{{M * L, M *L, M}, {P * L, 0, 0}, {0, 0, 0}, {0, P *L, 0}, {M * H, M *H, P}, {P * H,…
99 …{{M * L, 0, 0}, {P * L, M *L, M}, {0, P *L, 0}, {0, 0, 0}, {M * H, 0, 0}, {P * H,…
100 …0, 0}, {0, M *L, 0}, {P * L, P *L, M}, {M * L, 0, 0}, {0, 0, 0}, {0, M *H, 0}…
101 … {0, 0, 0}, {P * L, 0, 0}, {M * L, P *L, M}, {0, M *H, 0}, {0, 0, 0}, {P
115P * H * H, L * M * H, L * H * M}, {P * L * H, L * P * H, L * L * M}, {M * L * H, H * P * H, H * L …
[all …]
/petsc/src/mat/impls/aij/seq/
H A Dmatptap.c18 Mat A = product->A, P = product->B; in MatProductSymbolic_PtAP_SeqAIJ_SeqAIJ() local
28 PetscCall(MatPtAPSymbolic_SeqAIJ_SeqAIJ_SparseAxpy(A, P, fill, C)); in MatProductSymbolic_PtAP_SeqAIJ_SeqAIJ()
39 PetscCall(MatTranspose(P, MAT_INITIAL_MATRIX, &Pt)); in MatProductSymbolic_PtAP_SeqAIJ_SeqAIJ()
40 PetscCall(MatMatMatMultSymbolic_SeqAIJ_SeqAIJ_SeqAIJ(Pt, A, P, fill, C)); in MatProductSymbolic_PtAP_SeqAIJ_SeqAIJ()
56 PetscCall(MatPtAPSymbolic_AIJ_AIJ_wHYPRE(A, P, fill, C)); in MatProductSymbolic_PtAP_SeqAIJ_SeqAIJ()
64 PetscErrorCode MatPtAPSymbolic_SeqAIJ_SeqAIJ_SparseAxpy(Mat A, Mat P, PetscReal fill, Mat C) in MatPtAPSymbolic_SeqAIJ_SeqAIJ_SparseAxpy() argument
67 Mat_SeqAIJ *a = (Mat_SeqAIJ *)A->data, *p = (Mat_SeqAIJ *)P->data, *c; in MatPtAPSymbolic_SeqAIJ_SeqAIJ_SparseAxpy()
70 PetscInt an = A->cmap->N, am = A->rmap->N, pn = P->cmap->N, pm = P->rmap->N; in MatPtAPSymbolic_SeqAIJ_SeqAIJ_SparseAxpy()
78 PetscCall(MatGetSymbolicTranspose_SeqAIJ(P, &pti, &ptj)); in MatPtAPSymbolic_SeqAIJ_SeqAIJ_SparseAxpy()
157 PetscCall(MatSetBlockSizes(C, P->cmap->bs, P->cmap->bs)); in MatPtAPSymbolic_SeqAIJ_SeqAIJ_SparseAxpy()
[all …]
/petsc/src/binding/petsc4py/demo/legacy/perftest/
H A DApp.f9023 real(kind=8), intent(in) :: P local
25 if (P >= 0.0) then
28 K = 1.0/(1+P**2)
33 real(kind=8), intent(in) :: P(-1:1) local
36 call evalK((P(-1)+P( 0))/2.0, Ka)
37 call evalK((P( 0)+P( 1))/2.0, Kb)
/petsc/share/petsc/datafiles/matrices/
H A Dtiny_system_with_x0.mat6 …�������������������������������������������������������������������������P���������������…
8P��������@�������?�������?�������@�������?�������?�������@�������?�������?�������@�������������…
10 ��������������������@���������������X������P��������������������������������������…
/petsc/src/mat/tests/output/
H A Dex94_2.out1 C = P^T * B:
9 C = P^T * B after MatProductClear():
17 C = P^T * A * P:
26 C = P^T * A * P after MatProductClear():
/petsc/src/ksp/pc/impls/galerkin/
H A Dgalerkin.c9 Mat R, P; member
23 PetscCall(MatRestrict(jac->P, x, jac->b)); in PCApply_Galerkin()
27 if (jac->P) { in PCApply_Galerkin()
28 PetscCall(MatInterpolate(jac->P, jac->x, y)); in PCApply_Galerkin()
63 …PetscCheck(jac->R || jac->P, PetscObjectComm((PetscObject)pc), PETSC_ERR_ARG_WRONGSTATE, "Must set… in PCSetUp_Galerkin()
74 PetscCall(MatDestroy(&jac->P)); in PCReset_Galerkin()
127 static PetscErrorCode PCGalerkinSetInterpolation_Galerkin(PC pc, Mat P) in PCGalerkinSetInterpolation_Galerkin() argument
132 PetscCall(PetscObjectReference((PetscObject)P)); in PCGalerkinSetInterpolation_Galerkin()
133 PetscCall(MatDestroy(&jac->P)); in PCGalerkinSetInterpolation_Galerkin()
134 jac->P = P; in PCGalerkinSetInterpolation_Galerkin()
[all …]

12345678910>>...12