Lines Matching refs:vf
78 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
257 vf->data_destroy = PetscCtxDestroyDefault; in TSMonitorWallClockTimeSetUp()
258 vf->data = speed; in TSMonitorWallClockTimeSetUp()
285 …Code TSMonitorWallClockTime(TS ts, PetscInt step, PetscReal ptime, Vec v, PetscViewerAndFormat *vf) in TSMonitorWallClockTime() argument
287 PetscViewer viewer = vf->viewer; in TSMonitorWallClockTime()
288 TSMonitorWallClockTimeContext speed = (TSMonitorWallClockTimeContext)vf->data; in TSMonitorWallClockTime()
303 PetscCall(PetscViewerPushFormat(viewer, vf->format)); in TSMonitorWallClockTime()
335 …cErrorCode TSMonitorExtreme(TS ts, PetscInt step, PetscReal ptime, Vec v, PetscViewerAndFormat *vf) in TSMonitorExtreme() argument
337 PetscViewer viewer = vf->viewer; in TSMonitorExtreme()
344 PetscCall(PetscViewerPushFormat(viewer, vf->format)); in TSMonitorExtreme()
842 PetscErrorCode TSMonitorSolutionSetup(TS ts, PetscViewerAndFormat *vf) in TSMonitorSolutionSetup() argument
849 vf->data = ctx; in TSMonitorSolutionSetup()
850 vf->data_destroy = PetscCtxDestroyDefault; in TSMonitorSolutionSetup()
874 …ErrorCode TSMonitorSolution(TS ts, PetscInt step, PetscReal ptime, Vec u, PetscViewerAndFormat *vf) in TSMonitorSolution() argument
876 TSMonitorSolutionCtx ctx = (TSMonitorSolutionCtx)vf->data; in TSMonitorSolution()
880 if ((vf->view_interval > 0 && !(step % vf->view_interval)) || (vf->view_interval && ts->reason)) { in TSMonitorSolution()
881 PetscCall(PetscViewerPushFormat(vf->viewer, vf->format)); in TSMonitorSolution()
882 PetscCall(VecView(u, vf->viewer)); in TSMonitorSolution()
883 PetscCall(PetscViewerPopFormat(vf->viewer)); in TSMonitorSolution()
1581 …tscErrorCode TSMonitorError(TS ts, PetscInt step, PetscReal ptime, Vec u, PetscViewerAndFormat *vf) in TSMonitorError() argument
1599 PetscCall(PetscObjectTypeCompare((PetscObject)vf->viewer, PETSCVIEWERASCII, &flg)); in TSMonitorError()
1602 PetscCall(PetscViewerASCIIPrintf(vf->viewer, "2-norm of error %g\n", (double)nrm)); in TSMonitorError()
1604 PetscCall(PetscObjectTypeCompare((PetscObject)vf->viewer, PETSCVIEWERDRAW, &flg)); in TSMonitorError()
1605 if (flg) PetscCall(VecView(y, vf->viewer)); in TSMonitorError()
1838 …rorCode TSDMSwarmMonitorMoments(TS ts, PetscInt step, PetscReal t, Vec U, PetscViewerAndFormat *vf) in TSDMSwarmMonitorMoments() argument
1848 (void)vf; in TSDMSwarmMonitorMoments()
1850 if (!sw || step % vf->view_interval != 0) PetscFunctionReturn(PETSC_SUCCESS); in TSDMSwarmMonitorMoments()