progress#
This is a small submodule which contains code to make printing progress reports and feedback pretty.
To report on the state of the solver, the ProgressTracker
type
is used, which contains state about where the solver stated, when it
should stop and what is the current state. It also has methods that
allow it to have pretty terminal output.
- class mfv2d.progress.ProgressTracker(err_tol: float, err_initial: float, err_cur: float, iter_max: int, iter_cur: int = 0, iter_width: int = 10, err_width: int = 10)[source]#
Type for progress tracking.
- state_str(format_string: str) str [source]#
Get a string with current state.
- Parameters:
format_string (str) – String that will be formatted with
str.format()
method. It will receive the spinner character, the iteration progress bar and error indicator bar in that order.- Returns:
Formatted string.
- Return type:
For reporting on error distribution and distribution of element orders,
the type HistogramFormat
is used. It can behave oddly for very
low number of elements.