Home
last modified time | relevance | path

Searched refs:J (Results 1 – 25 of 492) sorted by relevance

12345678910>>...20

/petsc/src/mat/tests/ !
H A Dex226.c14 PetscInt i, M, N, Istart, Iend, n = 7, j, J, Ii, m = 8, k, o = 1; in main() local
50 J = global_index(i - 1, j, k, m, n); in main()
51 PetscCall(MatSetValues(A, 1, &Ii, 1, &J, &v, INSERT_VALUES)); in main()
54 J = global_index(i + 1, j, k, m, n); in main()
55 PetscCall(MatSetValues(A, 1, &Ii, 1, &J, &v, INSERT_VALUES)); in main()
58 J = global_index(i, j - 1, k, m, n); in main()
59 PetscCall(MatSetValues(A, 1, &Ii, 1, &J, &v, INSERT_VALUES)); in main()
62 J = global_index(i, j + 1, k, m, n); in main()
63 PetscCall(MatSetValues(A, 1, &Ii, 1, &J, &v, INSERT_VALUES)); in main()
80 J = global_index(i - 1, j, k, m, n); in main()
[all …]
H A Dex10.c8 PetscInt i, j, m = 5, n = 2, Ii, J; in main() local
31 J = Ii - n; in main()
32 PetscCall(MatSetValues(C, 1, &Ii, 1, &J, &v, INSERT_VALUES)); in main()
35 J = Ii + n; in main()
36 PetscCall(MatSetValues(C, 1, &Ii, 1, &J, &v, INSERT_VALUES)); in main()
39 J = Ii - 1; in main()
40 PetscCall(MatSetValues(C, 1, &Ii, 1, &J, &v, INSERT_VALUES)); in main()
43 J = Ii + 1; in main()
44 PetscCall(MatSetValues(C, 1, &Ii, 1, &J, &v, INSERT_VALUES)); in main()
57 J = Ii - n; in main()
[all …]
/petsc/src/ts/tutorials/output/ !
H A Dex30_0_dirk_mg.out17 Testing hand-coded Jacobian, if (for double precision runs) ||J - Jfd||_F/||J||_F is
19 ||J - Jfd||_F/||J||_F = 7.63695e-14, ||J - Jfd||_F = 7.42506e-13
22 ||J - Jfd||_F/||J||_F = 0.999818, ||J - Jfd||_F = 7.
24 ||J - Jfd||_F/||J||_F = 0.998116, ||J - Jfd||_F = 4.
27 ||J - Jfd||_F/||J||_F = 1.79202e-08, ||J - Jfd||_F = 1.9319e-07
29 ||J - Jfd||_F/||J||_F = 7.71182e-09, ||J - Jfd||_F = 7.37102e-08
32 ||J - Jfd||_F/||J||_F = 1.82401e-08, ||J - Jfd||_F = 1.88314e-07
34 ||J - Jfd||_F/||J||_F = 7.51701e-09, ||J - Jfd||_F = 7.11916e-08
H A Dex30_0_p4est_mg.out17 Testing hand-coded Jacobian, if (for double precision runs) ||J - Jfd||_F/||J||_F is
19 ||J - Jfd||_F/||J||_F = 2.27208e-12, ||J - Jfd||_F = 4.24161e-11
22 ||J - Jfd||_F/||J||_F = 2.75773e-08, ||J - Jfd||_F = 5.15249e-07
24 ||J - Jfd||_F/||J||_F = 2.02598e-08, ||J - Jfd||_F = 1.98015e-07
26 ||J - Jfd||_F/||J||_F = 1.68913e-08, ||J - Jfd||_F = 8.00889e-08
H A Dex30_0_dirk_fieldsplit.out17 Testing hand-coded Jacobian, if (for double precision runs) ||J - Jfd||_F/||J||_F is
19 ||J - Jfd||_F/||J||_F = 7.63695e-14, ||J - Jfd||_F = 7.42506e-13
22 ||J - Jfd||_F/||J||_F = 0.999818, ||J - Jfd||_F = 7.
25 ||J - Jfd||_F/||J||_F = 1.78926e-08, ||J - Jfd||_F = 1.92892e-07
28 ||J - Jfd||_F/||J||_F = 1.82468e-08, ||J - Jfd||_F = 1.89051e-07
H A Dex30_0_dirk.out17 Testing hand-coded Jacobian, if (for double precision runs) ||J - Jfd||_F/||J||_F is
19 ||J - Jfd||_F/||J||_F = 7.63695e-14, ||J - Jfd||_F = 7.42506e-13
22 ||J - Jfd||_F/||J||_F = 0.999818, ||J - Jfd||_F = 7.
25 ||J - Jfd||_F/||J||_F = 1.79e-08, ||J - Jfd||_F = 1.92973e-07
28 ||J - Jfd||_F/||J||_F = 1.82482e-08, ||J - Jfd||_F = 1.88397e-07
/petsc/src/ts/tutorials/autodiff/adolc-utils/ !
H A Ddrivers.cxx35 PetscScalar **J; in PetscAdolcComputeRHSJacobian() local
38 PetscCall(AdolcMalloc2(m, p, &J)); in PetscAdolcComputeRHSJacobian()
39 if (adctx->Seed) fov_forward(tag, m, n, p, u_vec, adctx->Seed, NULL, J); in PetscAdolcComputeRHSJacobian()
40 else jacobian(tag, m, n, u_vec, J); in PetscAdolcComputeRHSJacobian()
42 PetscCall(RecoverJacobian(A, INSERT_VALUES, m, p, adctx->Rec, J, NULL)); in PetscAdolcComputeRHSJacobian()
46 … if (fabs(J[i][j]) > 1.e-16) PetscCall(MatSetValues(A, 1, &i, 1, &j, &J[i][j], INSERT_VALUES)); in PetscAdolcComputeRHSJacobian()
50 PetscCall(AdolcFree2(J)); in PetscAdolcComputeRHSJacobian()
73 PetscScalar **J; in PetscAdolcComputeRHSJacobianLocal() local
76 PetscCall(AdolcMalloc2(m, p, &J)); in PetscAdolcComputeRHSJacobianLocal()
77 if (adctx->Seed) fov_forward(tag, m, n, p, u_vec, adctx->Seed, NULL, J); in PetscAdolcComputeRHSJacobianLocal()
[all …]
/petsc/src/dm/field/interface/ !
H A Ddmfield.c454 PetscCall(DMFieldEvaluateFE(field, pointIS, quad, PETSC_REAL, g->v, g->J, NULL)); in DMFieldCreateFEGeom()
461 PetscReal J[16] = {0}; in DMFieldCreateFEGeom() local
464 for (k = 0; k < dim; k++) J[j * dE + k] = g->J[i * dE * dim + j * dim + k]; in DMFieldCreateFEGeom()
469 for (k = 0; k < dE; k++) J[j * dE + k] = (j == k) ? 1. : 0.; in DMFieldCreateFEGeom()
474 PetscReal norm = PetscSqrtReal(J[0] * J[0] + J[2] * J[2]); in DMFieldCreateFEGeom()
476 J[1] = -J[2] / norm; in DMFieldCreateFEGeom()
477 J[3] = J[0] / norm; in DMFieldCreateFEGeom()
479 PetscReal inorm = 1. / PetscSqrtReal(J[0] * J[0] + J[3] * J[3] + J[6] * J[6]); in DMFieldCreateFEGeom()
480 PetscReal x = J[0] * inorm; in DMFieldCreateFEGeom()
481 PetscReal y = J[3] * inorm; in DMFieldCreateFEGeom()
[all …]
/petsc/src/snes/mf/ !
H A Dsnesmfj.c65 PetscErrorCode MatSNESMFGetSNES(Mat J, SNES *snes) in MatSNESMFGetSNES() argument
70 PetscCall(MatShellGetContext(J, &j)); in MatSNESMFGetSNES()
80 static PetscErrorCode MatAssemblyEnd_SNESMF(Mat J, MatAssemblyType mt) in MatAssemblyEnd_SNESMF() argument
89 PetscCall(MatShellGetContext(J, &j)); in MatAssemblyEnd_SNESMF()
91 PetscCall(MatAssemblyEnd_MFFD(J, mt)); in MatAssemblyEnd_SNESMF()
98 PetscCall(MatMFFDSetBase_MFFD(J, u, f)); in MatAssemblyEnd_SNESMF()
101 PetscCall(MatMFFDSetBase_MFFD(J, u, NULL)); in MatAssemblyEnd_SNESMF()
112 static PetscErrorCode MatAssemblyEnd_SNESMF_UseBase(Mat J, MatAssemblyType mt) in MatAssemblyEnd_SNESMF_UseBase() argument
119 PetscCall(MatAssemblyEnd_MFFD(J, mt)); in MatAssemblyEnd_SNESMF_UseBase()
120 PetscCall(MatShellGetContext(J, &j)); in MatAssemblyEnd_SNESMF_UseBase()
[all …]
/petsc/src/ts/tutorials/autodiff/output/ !
H A Dadr_ex5adj_2.out4 Testing hand-coded Jacobian, if (for double precision runs) ||J - Jfd||_F/||J||_F is
6 ||J - Jfd||_F/||J||_F = 1.32937e-08, ||J - Jfd||_F = 9.15765e-07
8 ||J - Jfd||_F/||J||_F = 1.32668e-08, ||J - Jfd||_F = 9.13916e-07
10 ||J - Jfd||_F/||J||_F = 1.32465e-08, ||J - Jfd||_F = 9.12519e-07
12 ||J - Jfd||_F/||J||_F = 4.53158e-05, ||J - Jfd||_F = 0.00303076
H A Dadr_ex5adj_mf_1.out4 Testing hand-coded Jacobian, if (for double precision runs) ||J - Jfd||_F/||J||_F is
6 ||J - Jfd||_F/||J||_F = 1.32937e-08, ||J - Jfd||_F = 9.15765e-07
8 ||J - Jfd||_F/||J||_F = 1.32606e-08, ||J - Jfd||_F = 9.1349e-07
10 ||J - Jfd||_F/||J||_F = 1.32462e-08, ||J - Jfd||_F = 9.12495e-07
12 ||J - Jfd||_F/||J||_F = 4.53272e-05, ||J - Jfd||_F = 0.00303152
H A Dadr_ex5adj_1.out4 Testing hand-coded Jacobian, if (for double precision runs) ||J - Jfd||_F/||J||_F is
6 ||J - Jfd||_F/||J||_F = 1.32937e-08, ||J - Jfd||_F = 9.15765e-07
8 ||J - Jfd||_F/||J||_F = 1.32668e-08, ||J - Jfd||_F = 9.13916e-07
10 ||J - Jfd||_F/||J||_F = 1.32465e-08, ||J - Jfd||_F = 9.12519e-07
12 ||J - Jfd||_F/||J||_F = 4.53613e-05, ||J - Jfd||_F = 0.0030338
/petsc/src/tao/interface/ !
H A Dtaosolver_hj.c295 PetscErrorCode TaoComputeJacobian(Tao tao, Vec X, Mat J, Mat Jpre) in TaoComputeJacobian() argument
303 PetscCall(PetscLogEventBegin(TAO_JacobianEval, tao, X, J, Jpre)); in TaoComputeJacobian()
304 …PetscCallBack("Tao callback Jacobian", (*tao->ops->computejacobian)(tao, X, J, Jpre, tao->user_jac… in TaoComputeJacobian()
305 PetscCall(PetscLogEventEnd(TAO_JacobianEval, tao, X, J, Jpre)); in TaoComputeJacobian()
336 PetscErrorCode TaoComputeResidualJacobian(Tao tao, Vec X, Mat J, Mat Jpre) in TaoComputeResidualJacobian() argument
344 PetscCall(PetscLogEventBegin(TAO_JacobianEval, tao, X, J, Jpre)); in TaoComputeResidualJacobian()
345 …st-squares residual Jacobian", (*tao->ops->computeresidualjacobian)(tao, X, J, Jpre, tao->user_lsj… in TaoComputeResidualJacobian()
346 PetscCall(PetscLogEventEnd(TAO_JacobianEval, tao, X, J, Jpre)); in TaoComputeResidualJacobian()
374 PetscErrorCode TaoComputeJacobianState(Tao tao, Vec X, Mat J, Mat Jpre, Mat Jinv) in TaoComputeJacobianState() argument
382 PetscCall(PetscLogEventBegin(TAO_JacobianEval, tao, X, J, Jpre)); in TaoComputeJacobianState()
[all …]
/petsc/src/binding/petsc4py/test/ !
H A Dtest_ts.py29 def rhsjacobian(self, ts, t, u, J, P): argument
36 if J != P:
37 J.assemble()
46 def ijacobian(self, ts, t, u, du, a, J, P): argument
53 if J != P:
54 J.assemble()
92 J = PETSc.Mat().create(ts.comm)
93 J.setSizes(3)
94 J.setFromOptions()
95 J.setUp()
[all …]
/petsc/src/tao/tutorials/output/ !
H A Dex4_0.out1 J(xhat): 24.5106, predicted: 0.851231, diff 23.6594
2 J(xhat): 6.76613, predicted: 0.851288, diff 5.91484
3 J(xhat): 2.33003, predicted: 0.851317, diff 1.47871
4 J(xhat): 1.22101, predicted: 0.851331, diff 0.369677
5 J(xhat): 0.943758, predicted: 0.851338, diff 0.0924194
6 J(xhat): 0.874447, predicted: 0.851342, diff 0.0231048
7 J(xhat): 0.85712, predicted: 0.851344, diff 0.00577621
8 J(xhat): 0.852789, predicted: 0.851344, diff 0.00144405
9 J(xhat): 0.851706, predicted: 0.851345, diff 0.000361013
10 J(xhat): 0.851435, predicted: 0.851345, diff 9.02533e-05
H A Dex4_hessian_2.out4 J(xhat): 98.3926, predicted: 4.22724, diff 94.1653
5 J(xhat): 27.7686, predicted: 4.22724, diff 23.5413
6 J(xhat): 10.1126, predicted: 4.22724, diff 5.88533
7 J(xhat): 5.69858, predicted: 4.22724, diff 1.47133
8 J(xhat): 4.59508, predicted: 4.22724, diff 0.367834
9 J(xhat): 4.3192, predicted: 4.22724, diff 0.0919585
10 J(xhat): 4.25023, predicted: 4.22724, diff 0.0229897
11 J(xhat): 4.23299, predicted: 4.22724, diff 0.00574732
12 J(xhat): 4.22868, predicted: 4.22724, diff 0.00143671
13 J(xhat): 4.2276, predicted: 4.22724, diff 0.000359058
H A Dex4_hessian_admm_2.out8 J(xhat): 98.3926, predicted: 4.22724, diff 94.1653
9 J(xhat): 27.7686, predicted: 4.22724, diff 23.5413
10 J(xhat): 10.1126, predicted: 4.22724, diff 5.88533
11 J(xhat): 5.69858, predicted: 4.22724, diff 1.47133
12 J(xhat): 4.59508, predicted: 4.22724, diff 0.367833
13 J(xhat): 4.3192, predicted: 4.22724, diff 0.0919583
14 J(xhat): 4.25023, predicted: 4.22724, diff 0.0229896
15 J(xhat): 4.23299, predicted: 4.22724, diff 0.0057474
16 J(xhat): 4.22868, predicted: 4.22724, diff 0.00143685
17 J(xhat): 4.2276, predicted: 4.22724, diff 0.000359212
H A Dex4_lmvm_admm_2.out8 J(xhat): 98.3926, predicted: 4.22724, diff 94.1653
9 J(xhat): 27.7686, predicted: 4.22724, diff 23.5413
10 J(xhat): 10.1126, predicted: 4.22724, diff 5.88533
11 J(xhat): 5.69858, predicted: 4.22724, diff 1.47133
12 J(xhat): 4.59508, predicted: 4.22724, diff 0.367833
13 J(xhat): 4.3192, predicted: 4.22724, diff 0.0919583
14 J(xhat): 4.25023, predicted: 4.22724, diff 0.0229896
15 J(xhat): 4.23299, predicted: 4.22724, diff 0.0057474
16 J(xhat): 4.22868, predicted: 4.22724, diff 0.00143685
17 J(xhat): 4.2276, predicted: 4.22724, diff 0.000359212
H A Dex4_nm_admm_2.out8 J(xhat): 98.3842, predicted: 4.21886, diff 94.1653
9 J(xhat): 27.7644, predicted: 4.22306, diff 23.5413
10 J(xhat): 10.1105, predicted: 4.22516, diff 5.88533
11 J(xhat): 5.69755, predicted: 4.22621, diff 1.47133
12 J(xhat): 4.59457, predicted: 4.22674, diff 0.367833
13 J(xhat): 4.31896, predicted: 4.227, diff 0.0919583
14 J(xhat): 4.25012, predicted: 4.22713, diff 0.0229896
15 J(xhat): 4.23295, predicted: 4.2272, diff 0.0057474
16 J(xhat): 4.22867, predicted: 4.22723, diff 0.00143685
17 J(xhat): 4.22761, predicted: 4.22725, diff 0.000359212
H A Dex4_soft_threshold_admm_1.out11 J(xhat): 113.626, predicted: 16.5257, diff 97.1007
12 J(xhat): 42.3779, predicted: 13.8019, diff 28.576
13 J(xhat): 21.7055, predicted: 12.44, diff 9.26546
14 J(xhat): 15.1072, predicted: 11.759, diff 3.34818
15 J(xhat): 12.7449, predicted: 11.4186, diff 1.32637
16 J(xhat): 11.801, predicted: 11.2483, diff 0.55267
17 J(xhat): 11.3905, predicted: 11.1632, diff 0.227268
18 J(xhat): 11.2058, predicted: 11.1206, diff 0.0851946
19 J(xhat): 11.1289, predicted: 11.0994, diff 0.0295115
20 J(xhat): 11.1013, predicted: 11.0887, diff 0.0125992
H A Dex4_nm_admm_1.out11 J(xhat): 112.879, predicted: 9.66734, diff 103.212
12 J(xhat): 41.9672, predicted: 10.4993, diff 31.4679
13 J(xhat): 21.4653, predicted: 10.9153, diff 10.55
14 J(xhat): 14.9669, predicted: 11.1233, diff 3.84363
15 J(xhat): 12.6557, predicted: 11.2273, diff 1.42842
16 J(xhat): 11.7559, predicted: 11.2793, diff 0.476597
17 J(xhat): 11.4357, predicted: 11.3053, diff 0.130448
18 J(xhat): 11.3475, predicted: 11.3183, diff 0.0292416
19 J(xhat): 11.3309, predicted: 11.3248, diff 0.00615894
20 J(xhat): 11.3306, predicted: 11.328, diff 0.00255596
H A Dex4_lmvm_admm_1.out11 J(xhat): 113.776, predicted: 9.65716, diff 104.119
12 J(xhat): 42.424, predicted: 10.6285, diff 31.7955
13 J(xhat): 21.7109, predicted: 11.1142, diff 10.5968
14 J(xhat): 15.0924, predicted: 11.357, diff 3.73537
15 J(xhat): 12.7926, predicted: 11.4784, diff 1.3142
16 J(xhat): 11.9717, predicted: 11.5391, diff 0.432627
17 J(xhat): 11.7068, predicted: 11.5695, diff 0.137322
18 J(xhat): 11.6271, predicted: 11.5846, diff 0.0424309
19 J(xhat): 11.6049, predicted: 11.5922, diff 0.0127121
20 J(xhat): 11.5994, predicted: 11.596, diff 0.00334437
/petsc/src/binding/petsc4py/demo/legacy/ode/ !
H A Dbouncing_ball.py27 J = A
28 J[0, 0] = 0.0
29 J[1, 0] = 0.0
30 J[0, 1] = 1.0
31 J[1, 1] = 0.0
32 J.assemble()
47 J = PETSc.Mat().create() variable
48 J.setSizes([ode.n, ode.n])
49 J.setType('aij')
50 J.setUp()
[all …]
/petsc/src/ksp/ksp/tutorials/ !
H A Dex5.c25 PetscInt Ii, J, ldim, low, high, iglobal, Istart, Iend; in main() local
91 J = Ii - n; in main()
92 PetscCall(MatSetValues(C, 1, &Ii, 1, &J, &v, ADD_VALUES)); in main()
95 J = Ii + n; in main()
96 PetscCall(MatSetValues(C, 1, &Ii, 1, &J, &v, ADD_VALUES)); in main()
99 J = Ii - 1; in main()
100 PetscCall(MatSetValues(C, 1, &Ii, 1, &J, &v, ADD_VALUES)); in main()
103 J = Ii + 1; in main()
104 PetscCall(MatSetValues(C, 1, &Ii, 1, &J, &v, ADD_VALUES)); in main()
118 J = Ii - n - 1; in main()
[all …]
/petsc/src/ts/tutorials/ !
H A Dex36.c77 PetscScalar J[5][5]; in IJacobianImplicit() local
83 PetscCall(PetscMemzero(J, sizeof(J))); in IJacobianImplicit()
85 J[0][0] = a / 1.e6 + 0.001; in IJacobianImplicit()
86 J[0][1] = -a / 1.e6; in IJacobianImplicit()
87 J[1][0] = -a / 1.e6; in IJacobianImplicit()
88 J[1][1] = a / 1.e6 + 0.00022222222222222223 + PetscExpReal((500 * (y[1] - y[2])) / 13.) / 2.6e6; in IJacobianImplicit()
89 J[1][2] = -PetscExpReal((500 * (y[1] - y[2])) / 13.) / 2.6e6; in IJacobianImplicit()
90 J[2][1] = -PetscExpReal((500 * (y[1] - y[2])) / 13.) / 26000.; in IJacobianImplicit()
91J[2][2] = a / 500000 + 0.00011111111111111112 + PetscExpReal((500 * (y[1] - y[2])) / 13.) / 26000.; in IJacobianImplicit()
92 J[3][1] = (99 * PetscExpReal((500 * (y[1] - y[2])) / 13.)) / 2.6e6; in IJacobianImplicit()
[all …]

12345678910>>...20