Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9183 > unrolled thread

Re: Compiling Runge-kutta

Started byMurray Eisenberg <murray@math.umass.edu>
First post2012-03-21 10:48 +0000
Last post2012-03-21 10:48 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Compiling Runge-kutta Murray Eisenberg <murray@math.umass.edu> - 2012-03-21 10:48 +0000

#9183 — Re: Compiling Runge-kutta

FromMurray Eisenberg <murray@math.umass.edu>
Date2012-03-21 10:48 +0000
SubjectRe: Compiling Runge-kutta
Message-ID<jkcblf$qgn$1@smc.vnet.net>
Why not just use the built-in NDSolve with a Method option?

On 3/20/12 3:21 AM, Joao wrote:
> Hi there, I've been going through this thread (Vector Runge-Kutta ODE solver with compilation?) and I would like to know if anyone could give me an opinion on the problem I have.
>
> Basically I am using the same runge-kutta 4 taken from Jason Cantarella's page than Dmitry was, but I am using the NestList version.
>
> I really need to speed up this algorithm. When I did one of the examples you provided on this thread, the compiled version solved it at a duration of 7% of the non compiled version which was pretty cool.
>
> My problem was that when I tried to use it on the work I'm doing the compiled and non compiled versions took the same time. My guess is that the compiled version wasn't able to compute and it returned to the non-compiled version.
>
> At this moment I don't know if I'm doing something wrong or if the nature of the RHS of the functions I'm using prevents the compiled algorithm to work in a proper way.
>
> I can send the code if necessary.
>
> Nevertheless, I may advance that my RHS is a system of 6 ODE (hamiltonian), these ODE call other functions (controls). These last functions (controls) are coded in a module box. Inside that box are some implicit functions in R1 (hence a newton algorithm is called) and there is also a switch - if a given condition is above a threshold the control box assumes one form, bellow that threshold another form is assumed. After all these calculations inside the control box it returns simply a vector of order 3.
>
> I would appreciate any help. At the moment I do not know if this is feasible with Compile or not. Maybe I have to put all this different boxes inside a compile?
>
> Thanks in advance
>
> Joao Pereira
>

-- 
Murray Eisenberg                     murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web