comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » vectorized RK4
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: vectorized RK4 [message #51540 is a reply to message #51281] Tue, 21 November 2006 08:50 Go to previous message
Kenneth Bowman is currently offline  Kenneth Bowman
Messages: 86
Registered: November 2006
Member
In article <45536299$0$498$815e3792@news.qwest.net>,
"R.G. Stockwell" <no@email.please> wrote:

> I'm looking at a problem where we have to calculate
> a Runge Kutta solution for a number of particles.
>
> From some reading I did, I thought I could vectorize
> the RK4 call over the number of particles.
>
> From the help example, we have the following call,
>> RK4(Y, allders, X, H, 'differential',/double)
>
> For a single particle
> x = 0.0
> y = [4.0,6.0]
> allders is a 2 element array
> H = 0.5
> "differential" is a defined function returns a 2 element array.
>
>
> So, how does one go about vectorizing this for 1000 particles?
> Is that possible?
> I cannot just pass in vectors for x and y
> (and of course have the appropriate differential function)
>
>
> Cheers,
> bob

Bob,

You may have already solved this, but if not, RK4 is simple enough to code
yourself. You lose a little flexibility, but you can vectorize across particles.

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: open and save a set of image
Next Topic: Re: colour conversion 8 -> 24 bit

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 14:39:23 PDT 2025

Total time taken to generate the page: 1.60049 seconds