Skip to main content
`Ctrl`+`K`

# TSMonitorDrawCtxCreate

Creates the monitor context for `TSMonitorDrawCtx`

## Synopsis

    #include "petscts.h"
    PetscErrorCode TSMonitorDrawCtxCreate(MPI_Comm comm, const char host[], const char label[], int x, int y, int m, int n, PetscInt howoften, TSMonitorDrawCtx *ctx)

Collective

## Input Parameters

- comm - the MPI communicator to use

- host - the X display to open, or `NULL` for the local machine

- label - the title to put in the title bar

- x - the x screen coordinates of the upper left coordinate of the window

- y - the y screen coordinates of the upper left coordinate of the window

- m - the screen width in pixels

- n - the screen height in pixels

- howoften - if positive then determines the frequency of the plotting, if -1 then only at the final time

## Output Parameter

- ctx - the monitor context

## Options Database Keys

- -ts_monitor_draw_solution - draw the solution at each time-step

- -ts_monitor_draw_solution_initial - show initial solution as well as current solution

## Note

The context created by this function, `PetscMonitorDrawSolution()`, and `TSMonitorDrawCtxDestroy()` should be passed together to `TSMonitorSet()`.

## See Also

TS: Scalable ODE and DAE Solvers, `TS`, `TSMonitorDrawCtxDestroy()`, `TSMonitorSet()`, `TSMonitorDefault()`, `VecView()`, `TSMonitorDrawCtx`, `PetscMonitorDrawSolution()`

## Level

intermediate

## Location

src/ts/interface/tsmon.c

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