Closed nawtrey closed 3 years ago
Another messy PR with misc changes.. Luckily the vast majority of the changes here have no affect on the functionality of the main code. The new matrix function is a copy/paste of the SVD solver with some minor changes to allow for the use of np.linalg.solve()
, which is then used in verification.py
. The new test is a copy/paste of the test above it, but instead of leveraging hypothesis
it only runs a specific "bad apple" case that causes issues for SVD and ODE (if ran without LSODA, or another stiff solver). I was going to add it as a hypothesis
@example
but I would have had to do adjust the tolerances based on whether or not it was using the example or the hypothesis-generated datasets, and that just didn't seem worth it.
All tests/checks are passing. Merging.
Description
Changes
ode.ode_solver()
to use "LSODA" integration method for automatic stiffness detection, faster calculation, and better accuracyAdds new matrix solver to
svd.py
module which uses the standardnp.linalg.solve()
and produces more accurate results for some problem casesAdds a test for a known problem case that illustrates the accuracy of SVD vs. ODE vs. a standard matrix solver
Status