TSMonitorSet#
Sets an ADDITIONAL function that is to be used at every timestep to display the iteration’s progress.
Synopsis#
#include "petscts.h"
PetscErrorCode TSMonitorSet(TS ts, PetscErrorCode (*monitor)(TS ts, PetscInt steps, PetscReal time, Vec u, void *ctx), void *mctx, PetscCtxDestroyFn *mdestroy)
Logically Collective
Input Parameters#
monitor - monitoring routine
mctx - [optional] user-defined context for private data for the monitor routine (use
NULL
if no context is desired)mdestroy - [optional] routine that frees monitor context (may be
NULL
), seePetscCtxDestroyFn
for the calling sequence
Calling sequence of monitor
#
ts - the
TS
contextsteps - iteration number (after the final time step the monitor routine may be called with a step of -1, this indicates the solution has been interpolated to this time)
time - current time
u - current iterate
ctx - [optional] monitoring context
Note#
This routine adds an additional monitor to the list of monitors that already has been loaded.
Fortran Notes#
Only a single monitor function can be set for each TS
object
See Also#
TS: Scalable ODE and DAE Solvers, TSMonitorDefault()
, TSMonitorCancel()
, TSDMSwarmMonitorMoments()
, TSMonitorExtreme()
, TSMonitorDrawSolution()
,
TSMonitorDrawSolutionPhase()
, TSMonitorDrawSolutionFunction()
, TSMonitorDrawError()
, TSMonitorSolution()
, TSMonitorSolutionVTK()
,
TSMonitorLGSolution()
, TSMonitorLGError()
, TSMonitorSPSwarmSolution()
, TSMonitorError()
, TSMonitorEnvelope()
, PetscCtxDestroyFn
Level#
intermediate
Location#
Examples#
src/ts/tutorials/ex52.c
src/ts/tutorials/ex2.c
src/ts/tutorials/ex24.c
src/ts/tutorials/ex20fwd.c
src/ts/utils/dmplexlandau/tutorials/ex2.c
src/ts/tutorials/ex20td.c
src/ts/tutorials/ex77.c
src/ts/tutorials/extchemfield.c
src/ts/tutorials/ex48.c
src/ts/utils/dmplexlandau/tutorials/ex1.c
Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages