Hi Asumu,

Thanks for your reply, sorry for the delayed response: was caught by some 
deadlines.

My main problem is how organise the Racket wrapper. I've checked Chicken's 
source for Sundials: while it provides nice and simple interface, it hides a 
bit too many things (for example, I don't think it's possible to provide your 
own Jacobian to CVODE-solver from Scheme, while it is possible to do it from 
C). So, I would want to create a layered library with low-level full-control 
layer and high-level simple interface.

Also, what is the best practice in terms of memory management since Sundials 
requires objects allocated in C-heap?

PS. One particular part I'm interested in is ODE-solver (CVODE). If I can 
manage to create the wrapper for this, the rest can follow and probably will be 
easier as I would be more familiar with technique.

PPS. Thanks for links I am checking MPFR-wrapper now.

Cheers,
Alexey

-----Original Message-----
From: Asumu Takikawa [mailto:as...@ccs.neu.edu] 
Sent: Saturday, 24 October 2015 3:44 AM
To: Alexey Cherkaev <alexey.cherk...@gmail.com>
Cc: racket-users@googlegroups.com
Subject: Re: [racket-users] Sundials FFI wrapper

Hi Alexey,

On 2015-10-22 10:08:52 +0200, Alexey Cherkaev wrote:
>    Is there anybody who has done something similar in Racket for other C
>    libraries? And who will be interested in creating the wrapper for
>    Sundials? (PS. I don’t feel my expertise are up to scratch to tackle it on
>    my own…)

There are a lot of C library bindings for Racket. The math library, for 
example, binds to MPFR:

  
https://github.com/racket/math/blob/master/math-lib/math/private/bigfloat/mpfr.rkt

If you look on the pkg site, there are a bunch:

  http://pkgs.racket-lang.org (try the "ffi" tag)

I don't personally have time to write such a wrapper for Sundials, but I did 
glance through the docs. It looks like there are a bunch of separate components 
with their own manuals.

Was there any particular part of it that you would want to use from Racket?

Cheers,
Asumu

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to