I've been having trouble running bvp_solver functions after a solver
failed. I started digging around in the code and found what I think are
a few bugs with how the successIndicator/INFO parameters are handled.
They were not copied by value back into the Python objects, so all
Solution objects shared the same object here. (Perhaps this relates to
a change in f2py? This (and yerror) are now 1-element arrays; if they
had been simple ints before, this wouldn't have been a problem.) Also,
the BVP INFO value was not properly set to the value passed in from Python.
I've attached a patch that fixes these problems. In a short amount of
testing, they work for me, but I haven't testing them exhaustively. I
also didn't know what format patch would be best; let me know if you'd
like another type.
Thanks,
Robert
Git is good. I've sent a pull request.
> I would also appreciate any examples you have that break bvp_solver
> so I can incorporate them into the testing.
Attached is a simple test that works after this change is applied. The
second call to bvp.solve is designed to fail, but it had been messing up
sol1 in the process. There are two problems: First, sol1 and sol2 share
the same object as ._successIndicator. This is set to indicate failure
after sol2 fails, preventing sol1 from working. Second, the bvp
internals were not having this passed in correctly, so even if
sol1._successIndicator is set correctly, the solver still bails out.
Thanks for providing this tool!
Robert