Posts

Showing posts from June, 2025

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...

Week 2: Working with the helper functions

Hi everybody, It's that time of the week again —here’s my latest update on the progress I’ve made. Let’s dive right into it! What I did this week As I mentioned in my previous blog , this week’s focus was on implementing the two helper functions: methodSwitch() and orderSwitch() functions, which is what I did.  Here's the link to the PR involving this : Pull Request Here’s a quick summary: Implemented the methodSwitch() and orderSwitch() functions. Added detailed docstrings for both to enhance readability and future maintainability. Refactored the stoda() method to include calls to these helpers where necessary. Developed and added unit tests for both methods to ensure correctness and coverage. Meeting with Mentors This week I had two meetings.       1-on-1 with Arthur – June 10, 2025 Arthur and I finally had our long-overdue 1-on-1 call! We’d been planning this since the application phase, but it kept getting postponed—so it was nice to finally cat...

Week 1: Coding Period Begins

Hi everyone, The official coding period has now begun, and I've diving deeper into the LSODA internals. Continuing from the last blog post, I focused primarily on refactoring helper methods within the LSODA package, while also  setting the foundation for a robust and modular design.   After reading some of the core literature on LSODA, I decided to examine the libLSODA codebase—the C library of LSODA translated from its original Fortran implementation in ODEPACK. My first step was to outline the overall program flow of the LSODA algorithm , which helped me visualize where and how different components fit together.   Upon exploring the main lsoda function, I chose to start by implementing and refining the helper functions , as they form the building blocks of the algorithm. I thoroughly reviewed the SBSCL LSODA implementation so far and identified areas for improvement. Here's a more detailed  explanation of my work ( PR ),  followed by wha...

Ending Community Bonding Period: Into the Code We Go

Hi everyone, I am back with another blog—this time, it's not just bonding.... it's real work. Last week I was on short break because of my end-term exams (yayy! Exams are over— and even better, they went well!). The summer vacations have been started now, and so has my progress on the project.   What I've Been Up To This week, I dove deep into the LSODA codebase—exploring classes, variables and helper functions. I also spent a good amount of time trying to wrap my head around the mathematics behind the algorithm. And honestly, that "aha!" movement when things started clicking was incredibly satisfying. Some methods like ddot , dscal , daxpy , idamax are relatively straightforward but others like prja , dgefa , dgesl , correction and stoda —are on different level. It took hours of reading through documentations and articles, but eventually, I began to understand their intent and logic. The number of variables and the way they're used in the algorithm can be...