Home
last modified time | relevance | path

Searched refs:ff (Results 1 – 25 of 49) sorted by relevance

12

/petsc/src/snes/tutorials/
H A Dex1.c165 PetscScalar *ff; in FormFunction1() local
176 PetscCall(VecGetArray(f, &ff)); in FormFunction1()
179 ff[0] = xx[0] * xx[0] + xx[0] * xx[1] - 3.0; in FormFunction1()
180 ff[1] = xx[0] * xx[1] + xx[1] * xx[1] - 6.0; in FormFunction1()
184 PetscCall(VecRestoreArray(f, &ff)); in FormFunction1()
245 PetscScalar *ff; in FormFunction2() local
256 PetscCall(VecGetArray(f, &ff)); in FormFunction2()
261 ff[0] = PetscSinScalar(3.0 * xx[0]) + xx[0]; in FormFunction2()
262 ff[1] = xx[1]; in FormFunction2()
268 PetscCall(VecRestoreArray(f, &ff)); in FormFunction2()
H A Dex59.c130 PetscScalar *ff, *FF, d, d2; in FormFunction() local
135 PetscCall(VecGetArray(f, &ff)); in FormFunction()
141 if (second_order) ff[0] = d * (0.5 * d * (-xx[2] + 4. * xx[1] - 3. * xx[0]) - X0DOT); in FormFunction()
142 else ff[0] = d * (d * (xx[1] - xx[0]) - X0DOT); in FormFunction()
144 …for (i = 1; i < n - 1; i++) ff[i] = d2 * (xx[i - 1] - 2. * xx[i] + xx[i + 1]) + xx[i] * xx[i] - FF… in FormFunction()
146 ff[n - 1] = d * d * (xx[n - 1] - X1); in FormFunction()
148 PetscCall(VecRestoreArray(f, &ff)); in FormFunction()
H A Dex42.c130 PetscScalar *ff; in FormFunction1() local
147 PetscCall(VecGetArray(f, &ff)); in FormFunction1()
150 ff[0] = -2.0 + 2.0 * xx[0] + 400.0 * xx[0] * xx[0] * xx[0] - 400.0 * xx[0] * xx[1]; in FormFunction1()
151 ff[1] = -200.0 * xx[0] * xx[0] + 200.0 * xx[1]; in FormFunction1()
155 PetscCall(VecRestoreArray(f, &ff)); in FormFunction1()
H A Dex99.c135 PetscScalar *ff; in FormFunction() local
146 PetscCall(VecGetArray(f, &ff)); in FormFunction()
149 ff[0] = 8. * PetscExpScalar(-4. * (xx[0] - 2.) * (xx[0] - 2.)) * (xx[0] - 2.) + 2. * xx[0]; in FormFunction()
153 PetscCall(VecRestoreArray(f, &ff)); in FormFunction()
H A Dex2.c215 PetscScalar *ff, d; in FormFunction() local
227 PetscCall(VecGetArray(f, &ff)); in FormFunction()
236 ff[0] = xx[0]; in FormFunction()
237 …for (i = 1; i < n - 1; i++) ff[i] = d * (xx[i - 1] - 2.0 * xx[i] + xx[i + 1]) + xx[i] * xx[i] - gg… in FormFunction()
238 ff[n - 1] = xx[n - 1] - 1.0; in FormFunction()
244 PetscCall(VecRestoreArray(f, &ff)); in FormFunction()
H A Dex6.c188 PetscScalar *ff, d; in FormFunction() local
200 PetscCall(VecGetArray(f, &ff)); in FormFunction()
209 ff[0] = xx[0]; in FormFunction()
210 …for (i = 1; i < n - 1; i++) ff[i] = d * (xx[i - 1] - 2.0 * xx[i] + xx[i + 1]) + xx[i] * xx[i] - gg… in FormFunction()
211 ff[n - 1] = xx[n - 1] - 1.0; in FormFunction()
217 PetscCall(VecRestoreArray(f, &ff)); in FormFunction()
H A Dex78.c112 PetscScalar *xx, *ff; in FormFunction() local
137 PetscCall(DMDAVecGetArray(da, f, &ff)); in FormFunction()
151 …for (i = xs; i < xs + xm; i++) ff[i] = (xx[i - 1] - 2.0 * xx[i] + xx[i + 1]) / (h * h) - PetscSinR… in FormFunction()
157 PetscCall(DMDAVecRestoreArray(da, f, &ff)); in FormFunction()
H A Dex47cu.cu79 PetscScalar *xx, *ff, hx; in ComputeFunction() local
137 PetscCall(DMDAVecGetArray(da, f, &ff)); in ComputeFunction()
141 if (i == 0 || i == Mx - 1) ff[i] = xx[i] / hx; in ComputeFunction()
142 else ff[i] = (2.0 * xx[i] - xx[i - 1] - xx[i + 1]) / hx - hx * PetscExpScalar(xx[i]); in ComputeFunction()
145 PetscCall(DMDAVecRestoreArray(da, f, &ff)); in ComputeFunction()
/petsc/src/snes/tests/
H A Dex17.c183 PetscScalar *ff; in FormFunction1() local
194 PetscCall(VecGetArray(f, &ff)); in FormFunction1()
199 ff[0] = xx[0] * xx[0] + xx[0] * xx[1] - 3.0; in FormFunction1()
200 ff[1] = xx[0] * xx[1] + xx[1] * xx[1] - 6.0; in FormFunction1()
206 PetscCall(VecRestoreArray(f, &ff)); in FormFunction1()
262 PetscScalar *ff; in FormFunction2() local
273 PetscCall(VecGetArray(f, &ff)); in FormFunction2()
278 ff[0] = PetscSinScalar(3.0 * xx[0]) + xx[0]; in FormFunction2()
279 ff[1] = xx[1]; in FormFunction2()
285 PetscCall(VecRestoreArray(f, &ff)); in FormFunction2()
[all …]
H A Dex21f.F9019 PetscScalar, pointer :: xx(:), ff(:)
22 PetscCallA(VecGetArray(f, ff, ierr))
26 ff(i) = ff(i) - xx(i)*xx(i)*xx(i)*xx(i) + 1.0
28 PetscCallA(VecRestoreArray(f, ff, ierr))
H A Dex4.c166 PetscScalar *ff; in FormFunction2() local
177 PetscCall(VecGetArray(f, &ff)); in FormFunction2()
182 ff[0] = PetscSinScalar(3.0 * xx[0]) + xx[0]; in FormFunction2()
183 ff[1] = xx[1]; in FormFunction2()
189 PetscCall(VecRestoreArray(f, &ff)); in FormFunction2()
H A Dex5.c217 PetscScalar *ff, d; in FormFunction() local
229 PetscCall(VecGetArray(f, &ff)); in FormFunction()
238 ff[0] = xx[0]; in FormFunction()
239 …for (i = 1; i < n - 1; i++) ff[i] = d * (xx[i - 1] - 2.0 * xx[i] + xx[i + 1]) + xx[i] * xx[i] - gg… in FormFunction()
240 ff[n - 1] = xx[n - 1] - 1.0; in FormFunction()
246 PetscCall(VecRestoreArray(f, &ff)); in FormFunction()
H A Dex7.c107 PetscScalar *ff, d; in FormFunction() local
112 PetscCall(VecGetArray(f, &ff)); in FormFunction()
117 ff[0] = xx[0]; in FormFunction()
118 …for (i = 1; i < n - 1; i++) ff[i] = d * (xx[i - 1] - 2.0 * xx[i] + xx[i + 1]) + xx[i] * xx[i] - FF… in FormFunction()
119 ff[n - 1] = xx[n - 1] - 1.0; in FormFunction()
121 PetscCall(VecRestoreArray(f, &ff)); in FormFunction()
/petsc/src/ts/tests/
H A Dex29.c9 PetscScalar *ff; in RHSFunction() local
14 PetscCall(VecGetArray(F, &ff)); in RHSFunction()
15 if (n >= 1) ff[0] = 1; in RHSFunction()
16 for (i = 1; i < n; i++) ff[i] = (i + 1) * (xx[i - 1] + PetscPowReal(t, i)) / 2; in RHSFunction()
18 PetscCall(VecRestoreArray(F, &ff)); in RHSFunction()
H A Dex14.c9 /* */ PetscScalar *ff; in RHSFunction() local
14 PetscCall(VecGetArray(F, &ff)); in RHSFunction()
16 if (n >= 1) ff[0] = 1; in RHSFunction()
17 for (i = 1; i < n; i++) ff[i] = (i + 1) * (xx[i - 1] + PetscPowReal(t, i)) / 2; in RHSFunction()
20 PetscCall(VecRestoreArray(F, &ff)); in RHSFunction()
/petsc/src/dm/impls/swarm/tests/
H A Dex7.c15 Vec ff; member
26 PetscCall(MatMult(matshellctx->Mp, xx, matshellctx->ff)); in MatMultMtM_SeqAIJ()
27 PetscCall(MatMult(matshellctx->MpTrans, matshellctx->ff, yy)); in MatMultMtM_SeqAIJ()
38 PetscCall(MatMult(matshellctx->Mp, xx, matshellctx->ff)); in MatMultAddMtM_SeqAIJ()
39 PetscCall(MatMultAdd(matshellctx->MpTrans, matshellctx->ff, yy, zz)); in MatMultAddMtM_SeqAIJ()
64 Vec ff; in gridToParticles() local
91 PetscCall(MatCreateVecs(M_p, &matshellctx->uu, &matshellctx->ff)); in gridToParticles()
123 PetscCall(DMSwarmCreateGlobalVectorFromField(sw, "w_q", &ff)); // this grabs access !!!!! in gridToParticles()
126 PetscCall(MatMult(M_p, matshellctx->uu, ff)); in gridToParticles()
128 PetscCall(VecDestroy(&matshellctx->ff)); in gridToParticles()
[all …]
/petsc/src/tao/complementarity/impls/ssls/
H A Dssls.c30 PetscCall(VecFischer(X, tao->constraints, tao->XL, tao->XU, ssls->ff)); in Tao_SSLS_Function()
31 PetscCall(VecNorm(ssls->ff, NORM_2, &ssls->merit)); in Tao_SSLS_Function()
43 PetscCall(VecFischer(X, tao->constraints, tao->XL, tao->XU, ssls->ff)); in Tao_SSLS_FunctionGradient()
44 PetscCall(VecNorm(ssls->ff, NORM_2, &ssls->merit)); in Tao_SSLS_FunctionGradient()
52 PetscCall(MatMultTranspose(tao->jacobian, ssls->ff, G)); in Tao_SSLS_FunctionGradient()
/petsc/src/binding/petsc4py/demo/legacy/taosolve/
H A Drosenbrock.py36 ff = 0.0
40 ff += alpha*t1*t1 + t2*t2;
41 return ff
58 ff = 0.0
63 ff += alpha*t1*t1 + t2*t2;
66 return ff
/petsc/doc/manualpages/doctext/
H A Dpetscapp.cfg18 %htmlformatsArticle = ( 'starttitle' => '<font color="#0000ff">', 'endtitle' => '</font>', 'startjo…
19 %htmlformatsInProc = ( 'starttitle' => '<font color="#0000ff">', 'endtitle' => '</font>', 'startboo…
20 %htmlformatsInBook = ( 'startchapter' => '<font color="#0000ff">', 'endchapter' => '</font>', 'star…
/petsc/src/benchmarks/streams/
H A Dprocess.py14 ff = open('scaling.log')
15 data = ff.read()
16 ff.close()
88 ff.close()
/petsc/src/tao/unconstrained/tutorials/
H A Drosenbrock1f.F9039 PetscReal ff, t1, t2
48 ff = 0
58 ff = ff + alpha*t1*t1 + t2*t2
67 f = ff
/petsc/src/tao/complementarity/impls/asls/
H A Dasils.c48 PetscCall(VecDuplicate(tao->solution, &asls->ff)); in TaoSetUp_ASILS()
73 PetscCall(VecFischer(X, tao->constraints, tao->XL, tao->XU, asls->ff)); in Tao_ASLS_FunctionGradient()
74 PetscCall(VecNorm(asls->ff, NORM_2, &asls->merit)); in Tao_ASLS_FunctionGradient()
79 PetscCall(VecPointwiseMult(asls->t1, asls->ff, asls->db)); in Tao_ASLS_FunctionGradient()
81 PetscCall(VecPointwiseMult(asls->t1, asls->ff, asls->da)); in Tao_ASLS_FunctionGradient()
91 PetscCall(VecDestroy(&ssls->ff)); in TaoDestroy_ASILS()
182 PetscCall(TaoVecGetSubVec(asls->ff, asls->fixed, tao->subset_type, 0.0, &asls->r1)); in TaoSolve_ASILS()
194 PetscCall(TaoVecGetSubVec(asls->ff, asls->free, tao->subset_type, 0.0, &asls->r2)); in TaoSolve_ASILS()
H A Dasfls.c48 PetscCall(VecDuplicate(tao->solution, &asls->ff)); in TaoSetUp_ASFLS()
73 PetscCall(VecFischer(X, tao->constraints, tao->XL, tao->XU, asls->ff)); in Tao_ASLS_FunctionGradient()
74 PetscCall(VecNorm(asls->ff, NORM_2, &asls->merit)); in Tao_ASLS_FunctionGradient()
79 PetscCall(VecPointwiseMult(asls->t1, asls->ff, asls->db)); in Tao_ASLS_FunctionGradient()
81 PetscCall(VecPointwiseMult(asls->t1, asls->ff, asls->da)); in Tao_ASLS_FunctionGradient()
91 PetscCall(VecDestroy(&ssls->ff)); in TaoDestroy_ASFLS()
185 PetscCall(TaoVecGetSubVec(asls->ff, asls->fixed, tao->subset_type, 0.0, &asls->r1)); in TaoSolve_ASFLS()
197 PetscCall(TaoVecGetSubVec(asls->ff, asls->free, tao->subset_type, 0.0, &asls->r2)); in TaoSolve_ASFLS()
/petsc/src/ts/tutorials/
H A Dex22f.F90181 PetscScalar, pointer :: xx(:), xxdot(:), ff(:)
189 PetscCall(VecGetArray(F, ff, ierr))
191 PetscCall(FormIFunctionLocal(mx, xs, xe, gxs, gxe, xx, xxdot, ff, ctx%a, ctx%k, ctx%s, ierr))
195 PetscCall(VecRestoreArray(F, ff, ierr))
260 PetscScalar, pointer :: xx(:), ff(:)
275 PetscCall(VecGetArray(F, ff, ierr))
277 PetscCall(FormRHSFunctionLocal(mx, xs, xe, gxs, gxe, t, xx, ff, ctx%a, ctx%k, ctx%s, ierr))
280 PetscCall(VecRestoreArray(F, ff, ierr))
H A Dex1f.F9039 PetscScalar, pointer :: xx(:), ff(:)
55 PetscCall(VecGetArray(F, ff, ierr))
60 ff(row) = xx(row)
69 ff(row) = -uxx - uyy + sc*lambda*exp(u)
75 PetscCall(VecRestoreArray(F, ff, ierr))

12