4.8 pde.trackers package
Classes for tracking simulation results in controlled interrupts.
Trackers are classes that periodically receive the state of the simulation to analyze, store, or output it. The trackers defined in this module are:
Tracker calling a function periodically. |
|
Tracker interrupting the simulation when the state is not finite. |
|
Tracker storing custom data obtained by calling a function. |
|
PlotTracker with defaults for live plotting. |
|
Tracking interrupting the simulation when material conservation is broken. |
|
Tracker interrupting the simulation once a duration has passed. |
|
Tracker plotting data on screen, to files, or writes a movie. |
|
Tracker printing data to a stream (default: stdout) |
|
Tracker showing the progress of the simulation. |
|
Tracker aborting the simulation once steady state is reached. |
|
Special tracker that records runtime of the simulation at regular intervals. |
|
Tracker showing the state interactively in napari. |
Some trackers can be referenced by name for convenience when using them in simulations.
The list of supported names is returned by registered_trackers().
Multiple trackers can be collected in a TrackerCollection, which provides
methods for handling them efficiently. Moreover, custom trackers can be implemented by
deriving from TrackerBase. Note that trackers generally receive
a view into the current state, implying that they can adjust the state by modifying it
in-place. Moreover, trackers can abort the simulation by raising the special exception
StopIteration.
For each tracker, the time at which the simulation is interrupted can be decided using one of the following classes:
Interrupts at fixed, predetermined times. |
|
Interrupts equidistantly spaced in time. |
|
Interrupts with successively increased spacing. |
|
Interrupts from the geometric sequence \(t_i = \Delta t f^i\) |
|
Interrupts spaced equidistantly in real time. |
In particular, interrupts can be specified conveniently using
parse_interrupt().
Inheritance structure of the tracker classes:
