ComputationalScienceLaboratory / ODE-Test-Problems

A MATLAB suite of initial value problems
https://computationalsciencelaboratory.github.io/ODE-Test-Problems/
MIT License
9 stars 2 forks source link

Document octave bugs #49

Closed Steven-Roberts closed 1 year ago

Steven-Roberts commented 1 year ago

Let me know if there are any other octave-specific issues

AndreyAPopov commented 1 year ago

CUSP, lorenz96, and nbody took a super long time to solve in octave. ASCHERLINEARDAE also fails, but this is expected right?

Steven-Roberts commented 1 year ago

The performance difference is mostly due to using ode23s in Octave instead of ode15s. How is Ascher problem failing? Works fine for me.

AndreyAPopov commented 1 year ago

`model.solve error: @: function called with too many inputs error: called from onSettingsChanged>@ ode23s at line 203 column 18 internalSolve at line 214 column 17 solve at line 110 column 17

`

Steven-Roberts commented 1 year ago

Hmm what version of Octave?

AndreyAPopov commented 1 year ago

8.2.0

AndreyAPopov commented 1 year ago

It looks like in my version of octave, ode23s expects the mass function to have two arguments, t and x, but ascherlineardae only provides Mass(t)

Steven-Roberts commented 1 year ago

This PR changes the default solver for Ascher problem to ode15s so this shouldn't be a problem

AndreyAPopov commented 1 year ago

I was on the octave branch not the octave_compat branch ...

AndreyAPopov commented 1 year ago

Bouncingball should still fail right?

AndreyAPopov commented 1 year ago

I pushed a fix for bouncing ball. It will fail in octave unless MaxStep is set to 1e-2 or lower, as octave has a bug that makes it fail to detect some events (thus causing the ball to go below the ground).

AndreyAPopov commented 1 year ago

All problems now build and solve in octave. Hooray!

Steven-Roberts commented 1 year ago

I think we're ready to merge, right?

AndreyAPopov commented 1 year ago

Basically, unless you feel like change the parseTime thing.