13.01.2013 Views

sundialsTB, a Matlab Interface to SUNDIALS - Site Index Page ...

sundialsTB, a Matlab Interface to SUNDIALS - Site Index Page ...

sundialsTB, a Matlab Interface to SUNDIALS - Site Index Page ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2 matlab <strong>Interface</strong> <strong>to</strong> cvodes<br />

The matlab interface <strong>to</strong> cvodes provides access <strong>to</strong> all functionality of the cvodes solver, including<br />

IVP simulation and sensitvity analysis (both forward and adjoint).<br />

The interface consists of 9 user-callable functions. The user must provide several required and<br />

optional user-supplied functions which define the problem <strong>to</strong> be solved. The user-callable functions<br />

and the types of user-supplied functions are listed in Table 1 and fully documented later in this<br />

section. For more in depth details, consult also the cvodes user guide [3].<br />

To illustrate the use of the cvodes matlab interface, several example problems are provided<br />

with <strong>sundialsTB</strong>, both for serial and parallel computations. Most of them are matlab translations<br />

of example problems provided with cvodes.<br />

Functions<br />

Function types<br />

Table 1: cvodes matlab interface functions<br />

CVodeSetOptions creates an options structure for cvodes.<br />

CVodeMalloc allocates and initializes memory for cvodes.<br />

CVodeMallocB allocates and initializes backward memory for cvodes.<br />

CVode integrates the ODE.<br />

CVodeB integrates the backward ODE.<br />

CVodeGetStats returns statistics for the cvodes solver.<br />

CVodeGetStatsB returns statistics for the backward cvodes solver.<br />

CVodeGet extracts data from cvodes memory.<br />

CVodeFree deallocates memory for the cvodes solver.<br />

CVodeMoni<strong>to</strong>r sample moni<strong>to</strong>ring function.<br />

CVRhsFn RHS function<br />

CVRootFn root-finding function<br />

CVQuadRhsFn quadrature RHS function<br />

CVDenseJacFn dense Jacobian function<br />

CVBandJacFn banded Jacobian function<br />

CVJactimesVecFn Jacobian times vec<strong>to</strong>r function<br />

CVPrecSetupFn preconditioner setup function<br />

CVPrecSolveFn preconditioner solve function<br />

CVGlocalFn RHS approximation function (BBDPre)<br />

CVGcommFn communication function (BBDPre)<br />

CVSensRhsFn sensitivity RHS function<br />

CVSensRhs1Fn sensitivity RHS function (single)<br />

CVMoni<strong>to</strong>rFn moni<strong>to</strong>ring function<br />

3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!