petsc-3.11.4 2019-09-28
Report Typos and Errors

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,PetscInt,PetscReal,Vec,void*),void *mctx,PetscErrorCode (*mdestroy)(void**))
Logically Collective on TS

Input Parameters

ts - the TS context obtained from TSCreate()
monitor - monitoring routine
mctx - [optional] user-defined context for private data for the monitor routine (use NULL if no context is desired)
monitordestroy - [optional] routine that frees monitor context (may be NULL)

Calling sequence of monitor

   PetscErrorCode monitor(TS ts,PetscInt steps,PetscReal time,Vec u,void *mctx)

ts - the TS context
steps - 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
mctx - [optional] monitoring context

Notes

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

Keywords

TS, timestep, set, monitor

See Also

TSMonitorDefault(), TSMonitorCancel()

Level

intermediate

Location

src/ts/interface/ts.c

Examples

src/ts/examples/tutorials/ex2.c.html
src/ts/examples/tutorials/ex3.c.html
src/ts/examples/tutorials/ex4.c.html
src/ts/examples/tutorials/ex5.c.html
src/ts/examples/tutorials/ex6.c.html
src/ts/examples/tutorials/ex7.c.html
src/ts/examples/tutorials/ex8.c.html
src/ts/examples/tutorials/ex11.c.html
src/ts/examples/tutorials/ex12.c.html
src/ts/examples/tutorials/ex14.c.html
src/ts/examples/tutorials/ex16.c.html

Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages