[R] odesolve with banded Jacobian [was "no subject"]

Setzer.Woodrow@epamail.epa.gov Setzer.Woodrow at epamail.epa.gov
Mon Nov 21 16:38:18 CET 2005


Dear Karline Soetaert,
I've just returned from a week of travel, so have not had a great deal
of time to look at your request.  From a brief rereading of the original
lsoda documentation, it looks as if all I need to do is set a flag to a
different value (jt to 4), and leave it up to the user to construct the
function that calculates the jacobian  properly.  If you'd contact me
directly, ideally with a test model, I will see if the modification is
really that simple; if so, I'll make the change and release an updated
odesolve to CRAN.
Woody
PS: Thanks, Martin

R. Woodrow Setzer, Jr.
National Center for Computational Toxicology
US Environmental Protection Agency
Mail Drop B205-01/US EPA/RTP, NC 27711
Ph: (919) 541-0128    Fax: (919) 541-1194


                                                                        
             Martin Maechler                                            
             <maechler at stat.m                                           
             ath.ethz.ch>                                            To 
                                      "Soetaert, Karline"               
             11/14/2005 09:46         <K.Soetaert at nioo.knaw.nl>         
             AM                                                      cc 
                                      R-help at stat.math.ethz.ch, Woodrow 
                                      Setzer/RTP/USEPA/US at EPA           
              Please respond                                    Subject 
                    to                Re: [R] odesolve with banded      
             Martin Maechler          Jacobian [was "no subject"]       
             <maechler at stat.m                                           
               ath.ethz.ch>                                             
                                                                        
                                                                        
                                                                        
                                                                        




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




More information about the R-help mailing list