Week 3: The Tale of lsoda Driver Function
Hi readers, Today, I’m feeling the calm after a storm—serene, but only after some serious turbulence. And yes, I have some great news to share. As you know, this week I focused on implementing the lsoda driver function . But what I didn’t expect was the wild debugging journey it would take me on. So... Fasten your seatbelts—and lets dive right into it. The Plan: Refactor and Implement I started the week by refactoring the lsoda() driver function block by block, and designing three supporting methods: allocMemory() lsodaFree() lsodaPrepare() For allocMemory() , after much thinking, I decided to use a constructor-like approach to initialize all necessary LSODACommon variables. This function is called via lsodaPrepare() at the beginning of any solve operation, with the required arguments. For lsodaFree() —thanks to the JVM's garbage collector , I didn’t need to do anything explicit. Yay, Java! Feeling optimistic, I wrote two integration tests: a line...