Skip to content
Prev 395 / 696 Next

[R-sig-dyn-mod] root functions in fortran

Greetings,

I was wondering if anyone has experience writing root functions using
fortran

I would like to keep one of my state variables below a certain value.

To do this I want to use a root function to determine when that theshold
value is reached, and an event function to keep the state variable below
that threshold.

However, I'm using fortran, and I can not find any examples in which a root
function was used in compiled code.

In the package vignette (
http://cran.r-project.org/web/packages/deSolve/vignettes/compiledCode.pdf)
no root function is ever used; the event function is called based on
pre-defined event times.

Is it possible to define and use a root function in fortran?

Thanks for your time,

Derek van der Kamp