If you use the C interface and not the simplified interface you can pass an 
array of parameters to your lhs function. I found the best way to figure 
out how is to look at the code for how they made the `cvode` function (in 
Sundials.jl) to see how the C functions are being called and then look at 
the C manual for Sundials to see how to pass the arrays, it is very 
similar. Without more info it is hard to tell you exactly how to do it with 
your given community type.


On Monday, 2 November 2015 09:14:12 UTC-8, Timothée Poisot wrote:
>
> Hi list 
>
> I have a question related to SunDials.jl 
>
> We are building a model for which we currently have a function that 
> takes in two objects of custom types (c::Community and p::Parameters). 
> We'd like to move the code to Sundials, but we're not sure about the 
> best way to do it. 
>
> Currently, we have a function dNdt(c::Community, p::Parameters), 
> returning an array of Float64 with the derivative, for every population 
> size (stored in c.N[1], c.N[2], ...). 
>
> Is there a way to pass additional arguments to the functions used in 
> Sundial? 
>
> t 
>
> -- 
> Timothée Poisot, PhD 
>
> Professeur adjoint 
> Département des sciences biologiques 
> Université de Montréal 
>
> phone  : 514 343-7691 
> web    : http://poisotlab.io 
> twitter: @PoisotLab 
> meeting: https://tpoisot.youcanbook.me/ 
>
>

Reply via email to