This repository has been archived by the owner on Mar 18, 2023. It is now read-only.
Added ProgressMeter functionality [Experimental/RFC] #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a small PR (which may be more of a proof of concept than anything else) in which Tim Holy's ProgressMeter package is used to show how much of a ODE problem a solver has already solved.
I found that the iterator formulation of ODE.jl allowed for very easy integration of the ProgressMeter package. All of the code is implemented at the top level interface, using the iteration loop over the
iterate
object that is created for the solver and problem combination. In order to enable the progress meter on a given run, I added a new keyword agrument to the fixed and adaptive solver options calledprogressmeter
. When set totrue
, a bar showing how far along the time span the solver has already solved for is displayed. It is set tofalse
as a default. Below is a screenshot of it all in action:Here is the script run in the above screenshot.
Also a cool upshot of this is, because the ODE solvers do have a somewhat uniform running time, the predicted "ETA" does give an appropriate estimate.
All of this is just one of the many pluses for a general iterator framework!
Thanks a million to @mauro3 for the idea and thoughts for how to get started.