Check shared library (DLL/.so) of a compiled model and create a list of symbols.
checkDLL(func, jacfunc, dllname, initfunc, verbose, nout, outnames, JT = 1)
List of class deSolve.symbols
with:
pointer to the init function of the DLL (class "externalptr").
pointer to the derivative function in the DLL (class "externalptr").
pointer to the Jacobi function in the DLL (class "externalptr").
number of output variables calculated in the compiled function.
list of names of derivatives and output variables.
character: name of the derivative function.
an R function, that computes the
Jacobian of the system of differential equations
\(\partial\dot{y}_i/\partial y_j\), or
a string giving the name of a function or subroutine in
dllname
that computes the Jacobian.
a string giving the name of the shared library
(without extension) that contains all the compiled function or
subroutine definitions refered to in func
and
jacfunc
.
the name of the initialisation function
(which initialises values of parameters), as provided in
dllname
. See package vignette "compiledCode"
.
reserved for future extensions.
only used if dllname
is specified and the model is
defined in compiled code: the number of output variables calculated
in the compiled function func
, present in the shared
library. Note: it is not automatically checked whether this is
indeed the number of output variables calculated in the dll - you have
to perform this check in the code.
only used if dllname
is specified and
nout
> 0: the names of output variables calculated in the
compiled function func
, present in the shared library.
These names will be used to label the output matrix.
integer specifying the type of the Jacobian. The default value of 1
must be set to 2 for solver lsodes
if `func` is specified in a DLL
or inline compiled and if a `jacfunc` is provided.
The function checkDLL
is normally called internally by the solver
functions. It can be used to avoid overhead, when a small compiled
model with a low number of integration steps is repeatedly called.
The feature is currently only available for the lsoda
solver.
lsoda
if (FALSE) {
symbols <- checkDLL(func = "derivs", jacfunc = NULL, dllname = "lorenzc",
initfunc = "initmod", verbose = TRUE, nout = 0,
outnames = NULL, JT = 1)
}
Run the code above in your browser using DataLab