Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

WIP: Rosenbrock(-W) methods #72

Closed
wants to merge 15 commits into from
Closed

WIP: Rosenbrock(-W) methods #72

wants to merge 15 commits into from

Conversation

mauro3
Copy link
Contributor

@mauro3 mauro3 commented May 27, 2015

This is work in progress of me and @jedbrown to implement Rosenbrock(-W) methods. It uses a different interface to what ODE.jl has: implicit in-place functions. Works for ODE and DAEs. At the moment two methods are implemented: Rodas3 and RA34PW2.

This will take some time until it is ready to be considered for a merge. But it works now (see examples/ folder) and might be of use to someone. The simple benchmarks in the example folder suggests that these solvers can be faster and more memory efficient than DASSL and ode23s, e.g. van der Pol:

ode23s with jacobian:
elapsed time: 0.025410477 seconds (25_194_952 bytes allocated)
ode_rosw with jacobian:
elapsed time: 0.00535883 seconds  (2_462_312 bytes allocated)
ode_rosw with numeric jacobian:
elapsed time: 0.013636325 seconds (9_859_344 bytes allocated)

@coveralls
Copy link

Coverage Status

Coverage decreased (-9.1%) to 87.65% when pulling c48d9f7 on mauro3:m3/rosw into 162c881 on JuliaLang:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-6.0%) to 87.65% when pulling 8d8ad65 on mauro3:m3/rosw into 4058120 on JuliaLang:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.85%) to 87.8% when pulling 3bf2ce0 on mauro3:m3/rosw into 4058120 on JuliaLang:master.

mauro3 added 3 commits June 9, 2015 17:47
When intital time step overstepped tspan[end] then it didn't work correctly.
The problem was that A_ldiv_B! does not update B in case A is a sparse
lufact: https://github.com/JuliaLang/julia/issues/10787

Sparse coloring does not work yet.
@mauro3
Copy link
Contributor Author

mauro3 commented Jun 10, 2015

Large sparse Jacobians can now be numerically approximated using coloring with https://github.com/mauro3/MatrixColorings.jl. The bruss1d.jl example shows it in action.

@pwl
Copy link

pwl commented Jun 10, 2015

Wow, the performance boost is really impressive. What is the increase in performance for smaller systems? Do you think it could be used in DASSL?

@mauro3
Copy link
Contributor Author

mauro3 commented Jun 10, 2015

Thanks :-)

The coloring only really helps for sparse Jacobians (try setting N=5000 in the bruss1d example and use the numeric Jacobian in DASSL). I suspect small sparse systems may still be slower. You should be able to pretty much just plug it into DASSL except that I used in-place functions, see: https://github.com/mauro3/ODE.jl/blob/m3/rosw/src/rosw.jl#L465

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants