Description Usage Arguments Examples
This function allows for evaluation of DAE systems using the SUNDIALS IDA solver hard coded in C.
1 2 3 4 |
y |
a numeric vector of the initial values of y of the DAE system. |
yp |
a numeric vector of the initial values of y' of the DAE system. |
times |
a numeric vector of times at which explicit estimates for y are desired. The first element should be the initial time (often 0). The IDA solver takes steps until the next requested time step t is overtaken. It then computes y(t) by interpolation. To easily create geometric sequences, the function gseq can be used. |
package |
a character vector of the package name containing the user-defined residual function. If the residual function is contained within the file "usrfcns.c" for example, the command R CMD SHLIB usrfcns.c will create the package "usrfcns" which can be loaded using the command dyn.load("usrfcns.so") or dyn.load("usrfcns.dll") depending on your system. |
resfunc |
a character vector defining name of the user-defined residual function contained within the package specified by the |
jacfunc |
a character vector defining the name of the user-defined Jacobian (if desired). By default, the IDA solver will approximate the Jacobian by difference quotients. |
rootfunc |
a character vector defining the name of the user-defined method (in C) for computing the roots of some set of functions. The number of functions is set by /codenumroots. |
fndata |
a numeric vector of data to be used by the user-defined functions. |
numroots |
the number of functions defined by rootfunc. |
rtol |
a scalar that defines the relative error tolerance. The relative error tolerance is not recommended to exceed 1.0E-3. On the other hand, |
atol |
a scalar or vector that defines the absolute error tolerance(s). The absolute tolerances need to be set to control absolute errors when any components of the solution vector |
maxnumsteps |
a scalar that sets the maximum number of steps per timestep. The default is 500. |
maxstep |
a scalar that sets the maximum absolute step size. The default is 0 = infinity. |
verbose |
a logical value that, when TRUE, triggers verbose output from the solver. |
lasttime |
by default, with lasttime = FALSE, a data frame is returned that includes all of the values y at each time point. If lasttime is set to TRUE, only the last values of y will be returned (i.e. at the last time point specified). |
1 | ### See Manual for description and examples
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.