Hi, I am trying to solve a model that consists of rather stiff ODEs in R. I use the package ODEsolve (lsoda) to solve these ODEs. To speed up the integration, the jacobian is also specified. Basically, the model is a one-dimensional advection-diffusion problem, and thus the jacobian is a tridiagonal matrix. The size of this jacobian is 100*100. In the original package LSODA it is possible to specify that the jacobian is banded, which makes its inversion very efficient. However, this feature seems to have been removed in the R version. Is there a way to overcome this limitation? Thanks dr. Karline Soetaert NIOO - CEME PO box 140 4400 AC Yerseke the Netherlands Phone: ++ 31 113 577487 fax: ++ 31 113 573616 e-mail: k.Soetaert@nioo.knaw.nl [[alternative HTML version deleted]]
Martin Maechler
2005-Nov-14 14:46 UTC
[R] odesolve with banded Jacobian [was "no subject"]
>>>>> "KSoet" == Soetaert, Karline <K.Soetaert at nioo.knaw.nl> >>>>> on Mon, 14 Nov 2005 13:20:24 +0100 writes:KSoet> Hi, I am trying to solve a model that consists of KSoet> rather stiff ODEs in R. KSoet> I use the package ODEsolve (lsoda) to solve these KSoet> ODEs. KSoet> To speed up the integration, the jacobian is also KSoet> specified. KSoet> Basically, the model is a one-dimensional KSoet> advection-diffusion problem, and thus the jacobian is KSoet> a tridiagonal matrix. KSoet> The size of this jacobian is 100*100. KSoet> In the original package LSODA it is possible to KSoet> specify that the jacobian is banded, which makes its KSoet> inversion very efficient. KSoet> However, this feature seems to have been removed in KSoet> the R version. KSoet> Is there a way to overcome this limitation? Yes. But probably not a very easy one; maybe even a very cumbersome one... ;-) Note however that questions like these should typically be addressed at the package author - which you can always quickly find out via > packageDescription("odesolve") Package: odesolve Version: 0.5-12 Date: 2004/10/25 Title: Solvers for Ordinary Differential Equations Author: R. Woodrow Setzer <setzer.woodrow at epa.gov> Maintainer: R. Woodrow Setzer <setzer.woodrow at epa.gov> Depends: R (>= 1.4.0) Description: This package provides an interface for the ODE solver lsoda. ODEs are expressed as R functions or as compiled code. ....................... I've CC'ed this e-mail to Woodrow to help you for once <..........> KSoet> [[alternative HTML version deleted]] KSoet> ______________________________________________ KSoet> ......... KSoet> PLEASE do read the posting guide! KSoet> http://www.R-project.org/posting-guide.html if you do read that guide, it will tell you - why you should always use a 'Subject' for your e-mails - why HTML-ified e-mails are not much liked and what you can do about it. Regards, Martin Maechler, ETH Zurich