Sunday, July 10, 2011

Solve ODEs with Math::GSLx::ODEIV2

In investigating the GSL library for solving Ordinary Differential Equations (ODEs) I noticed that a new interface (gsl_odeiv2) that hadn't yet been exposed in a Perl module. Further I noticed that some of the existing ODE modules for Perl are a little hard to use.

Along with those considerations I had wanted to make a Perl/XS module in preparation if I ever get my FLI camera module finished I will need this skill.

Put it all together and now I am here to introduce my very Perl-ish (in my opinion) Math::GSLx::ODEIV2. Yes the name is bad, but it is descriptive.

I also learned (hopefully) how to prevent installation when the library is not present in the system. Normally this would have involved Devel::CheckLib but since GSL comes with a utility (gsl-config) I was able to avoid that.

Anyway I hope some people find it useful and I am happy to hear comments and work to improve the module on its github page.

No comments: