On Wed, May 4, 2011 at 2:18 PM, Matt Peddie <mpeddie@gmail.com> wrote:
Liam,

On Wed, May 04, 2011 at 10:20:42AM -0400, Liam Healy wrote:
> Unless I'm misunderstanding this request, this is already possible, in
> fact I'd regard it as the basic usage.  Perhaps you are thrown off by
> the with-ode-integration macro and example.

Great!  I followed the example to begin with, so that was my starting
point.

> I made up this macro in order to easily accommodate the case of
> non-array usage in the ODE solvers, because I wanted to show a simple
> example with scalars.  However if you look at how that macro expands,
> there is a symbol #:DEP that is bound to a foreign array with the
> appropriate dimensions:
>
> [ macro definition ]
>
> So what you want to do is mimic this form, but instead define your
> foreign array directly.  Is this what you're asking about?  If it's an
> issue of CL array vs. foreign array, then you can use #'cl-array or
> just copy it over at the beginning and end.

Thanks.  I saw the way that DEP works within the macro, and I rewrote it
a few times in an attempt to pass around the array directly and use
grid:gref inside my dynamics function.  I guess I just need to try a few
more things (like I said, newbie here).  I want to use the foreign array
and avoid copying.

> P.S.  Please join the mailing list to post.  Thank you.

I joined right after I got the `your message needs to be approved' mail;
sorry.

Matt
 
Good.  Having said all that, I think there is definitely room for a more meaningful and more general macro than with-ode-integration.  Though I'd like GSLL to be easier to use than GSL, at least calling make-ode-stepper, make-y-control, make-ode-evolution, apply-evolution, etc. on your own isn't any worse than GSL.  And the macro expansion is what I would use as a "tutorial"; I understand for a CL newcomer it's still a tough task.

Liam