Skip to content
Prev 396 / 696 Next

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

And what about subroutine myroot on page 17 of this vignette?


-----Original Message-----
From: R-sig-dynamic-models [mailto:r-sig-dynamic-models-bounces at r-project.org] On Behalf Of Derek van der Kamp
Sent: dinsdag 24 maart 2015 0:58
To: r-sig-dynamic-models at r-project.org
Subject: [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


_______________________________________________
R-sig-dynamic-models mailing list
R-sig-dynamic-models at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-dynamic-models
Message-ID: <52b62d0be4e444f19f029cd96e5a8be0@livia.nioz.nl>
In-Reply-To: <CAGXJNPbqzi-5FoLXVDv2NJpNpYGxdk_y0FMYj5LUh+Z4UBoG8Q@mail.gmail.com>