Home
last modified time | relevance | path

Searched refs:vf (Results 1 – 25 of 32) sorted by relevance

12

/petsc/src/dm/impls/stag/tests/
H A Dex20.c27 Vec vc, vf; in main() local
32 PetscCall(MatCreateVecs(Ai, &vc, &vf)); in main()
34 PetscCall(MatMult(Ai, vc, vf)); in main()
35 PetscCall(VecGetSize(vf, &size)); in main()
36 PetscCall(VecNorm(vf, NORM_1, &norm)); in main()
40 PetscCall(VecDestroy(&vf)); in main()
44 Vec vf, vc; in main() local
49 PetscCall(MatCreateVecs(Ar, &vf, &vc)); in main()
50 PetscCall(VecSet(vf, 1.0)); in main()
51 PetscCall(MatMult(Ar, vf, vc)); in main()
[all …]
/petsc/src/snes/interface/
H A Dsnesut.c29 …cErrorCode SNESMonitorSolution(SNES snes, PetscInt its, PetscReal fgnorm, PetscViewerAndFormat *vf) in SNESMonitorSolution() argument
32 PetscViewer viewer = vf->viewer; in SNESMonitorSolution()
37 PetscCall(PetscViewerPushFormat(viewer, vf->format)); in SNESMonitorSolution()
66 …cErrorCode SNESMonitorResidual(SNES snes, PetscInt its, PetscReal fgnorm, PetscViewerAndFormat *vf) in SNESMonitorResidual() argument
71 PetscValidHeaderSpecific(vf->viewer, PETSC_VIEWER_CLASSID, 4); in SNESMonitorResidual()
73 PetscCall(PetscViewerPushFormat(vf->viewer, vf->format)); in SNESMonitorResidual()
74 PetscCall(VecView(x, vf->viewer)); in SNESMonitorResidual()
75 PetscCall(PetscViewerPopFormat(vf->viewer)); in SNESMonitorResidual()
102 …Code SNESMonitorSolutionUpdate(SNES snes, PetscInt its, PetscReal fgnorm, PetscViewerAndFormat *vf) in SNESMonitorSolutionUpdate() argument
105 PetscViewer viewer = vf->viewer; in SNESMonitorSolutionUpdate()
[all …]
/petsc/src/ksp/ksp/interface/
H A Diterativ.c127 PetscErrorCode KSPMonitorResidual(KSP ksp, PetscInt n, PetscReal rnorm, PetscViewerAndFormat *vf) in KSPMonitorResidual() argument
129 PetscViewer viewer = vf->viewer; in KSPMonitorResidual()
130 PetscViewerFormat format = vf->format; in KSPMonitorResidual()
169 …tscErrorCode KSPMonitorResidualView(KSP ksp, PetscInt n, PetscReal rnorm, PetscViewerAndFormat *vf) in KSPMonitorResidualView() argument
171 PetscViewer viewer = vf->viewer; in KSPMonitorResidualView()
172 PetscViewerFormat format = vf->format; in KSPMonitorResidualView()
212 …cErrorCode KSPMonitorResidualDrawLG(KSP ksp, PetscInt n, PetscReal rnorm, PetscViewerAndFormat *vf) in KSPMonitorResidualDrawLG() argument
214 PetscViewer viewer = vf->viewer; in KSPMonitorResidualDrawLG()
215 PetscViewerFormat format = vf->format; in KSPMonitorResidualDrawLG()
256 …DrawLGCreate(PetscViewer viewer, PetscViewerFormat format, PetscCtx ctx, PetscViewerAndFormat **vf) in KSPMonitorResidualDrawLGCreate() argument
[all …]
H A Ditcl.c214 …ate_Internal(PetscViewer viewer, PetscViewerFormat format, PetscCtx ctx, PetscViewerAndFormat **vf) in PetscViewerAndFormatCreate_Internal() argument
217 PetscCall(PetscViewerAndFormatCreate(viewer, format, vf)); in PetscViewerAndFormatCreate_Internal()
218 (*vf)->data = ctx; in PetscViewerAndFormatCreate_Internal()
248 PetscViewerAndFormat *vf; in KSPMonitorSetFromOptions() local
270 PetscCall((*cfunc)(viewer, format, ctx, &vf)); in KSPMonitorSetFromOptions()
272 PetscCall(KSPMonitorSet(ksp, mfunc, vf, (PetscCtxDestroyFn *)dfunc)); in KSPMonitorSetFromOptions()
H A Ditfunc.c775 PetscViewerAndFormat *vf = (PetscViewerAndFormat *)ctx[i]; in PetscMonitorPauseFinal_Internal() local
780 if (!vf) continue; in PetscMonitorPauseFinal_Internal()
781 if (!PetscCheckPointer(vf->viewer, PETSC_OBJECT)) continue; in PetscMonitorPauseFinal_Internal()
782 if (((PetscObject)vf->viewer)->classid != PETSC_VIEWER_CLASSID) continue; in PetscMonitorPauseFinal_Internal()
783 PetscCall(PetscObjectTypeCompare((PetscObject)vf->viewer, PETSCVIEWERDRAW, &isdraw)); in PetscMonitorPauseFinal_Internal()
786 PetscCall(PetscViewerDrawGetDraw(vf->viewer, 0, &draw)); in PetscMonitorPauseFinal_Internal()
/petsc/src/sys/classes/viewer/interface/ftn-custom/
H A Dzviewaf.c12 …reate_(PetscViewer *vin, PetscViewerFormat *format, PetscViewerAndFormat **vf, PetscErrorCode *ier… in petscviewerandformatcreate_() argument
16 *ierr = PetscViewerAndFormatCreate(v, *format, vf); in petscviewerandformatcreate_()
19 PETSC_EXTERN void petscviewerandformatdestroy_(PetscViewerAndFormat **vf, PetscErrorCode *ierr) in petscviewerandformatdestroy_() argument
21 *ierr = PetscViewerAndFormatDestroy(vf); in petscviewerandformatdestroy_()
/petsc/src/sys/classes/viewer/interface/
H A Dview.c133 …PetscViewerAndFormatCreate(PetscViewer viewer, PetscViewerFormat format, PetscViewerAndFormat **vf) in PetscViewerAndFormatCreate() argument
137 PetscCall(PetscNew(vf)); in PetscViewerAndFormatCreate()
138 (*vf)->viewer = viewer; in PetscViewerAndFormatCreate()
139 (*vf)->format = format; in PetscViewerAndFormatCreate()
140 (*vf)->data = NULL; in PetscViewerAndFormatCreate()
157 PetscErrorCode PetscViewerAndFormatDestroy(PetscViewerAndFormat **vf) in PetscViewerAndFormatDestroy() argument
160 PetscCall(PetscViewerDestroy(&(*vf)->viewer)); in PetscViewerAndFormatDestroy()
161 if ((*vf)->data_destroy) PetscCall((*vf)->data_destroy(&(*vf)->data)); in PetscViewerAndFormatDestroy()
162 PetscCall(PetscFree(*vf)); in PetscViewerAndFormatDestroy()
/petsc/src/tao/interface/
H A Dtaosolver.c373 PetscViewerAndFormat *vf; in TaoMonitorSetFromOptions() local
377 PetscCall(PetscViewerAndFormatCreate(viewer, format, &vf)); in TaoMonitorSetFromOptions()
378 vf->view_interval = 1; in TaoMonitorSetFromOptions()
379 …nt(((PetscObject)tao)->options, ((PetscObject)tao)->prefix, interval_key, &vf->view_interval, NULL… in TaoMonitorSetFromOptions()
382 …PetscCall(TaoMonitorSet(tao, (PetscErrorCode (*)(Tao, PetscCtx))monitor, vf, (PetscCtxDestroyFn *)… in TaoMonitorSetFromOptions()
1609 PetscErrorCode TaoMonitorDefault(Tao tao, PetscViewerAndFormat *vf) in TaoMonitorDefault() argument
1611 PetscViewer viewer = vf->viewer; in TaoMonitorDefault()
1617 if (vf->view_interval > 0 && tao->niter % vf->view_interval) PetscFunctionReturn(PETSC_SUCCESS); in TaoMonitorDefault()
1620 PetscCall(PetscViewerPushFormat(viewer, vf->format)); in TaoMonitorDefault()
1663 PetscErrorCode TaoMonitorGlobalization(Tao tao, PetscViewerAndFormat *vf) in TaoMonitorGlobalization() argument
[all …]
/petsc/src/ts/interface/
H A Dtsmon.c78 PetscViewerAndFormat *vf; in TSMonitorSetFromOptions() local
82 PetscCall(PetscViewerAndFormatCreate(viewer, format, &vf)); in TSMonitorSetFromOptions()
83 vf->view_interval = 1; in TSMonitorSetFromOptions()
84 …tInt(((PetscObject)ts)->options, ((PetscObject)ts)->prefix, interval_key, &vf->view_interval, NULL… in TSMonitorSetFromOptions()
87 if (monitorsetup) PetscCall((*monitorsetup)(ts, vf)); in TSMonitorSetFromOptions()
88 …t(ts, (PetscErrorCode (*)(TS, PetscInt, PetscReal, Vec, PetscCtx))monitor, vf, (PetscCtxDestroyFn … in TSMonitorSetFromOptions()
192 …cErrorCode TSMonitorDefault(TS ts, PetscInt step, PetscReal ptime, Vec v, PetscViewerAndFormat *vf) in TSMonitorDefault() argument
194 PetscViewer viewer = vf->viewer; in TSMonitorDefault()
201 PetscCall(PetscViewerPushFormat(viewer, vf->format)); in TSMonitorDefault()
250 PetscErrorCode TSMonitorWallClockTimeSetUp(TS ts, PetscViewerAndFormat *vf) in TSMonitorWallClockTimeSetUp() argument
[all …]
/petsc/src/ksp/ksp/impls/lsqr/
H A Dlsqr.c377 …rorCode KSPLSQRMonitorResidual_LSQR(KSP ksp, PetscInt n, PetscReal rnorm, PetscViewerAndFormat *vf) in KSPLSQRMonitorResidual_LSQR() argument
380 PetscViewer viewer = vf->viewer; in KSPLSQRMonitorResidual_LSQR()
381 PetscViewerFormat format = vf->format; in KSPLSQRMonitorResidual_LSQR()
422 …tscErrorCode KSPLSQRMonitorResidual(KSP ksp, PetscInt n, PetscReal rnorm, PetscViewerAndFormat *vf) in KSPLSQRMonitorResidual() argument
426 PetscAssertPointer(vf, 4); in KSPLSQRMonitorResidual()
427 PetscValidHeaderSpecific(vf->viewer, PETSC_VIEWER_CLASSID, 4); in KSPLSQRMonitorResidual()
428 …SPLSQRMonitorResidual_C", (KSP, PetscInt, PetscReal, PetscViewerAndFormat *), (ksp, n, rnorm, vf)); in KSPLSQRMonitorResidual()
432 …e KSPLSQRMonitorResidualDrawLG_LSQR(KSP ksp, PetscInt n, PetscReal rnorm, PetscViewerAndFormat *vf) in KSPLSQRMonitorResidualDrawLG_LSQR() argument
435 PetscViewer viewer = vf->viewer; in KSPLSQRMonitorResidualDrawLG_LSQR()
436 PetscViewerFormat format = vf->format; in KSPLSQRMonitorResidualDrawLG_LSQR()
[all …]
/petsc/src/ksp/ksp/tutorials/
H A Dex2f.F9024 subroutine MyKSPMonitor(ksp, n, rnorm, vf, ierr) argument
30 PetscViewerAndFormat vf
36 PetscCallA(KSPMonitorTrueResidual(ksp, n, rnorm, vf, ierr))
118 PetscViewerAndFormat vf, vf2
288 … PetscCallA(PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, vf, ierr))
289 PetscCallA(KSPMonitorSet(ksp, MyKSPMonitor, vf, PetscViewerAndFormatDestroy, ierr))
/petsc/src/sys/classes/viewer/impls/matlab/
H A Dvmatlab.c133 PetscViewer_Matlab *vf = (PetscViewer_Matlab *)v->data; in PetscViewerDestroy_Matlab() local
136 if (vf->ep) matClose(vf->ep); in PetscViewerDestroy_Matlab()
137 PetscCall(PetscFree(vf)); in PetscViewerDestroy_Matlab()
/petsc/src/snes/impls/vi/
H A Dvi.c51 …rrorCode SNESVIMonitorResidual(SNES snes, PetscInt its, PetscReal fgnorm, PetscViewerAndFormat *vf) in SNESVIMonitorResidual() argument
57 PetscValidHeaderSpecific(vf->viewer, PETSC_VIEWER_CLASSID, 4); in SNESVIMonitorResidual()
66 PetscCall(PetscViewerPushFormat(vf->viewer, vf->format)); in SNESVIMonitorResidual()
67 PetscCall(VecView(Finactive, vf->viewer)); in SNESVIMonitorResidual()
68 PetscCall(PetscViewerPopFormat(vf->viewer)); in SNESVIMonitorResidual()
74 …cErrorCode SNESVIMonitorActive(SNES snes, PetscInt its, PetscReal fgnorm, PetscViewerAndFormat *vf) in SNESVIMonitorActive() argument
80 PetscValidHeaderSpecific(vf->viewer, PETSC_VIEWER_CLASSID, 4); in SNESVIMonitorActive()
89 PetscCall(PetscViewerPushFormat(vf->viewer, vf->format)); in SNESVIMonitorActive()
90 PetscCall(VecView(A, vf->viewer)); in SNESVIMonitorActive()
91 PetscCall(PetscViewerPopFormat(vf->viewer)); in SNESVIMonitorActive()
/petsc/src/ts/tutorials/
H A Dex7.c30 PetscViewerAndFormat *vf; in main() local
80 PetscCall(PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, &vf)); in main()
81 …nes, (PetscErrorCode (*)(SNES, PetscInt, PetscReal, void *))MySNESMonitor, vf, (PetscCtxDestroyFn … in main()
254 PetscErrorCode MySNESMonitor(SNES snes, PetscInt its, PetscReal fnorm, PetscViewerAndFormat *vf) in MySNESMonitor() argument
257 PetscCall(SNESMonitorDefaultShort(snes, its, fnorm, vf)); in MySNESMonitor()
H A Dex12.c41 PetscViewerAndFormat *vf; in main() local
83 PetscCall(PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, &vf)); in main()
84 …nes, (PetscErrorCode (*)(SNES, PetscInt, PetscReal, void *))MySNESMonitor, vf, (PetscCtxDestroyFn … in main()
270 PetscErrorCode MySNESMonitor(SNES snes, PetscInt its, PetscReal fnorm, PetscViewerAndFormat *vf) in MySNESMonitor() argument
273 PetscCall(SNESMonitorDefaultShort(snes, its, fnorm, vf)); in MySNESMonitor()
H A Dex52.c124 PetscErrorCode MySNESMonitor(SNES snes, PetscInt its, PetscReal fnorm, PetscViewerAndFormat *vf) in MySNESMonitor() argument
127 PetscCall(SNESMonitorDefaultShort(snes, its, fnorm, vf)); in MySNESMonitor()
267 PetscViewerAndFormat *vf; in main() local
334 PetscCall(PetscViewerAndFormatCreate(PETSC_VIEWER_STDOUT_WORLD, PETSC_VIEWER_DEFAULT, &vf)); in main()
335 …nes, (PetscErrorCode (*)(SNES, PetscInt, PetscReal, void *))MySNESMonitor, vf, (PetscCtxDestroyFn … in main()
/petsc/src/snes/utils/dm/
H A Ddmadapt.c310 …ate_Internal(PetscViewer viewer, PetscViewerFormat format, PetscCtx ctx, PetscViewerAndFormat **vf) in PetscViewerAndFormatCreate_Internal() argument
313 PetscCall(PetscViewerAndFormatCreate(viewer, format, vf)); in PetscViewerAndFormatCreate_Internal()
314 (*vf)->data = ctx; in PetscViewerAndFormatCreate_Internal()
414 PetscViewerAndFormat *vf; in DMAdaptorMonitorSetFromOptions() local
435 PetscCall((*cfunc)(viewer, format, ctx, &vf)); in DMAdaptorMonitorSetFromOptions()
437 PetscCall(DMAdaptorMonitorSet(adaptor, mfunc, vf, (PetscCtxDestroyFn *)dfunc)); in DMAdaptorMonitorSetFromOptions()
1053 …, PetscInt n, DM odm, DM adm, PetscInt Nf, PetscReal enorms[], Vec error, PetscViewerAndFormat *vf) in DMAdaptorMonitorSize() argument
1055 PetscViewer viewer = vf->viewer; in DMAdaptorMonitorSize()
1056 PetscViewerFormat format = vf->format; in DMAdaptorMonitorSize()
1104 …, PetscInt n, DM odm, DM adm, PetscInt Nf, PetscReal enorms[], Vec error, PetscViewerAndFormat *vf) in DMAdaptorMonitorError() argument
[all …]
/petsc/lib/petsc/bin/
H A Dpetsc_gen_xdmf.py223 … for vf in vfields: self.writeField(fp, numSteps, t, spaceDim, '/vertex_fields/'+vf[0], vf, 'Node')
/petsc/src/snes/linesearch/interface/
H A Dlinesearch.c134 PetscErrorCode SNESLineSearchMonitorSolutionUpdate(SNESLineSearch ls, PetscViewerAndFormat *vf) in SNESLineSearchMonitorSolutionUpdate() argument
136 PetscViewer viewer = vf->viewer; in SNESLineSearchMonitorSolutionUpdate()
141 PetscCall(PetscViewerPushFormat(viewer, vf->format)); in SNESLineSearchMonitorSolutionUpdate()
771 …LineSearch ls, PetscViewerAndFormat *vf), PetscErrorCode (*monitorsetup)(SNESLineSearch ls, PetscV… in SNESLineSearchMonitorSetFromOptions() argument
780 PetscViewerAndFormat *vf; in SNESLineSearchMonitorSetFromOptions() local
781 PetscCall(PetscViewerAndFormatCreate(viewer, format, &vf)); in SNESLineSearchMonitorSetFromOptions()
783 if (monitorsetup) PetscCall((*monitorsetup)(ls, vf)); in SNESLineSearchMonitorSetFromOptions()
784 …earchMonitorSet(ls, (PetscErrorCode (*)(SNESLineSearch, PetscCtx))monitor, vf, (PetscCtxDestroyFn … in SNESLineSearchMonitorSetFromOptions()
/petsc/src/ksp/ksp/utils/dm/
H A Ddmproject.c255 Vec vc, vf; in DMAdaptInterpolator() local
267 PetscCall(MatDenseGetColumnVecRead(MF, k, &vf)); in DMAdaptInterpolator()
268 PetscCall(PetscObjectSetName((PetscObject)vf, name)); in DMAdaptInterpolator()
269 PetscCall(VecViewFromOptions(vf, NULL, "-dm_adapt_interp_view_fine")); in DMAdaptInterpolator()
270 PetscCall(MatDenseRestoreColumnVecRead(MF, k, &vf)); in DMAdaptInterpolator()
280 Vec vf; in DMAdaptInterpolator() local
283 PetscCall(MatDenseGetColumnVecRead(MF, k, &vf)); in DMAdaptInterpolator()
285 PetscCall(VecDot(vf, vf, &vnorm)); in DMAdaptInterpolator()
289 PetscCall(VecDot(vf, tmp2, &vAnorm)); in DMAdaptInterpolator()
292 PetscCall(VecDot(vf, tmp, &vAnorm)); in DMAdaptInterpolator()
[all …]
/petsc/include/
H A Dpetscksp.h585 …tscErrorCode KSPMonitorResidualDraw(KSP ksp, PetscInt n, PetscReal rnorm, PetscViewerAndFormat *vf) in KSPMonitorResidualDraw() argument
587 return KSPMonitorResidualView(ksp, n, rnorm, vf); in KSPMonitorResidualDraw()
595 …rrorCode KSPMonitorTrueResidualDraw(KSP ksp, PetscInt n, PetscReal rnorm, PetscViewerAndFormat *vf) in KSPMonitorTrueResidualDraw() argument
597 return KSPMonitorTrueResidualView(ksp, n, rnorm, vf); in KSPMonitorTrueResidualDraw()
612 …ne PetscErrorCode KSPMonitorDefault(KSP ksp, PetscInt n, PetscReal rnorm, PetscViewerAndFormat *vf) in KSPMonitorDefault() argument
614 return KSPMonitorResidual(ksp, n, rnorm, vf); in KSPMonitorDefault()
616 …rrorCode KSPMonitorTrueResidualNorm(KSP ksp, PetscInt n, PetscReal rnorm, PetscViewerAndFormat *vf) in KSPMonitorTrueResidualNorm() argument
618 return KSPMonitorTrueResidual(ksp, n, rnorm, vf); in KSPMonitorTrueResidualNorm()
620 …rCode KSPMonitorTrueResidualMaxNorm(KSP ksp, PetscInt n, PetscReal rnorm, PetscViewerAndFormat *vf) in KSPMonitorTrueResidualMaxNorm() argument
622 return KSPMonitorTrueResidualMax(ksp, n, rnorm, vf); in KSPMonitorTrueResidualMaxNorm()
/petsc/src/ts/interface/sensitivity/
H A Dtssen.c1237 …Int step, PetscReal ptime, Vec v, PetscInt numcost, Vec *lambda, Vec *mu, PetscViewerAndFormat *vf) in TSAdjointMonitorSensi() argument
1239 PetscViewer viewer = vf->viewer; in TSAdjointMonitorSensi()
1243 PetscCall(PetscViewerPushFormat(viewer, vf->format)); in TSAdjointMonitorSensi()
1281 PetscViewerAndFormat *vf; in TSAdjointMonitorSetFromOptions() local
1282 PetscCall(PetscViewerAndFormatCreate(viewer, format, &vf)); in TSAdjointMonitorSetFromOptions()
1284 if (monitorsetup) PetscCall((*monitorsetup)(ts, vf)); in TSAdjointMonitorSetFromOptions()
1285 …)(TS, PetscInt, PetscReal, Vec, PetscInt, Vec *, Vec *, PetscCtx))monitor, vf, (PetscCtxDestroyFn … in TSAdjointMonitorSetFromOptions()
1388 …nt step, PetscReal time, Vec v, PetscInt numcost, Vec lambda[], Vec mu[], PetscViewerAndFormat *vf) in TSAdjointMonitorDefault() argument
1390 PetscViewer viewer = vf->viewer; in TSAdjointMonitorDefault()
1398 PetscCall(PetscViewerPushFormat(viewer, vf->format)); in TSAdjointMonitorDefault()
/petsc/src/ksp/ksp/impls/cg/pipecg2/
H A Dpipecg2.c82 … Vec vg0, Vec vh0, Vec vg1, Vec vh1, Vec vs, Vec va1, Vec vb1, Vec ve, Vec vf, Vec vm, Vec vn, Vec… in VecMergedOpsShort_Private() argument
106 PetscCall(VecGetArray(vf, (PetscScalar **)&pf)); in VecMergedOpsShort_Private()
296 PetscCall(VecRestoreArray(vf, (PetscScalar **)&pf)); in VecMergedOpsShort_Private()
304 … Vec vg0, Vec vh0, Vec vg1, Vec vh1, Vec vs, Vec va1, Vec vb1, Vec ve, Vec vf, Vec vm, Vec vn, Vec… in VecMergedOps_Private() argument
328 PetscCall(VecGetArray(vf, (PetscScalar **)&pf)); in VecMergedOps_Private()
525 PetscCall(VecRestoreArray(vf, (PetscScalar **)&pf)); in VecMergedOps_Private()
/petsc/src/snes/utils/
H A Ddmplexsnes.c184 …tscErrorCode SNESMonitorFields(SNES snes, PetscInt its, PetscReal fgnorm, PetscViewerAndFormat *vf) in SNESMonitorFields() argument
186 PetscViewer viewer = vf->viewer; in SNESMonitorFields()
214 PetscCall(PetscViewerPushFormat(viewer, vf->format)); in SNESMonitorFields()
/petsc/src/snes/impls/fas/
H A Dfas.c234 PetscViewerAndFormat *vf; in SNESSetFromOptions_FAS() local
235 PetscCall(PetscViewerAndFormatCreate(viewer, format, &vf)); in SNESSetFromOptions_FAS()
237 PetscCall(SNESFASSetMonitor(snes, vf, PETSC_TRUE)); in SNESSetFromOptions_FAS()

12