[R-sig-dyn-mod] Minimal example of compiled rootfun in C

Jack Laverick j@ck@|@ver|ck @end|ng |rom @tr@th@@c@uk
Tue Dec 19 16:25:14 CET 2023


Hi Everyone,

I've been trying to implement a root function in an existing model to terminate when a steady state is reached.

The model is already written in C, but I've been struggling to implement this feature.

The example in the compiled code vignette (pg 17) specifies the call sequence:

void myroot(int *neq, double *t, double *y, int *ng, double *gout, double *out, int *ip )

but, as far as I can see, a full worked example is only available for Fortran code.

Does anyone have a short example they can share?
Thanks,
Jack Laverick



	[[alternative HTML version deleted]]



More information about the R-sig-dynamic-models mailing list