Skip to content

money for nothing and your odepacks for free#16

Closed
Zaneham wants to merge 11 commits intojacobwilliams:masterfrom
Zaneham:master
Closed

money for nothing and your odepacks for free#16
Zaneham wants to merge 11 commits intojacobwilliams:masterfrom
Zaneham:master

Conversation

@Zaneham
Copy link
Copy Markdown

@Zaneham Zaneham commented Dec 14, 2025

Summary

  • Replaced 8 dnrm2 BLAS calls with Fortran 2008 norm2() intrinsic
  • Added comprehensive method test suite validating MF flags and DLSODA switching
  • Documented equality tests and type mismatch rationale

Changes

  • src/M_da1/: datv.inc, dorthog.inc, dspiom.inc, dspigmr.inc (dnrm2 → norm2)
  • test/test_methods.f90: New test suite (6 tests covering MF=10/21/22, DLSODA, tolerances)
  • docs/: CHANGELOG.md, EQUALITY_AUDIT.md, TYPE_MISMATCH_ANALYSIS.md

References

All changes cite original ODEPACK documentation:

  • Hindmarsh (2001), opkd-sum.txt lines 229-237
  • Radhakrishnan & Hindmarsh (1993), UCRL-ID-113855 pp. 53-55, 88-91, 101-105

Test Results

All 8 tests pass (7 original examples + new test_methods suite)

Merry Christmas from New Zealand!

@Zaneham Zaneham changed the title money for nothing, your odepacks for free money for nothing and your odepacks for free Dec 14, 2025
@Zaneham
Copy link
Copy Markdown
Author

Zaneham commented Dec 14, 2025

Just an fyi test_methods.f90 is different from the original specs. It checks against analytical solutions with explicit tolerances. The core test is still the same as in documentation (at least how I read it). This is for compatibility with new hardware/compilers and anything else that may impact the original algorithm.

@Zaneham
Copy link
Copy Markdown
Author

Zaneham commented Dec 14, 2025

Sorry, I couldn't help myself and added some regression tests!

@Zaneham Zaneham closed this Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant