Home
last modified time | relevance | path

Searched refs:X (Results 1 – 25 of 686) sorted by relevance

12345678910>>...28

/petsc/doc/overview/
H A Dlinear_solve_table.md25 - X
26 - X
32 - X
33 - X
39 - X
40 - X
46 - X
47 - X
53 - X
54 - X
[all …]
H A Dtao_solve_table.md22 - X
29 - X
30 - X
36 - X
37 - X
43 - X
44 - X
50 - X
51 - X
57 - X
[all …]
/petsc/src/sys/utils/
H A Dsorti.c68 #define TwoWayPartition1(X, pivot, t1, lo, hi, l, r) \ argument
73 while (X[l] < pivot) l++; \
74 while (X[r] > pivot) r--; \
79 SWAP1(X[l], X[r], t1); \
101 #define TwoWayPartitionReverse1(X, pivot, t1, lo, hi, l, r) \ argument
106 while (X[l] > pivot) l++; \
107 while (X[r] < pivot) r--; \
112 SWAP1(X[l], X[r], t1); \
118 #define TwoWayPartition2(X, Y, pivot, t1, t2, lo, hi, l, r) \ argument
123 while (X[l] < pivot) l++; \
[all …]
/petsc/share/petsc/datafiles/meshes/
H A Dhybrid_hexwedge.msh13 …�Y�4����������@�������@������Y�5����������@�����@�@������Y�6��������@�@�����X�@������Y�7����������…
14X�@�������@������Y�>����������@�������@������Y�?��������|�@�����@�@������Y�@��������|�@�����@�@���…
/petsc/src/snes/tutorials/
H A Dex76.c82 static PetscErrorCode quadratic_u(PetscInt Dim, PetscReal time, const PetscReal X[], PetscInt Nf, P… in quadratic_u() argument
84 u[0] = X[0] * X[0] + X[1] * X[1]; in quadratic_u()
85 u[1] = 2.0 * X[0] * X[0] - 2.0 * X[0] * X[1]; in quadratic_u()
89 static PetscErrorCode linear_p(PetscInt Dim, PetscReal time, const PetscReal X[], PetscInt Nf, Pets… in linear_p() argument
91 p[0] = X[0] + X[1] - 1.0; in linear_p()
95 static PetscErrorCode linear_T(PetscInt Dim, PetscReal time, const PetscReal X[], PetscInt Nf, Pets… in linear_T() argument
97 T[0] = X[0] + X[1]; in linear_T()
101 …st PetscScalar a_t[], const PetscScalar a_x[], PetscReal t, const PetscReal X[], PetscInt numConst… in f0_quadratic_v() argument
110 …f0[0] -= (2 * X[0] * X[0] * X[0] + 4 * X[0] * X[0] * X[1] - 2 * X[0] * X[1] * X[1] - 4.0 * nu + 1); in f0_quadratic_v()
111 …f0[1] -= (4 * X[0] * X[1] * X[1] + 2 * X[0] * X[0] * X[1] - 2 * X[1] * X[1] * X[1] - 4.0 * nu + 1); in f0_quadratic_v()
[all …]
/petsc/src/ts/tutorials/
H A Dex76.c145 static PetscErrorCode quadratic_u(PetscInt Dim, PetscReal time, const PetscReal X[], PetscInt Nf, P… in quadratic_u() argument
147 u[0] = time + X[0] * X[0] + X[1] * X[1]; in quadratic_u()
148 u[1] = time + 2.0 * X[0] * X[0] - 2.0 * X[0] * X[1]; in quadratic_u()
151 static PetscErrorCode quadratic_u_t(PetscInt Dim, PetscReal time, const PetscReal X[], PetscInt Nf,… in quadratic_u_t() argument
158 static PetscErrorCode quadratic_p(PetscInt Dim, PetscReal time, const PetscReal X[], PetscInt Nf, P… in quadratic_p() argument
160 p[0] = X[0] + X[1] - 1.0; in quadratic_p()
164 static PetscErrorCode quadratic_T(PetscInt Dim, PetscReal time, const PetscReal X[], PetscInt Nf, P… in quadratic_T() argument
166 T[0] = time + X[0] + X[1] + 1.0; in quadratic_T()
169 static PetscErrorCode quadratic_T_t(PetscInt Dim, PetscReal time, const PetscReal X[], PetscInt Nf,… in quadratic_T_t() argument
175 …st PetscScalar a_t[], const PetscScalar a_x[], PetscReal t, const PetscReal X[], PetscInt numConst… in f0_quadratic_v() argument
[all …]
/petsc/src/vec/vec/tests/
H A Dex38.c8 Vec X, Y, Z, W; in main() local
23 PetscCall(VecCreate(comm, &X)); in main()
24 PetscCall(VecSetSizes(X, 10, PETSC_DETERMINE)); in main()
25 PetscCall(VecSetFromOptions(X)); in main()
26 PetscCall(VecGetOwnershipRange(X, &rstart, &rend)); in main()
28 PetscCall(VecGetArray(X, &x)); in main()
30 PetscCall(VecRestoreArray(X, &x)); in main()
31 PetscCall(PetscObjectTypeCompareAny((PetscObject)X, &iscuda, VECSEQCUDA, VECMPICUDA, "")); in main()
35 PetscCall(VecCUDAGetArrayRead(X, &xx)); in main()
36 PetscCall(VecCUDARestoreArrayRead(X, &xx)); in main()
[all …]
H A Dex41.c7 Vec X, Y, a, b; in test_vec_ops() local
72 PetscCall(VecCreateNest(PETSC_COMM_WORLD, 2, NULL, tmp_buf, &X)); in test_vec_ops()
73 PetscCall(VecView(X, PETSC_VIEWER_STDOUT_WORLD)); in test_vec_ops()
74 PetscCall(VecDot(X, X, &val)); in test_vec_ops()
79 PetscCall(VecNestSetSubVec(X, 1, a)); in test_vec_ops()
80 PetscCall(VecNestSetSubVec(X, 0, b)); in test_vec_ops()
81 PetscCall(VecAssemblyBegin(X)); in test_vec_ops()
82 PetscCall(VecAssemblyEnd(X)); in test_vec_ops()
83 PetscCall(VecView(X, PETSC_VIEWER_STDOUT_WORLD)); in test_vec_ops()
84 PetscCall(VecDot(X, X, &val)); in test_vec_ops()
[all …]
H A Dex37.c22 PetscErrorCode convert_from_nest(Vec X, Vec *Y) in convert_from_nest() argument
28 PetscCall(VecGetLocalSize(X, &n)); in convert_from_nest()
29 PetscCall(VecGetSize(X, &N)); in convert_from_nest()
30 PetscCall(VecGetOwnershipRange(X, &rstart, NULL)); in convert_from_nest()
31 PetscCall(VecCreate(PetscObjectComm((PetscObject)X), Y)); in convert_from_nest()
34 PetscCall(VecGetArrayRead(X, &v)); in convert_from_nest()
36 PetscCall(VecRestoreArrayRead(X, &v)); in convert_from_nest()
44 Vec X, lX, a, b; in test_view() local
94 PetscCall(VecCreateNest(PETSC_COMM_WORLD, 2, tmp_is, tmp_buf, &X)); in test_view()
98 PetscCall(VecCreateNest(PETSC_COMM_WORLD, 2, NULL, tmp_buf, &X)); in test_view()
[all …]
/petsc/src/tao/interface/
H A Dfdiff.c9 static PetscErrorCode Fsnes(SNES snes, Vec X, Vec G, PetscCtx ctx) in Fsnes() argument
15 PetscCall(TaoComputeGradient(tao, X, G)); in Fsnes()
51 Vec X; in TaoDefaultComputeGradient() local
60 PetscCall(VecDuplicate(Xin, &X)); in TaoDefaultComputeGradient()
61 PetscCall(VecCopy(Xin, X)); in TaoDefaultComputeGradient()
62 PetscCall(VecGetSize(X, &N)); in TaoDefaultComputeGradient()
63 PetscCall(VecGetOwnershipRange(X, &low, &high)); in TaoDefaultComputeGradient()
64 PetscCall(VecSetOption(X, VEC_IGNORE_OFF_PROC_ENTRIES, PETSC_TRUE)); in TaoDefaultComputeGradient()
67 PetscCall(VecSetValue(X, i, -h, ADD_VALUES)); in TaoDefaultComputeGradient()
68 PetscCall(VecAssemblyBegin(X)); in TaoDefaultComputeGradient()
[all …]
H A Dtaosolver_fg.c127 PetscErrorCode TaoComputeGradient(Tao tao, Vec X, Vec G) in TaoComputeGradient() argument
133 PetscValidHeaderSpecific(X, VEC_CLASSID, 2); in TaoComputeGradient()
135 PetscCheckSameComm(tao, 1, X, 2); in TaoComputeGradient()
137 PetscCall(VecLockReadPush(X)); in TaoComputeGradient()
139 PetscCall(PetscLogEventBegin(TAO_GradientEval, tao, X, G, NULL)); in TaoComputeGradient()
140 … PetscCallBack("Tao callback gradient", (*tao->ops->computegradient)(tao, X, G, tao->user_gradP)); in TaoComputeGradient()
141 PetscCall(PetscLogEventEnd(TAO_GradientEval, tao, X, G, NULL)); in TaoComputeGradient()
144 PetscCall(PetscLogEventBegin(TAO_ObjGradEval, tao, X, G, NULL)); in TaoComputeGradient()
145 …callback objective/gradient", (*tao->ops->computeobjectiveandgradient)(tao, X, &dummy, G, tao->use… in TaoComputeGradient()
146 PetscCall(PetscLogEventEnd(TAO_ObjGradEval, tao, X, G, NULL)); in TaoComputeGradient()
[all …]
H A Dtaosolver_hj.c250 PetscErrorCode TaoComputeHessian(Tao tao, Vec X, Mat H, Mat Hpre) in TaoComputeHessian() argument
254 PetscValidHeaderSpecific(X, VEC_CLASSID, 2); in TaoComputeHessian()
255 PetscCheckSameComm(tao, 1, X, 2); in TaoComputeHessian()
259 PetscCall(VecLockReadPush(X)); in TaoComputeHessian()
260 PetscCall(PetscLogEventBegin(TAO_HessianEval, tao, X, H, Hpre)); in TaoComputeHessian()
261 …PetscCallBack("Tao callback Hessian", (*tao->ops->computehessian)(tao, X, H, Hpre, tao->user_hessP… in TaoComputeHessian()
262 PetscCall(PetscLogEventEnd(TAO_HessianEval, tao, X, H, Hpre)); in TaoComputeHessian()
263 PetscCall(VecLockReadPop(X)); in TaoComputeHessian()
295 PetscErrorCode TaoComputeJacobian(Tao tao, Vec X, Mat J, Mat Jpre) in TaoComputeJacobian() argument
299 PetscValidHeaderSpecific(X, VEC_CLASSID, 2); in TaoComputeJacobian()
[all …]
/petsc/src/vec/vec/tutorials/output/
H A Dex44_serial.out1 Original X[0] vector
6 Original X[1] vector
13 Original X[2] vector
38 Testing VecConcatenate() for Y = [X[1], X[2], ...]
55 Testing VecConcatenate() for Y = [X[1], X[2], ...] w/o IS
72 Testing index set for X[0] component
78 Testing index set for X[1] component
86 Testing index set for X[2] component
97 Testing VecScatter for Y -> X[0]
103 Testing VecScatter for Y -> X[1]
[all …]
H A Dex44_parallel.out1 Original X[0] vector
8 Original X[1] vector
17 Original X[2] vector
46 Testing VecConcatenate() for Y = [X[1], X[2], ...]
65 Testing VecConcatenate() for Y = [X[1], X[2], ...] w/o IS
84 Testing index set for X[0] component
92 Testing index set for X[1] component
102 Testing index set for X[2] component
115 Testing VecScatter for Y -> X[0]
123 Testing VecScatter for Y -> X[1]
[all …]
H A Dex44_cuda.out1 Original X[0] vector
8 Original X[1] vector
17 Original X[2] vector
46 Testing VecConcatenate() for Y = [X[1], X[2], ...]
65 Testing VecConcatenate() for Y = [X[1], X[2], ...] w/o IS
84 Testing index set for X[0] component
92 Testing index set for X[1] component
102 Testing index set for X[2] component
115 Testing VecScatter for Y -> X[0]
123 Testing VecScatter for Y -> X[1]
[all …]
H A Dex44_uneven.out1 Original X[0] vector
11 Original X[1] vector
23 Original X[2] vector
58 Testing VecConcatenate() for Y = [X[1], X[2], ...]
80 Testing VecConcatenate() for Y = [X[1], X[2], ...] w/o IS
102 Testing index set for X[0] component
113 Testing index set for X[1] component
126 Testing index set for X[2] component
142 Testing VecScatter for Y -> X[0]
153 Testing VecScatter for Y -> X[1]
[all …]
/petsc/src/binding/petsc4py/demo/regressor/
H A Dtest_regressor_synthetic.py54 X = PETSc.Mat().create(comm=comm)
55 X.setSizes((ntr,nfeature))
56 X.setFromOptions()
57 X.setUp()
62 X.setValues(rows_ix,cols_ix,x_train,addv=True)
64 X.assemblyBegin(X.AssemblyType.FINAL)
65 X.assemblyEnd(X.AssemblyType.FINAL)
68 regressor.fit(X,y)
70 X = PETSc.Mat().create(comm=comm)
71 X.setSizes((nte,nfeature))
[all …]
H A Dtest_regressor.py25 X = PETSc.Mat().create(comm=comm) variable
26 X.setSizes((5,2))
27 X.setFromOptions()
28 X.setUp()
35 X.setValues(rows_ix,cols_ix,X_array,addv=True)
38 X.assemblyBegin(X.AssemblyType.FINAL)
39 X.assemblyEnd(X.AssemblyType.FINAL)
47 regressor.fit(X,y)
48 regressor.predict(X,y_predicted)
/petsc/src/ts/tutorials/autodiff/output/
H A Dex16adj_tl_4.out1 [0.0] 0 TS 0.000000 (dt = 0.001000) X 2.000000e+00 6.666665e-01
3 [0.0] 1 TS 0.001000 (dt = 0.010000) X 2.000661e+00 6.547514e-01
5 [0.0] 2 TS 0.011000 (dt = 0.016177) X 2.006645e+00 5.445146e-01
7 [0.0] 3 TS 0.027177 (dt = 0.016648) X 2.014218e+00 3.968080e-01
9 [0.0] 4 TS 0.043825 (dt = 0.017145) X 2.019797e+00 2.776374e-01
11 [0.0] 5 TS 0.060970 (dt = 0.017912) X 2.023712e+00 1.825358e-01
13 [0.0] 6 TS 0.078882 (dt = 0.018977) X 2.026275e+00 1.065290e-01
15 [0.0] 7 TS 0.097860 (dt = 0.020389) X 2.027699e+00 4.593217e-02
17 [0.0] 8 TS 0.118249 (dt = 0.022264) X 2.028126e+00 -2.056025e-03
19 [0.0] 9 TS 0.140512 (dt = 0.025316) X 2.027642e+00 -3.968406e-02
[all …]
H A Dex16adj_4.out1 [0.0] 0 TS 0.000000 (dt = 0.001000) X 2.000000e+00 6.666665e-01
3 [0.0] 1 TS 0.001000 (dt = 0.010000) X 2.000661e+00 6.547514e-01
5 [0.0] 2 TS 0.011000 (dt = 0.016177) X 2.006645e+00 5.445146e-01
7 [0.0] 3 TS 0.027177 (dt = 0.016648) X 2.014218e+00 3.968080e-01
9 [0.0] 4 TS 0.043825 (dt = 0.017145) X 2.019797e+00 2.776374e-01
11 [0.0] 5 TS 0.060970 (dt = 0.017912) X 2.023712e+00 1.825358e-01
13 [0.0] 6 TS 0.078882 (dt = 0.018977) X 2.026275e+00 1.065290e-01
15 [0.0] 7 TS 0.097860 (dt = 0.020389) X 2.027699e+00 4.593217e-02
17 [0.0] 8 TS 0.118249 (dt = 0.022264) X 2.028126e+00 -2.056025e-03
19 [0.0] 9 TS 0.140512 (dt = 0.025316) X 2.027642e+00 -3.968406e-02
[all …]
H A Dex16adj_3.out1 [0.0] 0 TS 0.000000 (dt = 0.001000) X 2.000000e+00 6.666665e-01
3 [0.0] 1 TS 0.001000 (dt = 0.010000) X 2.000665e+00 6.626713e-01
5 [0.0] 2 TS 0.011000 (dt = 0.100000) X 2.007093e+00 6.232460e-01
7 [0.0] 3 TS 0.111000 (dt = 0.098814) X 2.051627e+00 2.812693e-01
9 [0.0] 4 TS 0.180295 (dt = 0.069780) X 2.064523e+00 9.686974e-02
11 [0.0] 5 TS 0.250074 (dt = 0.066517) X 2.065921e+00 -5.185673e-02
13 [0.0] 6 TS 0.316592 (dt = 0.069943) X 2.058582e+00 -1.651964e-01
15 [0.0] 7 TS 0.386535 (dt = 0.056733) X 2.043583e+00 -2.605919e-01
17 [0.0] 8 TS 0.443267 (dt = 0.056733) X 2.026958e+00 -3.238341e-01
19 [0.0] 9 TS 0.500000 (dt = 0.086591) X 2.007036e+00 -3.771526e-01
H A Dex16adj_tl_3.out1 [0.0] 0 TS 0.000000 (dt = 0.001000) X 2.000000e+00 6.666665e-01
3 [0.0] 1 TS 0.001000 (dt = 0.010000) X 2.000665e+00 6.626713e-01
5 [0.0] 2 TS 0.011000 (dt = 0.100000) X 2.007093e+00 6.232460e-01
7 [0.0] 3 TS 0.111000 (dt = 0.098814) X 2.051627e+00 2.812693e-01
9 [0.0] 4 TS 0.180295 (dt = 0.069780) X 2.064523e+00 9.686974e-02
11 [0.0] 5 TS 0.250074 (dt = 0.066517) X 2.065921e+00 -5.185673e-02
13 [0.0] 6 TS 0.316592 (dt = 0.069943) X 2.058582e+00 -1.651964e-01
15 [0.0] 7 TS 0.386535 (dt = 0.056733) X 2.043583e+00 -2.605919e-01
17 [0.0] 8 TS 0.443267 (dt = 0.056733) X 2.026958e+00 -3.238341e-01
19 [0.0] 9 TS 0.500000 (dt = 0.086591) X 2.007036e+00 -3.771526e-01
/petsc/src/tao/bound/utils/
H A Disutil.c184 PetscErrorCode TaoEstimateActiveBounds(Vec X, Vec XL, Vec XU, Vec G, Vec S, Vec W, PetscReal steple… in TaoEstimateActiveBounds() argument
193 MPI_Comm comm = PetscObjectComm((PetscObject)X); in TaoEstimateActiveBounds()
196 PetscValidHeaderSpecific(X, VEC_CLASSID, 1); in TaoEstimateActiveBounds()
203 if (XL) PetscCheckSameType(X, 1, XL, 2); in TaoEstimateActiveBounds()
204 if (XU) PetscCheckSameType(X, 1, XU, 3); in TaoEstimateActiveBounds()
205 PetscCheckSameType(X, 1, G, 4); in TaoEstimateActiveBounds()
206 PetscCheckSameType(X, 1, S, 5); in TaoEstimateActiveBounds()
207 PetscCheckSameType(X, 1, W, 6); in TaoEstimateActiveBounds()
208 if (XL) PetscCheckSameComm(X, 1, XL, 2); in TaoEstimateActiveBounds()
209 if (XU) PetscCheckSameComm(X, 1, XU, 3); in TaoEstimateActiveBounds()
[all …]
/petsc/src/mat/utils/
H A Daxpy.c3 static PetscErrorCode MatTransposeAXPY_Private(Mat Y, PetscScalar a, Mat X, MatStructure str, Mat T) in MatTransposeAXPY_Private() argument
10 …if (T == X) PetscCall(MatShellGetScalingShifts(T, &vshift, &vscale, (Vec *)MAT_SHELL_NOT_ALLOWED, … in MatTransposeAXPY_Private()
18 if (T == X) { in MatTransposeAXPY_Private()
24 PetscCall(MatTranspose(X, MAT_INITIAL_MATRIX, &F)); in MatTransposeAXPY_Private()
28 if (T == X) { in MatTransposeAXPY_Private()
34 PetscCall(MatHermitianTranspose(X, MAT_INITIAL_MATRIX, &F)); in MatTransposeAXPY_Private()
43 static PetscErrorCode MatAXPY_BasicWithTypeCompare(Mat Y, PetscScalar a, Mat X, MatStructure str) in MatAXPY_BasicWithTypeCompare() argument
54 PetscCall((*f)(Y, a, X, str)); in MatAXPY_BasicWithTypeCompare()
61 PetscCall(PetscObjectTypeCompare((PetscObject)X, MATNEST, &flg)); in MatAXPY_BasicWithTypeCompare()
63 PetscCall(MatAXPY_Dense_Nest(Y, a, X)); in MatAXPY_BasicWithTypeCompare()
[all …]
/petsc/src/ml/regressor/tests/
H A Dex2.c17 Mat X; in main() local
33 PetscCall(MatCreate(PETSC_COMM_WORLD, &X)); in main()
34 PetscCall(MatSetSizes(X, PETSC_DECIDE, PETSC_DECIDE, 5, 2)); in main()
35 PetscCall(MatSetFromOptions(X)); in main()
36 PetscCall(MatSetUp(X)); in main()
40 PetscCall(MatSetValues(X, 5, rows_ix, 2, cols_ix, X_array, ADD_VALUES)); in main()
44 PetscCall(MatAssemblyBegin(X, MAT_FINAL_ASSEMBLY)); in main()
45 PetscCall(MatAssemblyEnd(X, MAT_FINAL_ASSEMBLY)); in main()
50 PetscCall(PetscRegressorFit(regressor, X, y)); in main()
51 PetscCall(PetscRegressorPredict(regressor, X, y_predicted)); in main()
[all …]

12345678910>>...28