lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 14/02/2011, at 9:08 PM, Francesco Abbate wrote:

> By the way if someone want to help with this task he is very welcome.
> My plan is the following:
> - take the rk4_2d.lua code (modified by Mike)
> - optimize it further to take advantage of Lua possiblities to return
>  multiple values for returning the derivates
> - fine tune this code
> - use the basic stepper to implement an adaptive stepper with a nice
>  Lua interface
> - when the code works for a system N=2 take the code and transform it in a
>  template to generate dynamically the code for any N between 1 and lets say
>  10. For N > 10 we should probably avoid to expand the local variable and
>  store each component in a FFI double VLA

Any particular reason to use RK4?  My trusty old copy of Numerical Recipes suggests higher order methods with implicit error estimation are better.