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.

Purpose<br />

KINJacTimesVecFn<br />

KINJacTimesVecFn - type for user provided Jacobian times vec<strong>to</strong>r function.<br />

Synopsis<br />

This is a script file.<br />

Description<br />

KINJacTimesVecFn - type for user provided Jacobian times vec<strong>to</strong>r function.<br />

The function JTVFUN must be defined as<br />

FUNCTION [JV, FLAG, IER] = JTVFUN(Y,V,FLAG)<br />

and must return a vec<strong>to</strong>r JV corresponding <strong>to</strong> the product of the<br />

Jacobian of f(y) with the vec<strong>to</strong>r v. On input, FLAG indicates if<br />

the iterate has been updated in the interim. JV must be update<br />

or reevaluated, if appropriate, unless FLAG=false. This flag must<br />

be reset by the user.<br />

If successful, IER should be set <strong>to</strong> 0. If an error occurs, IER should<br />

be set <strong>to</strong> a nonzero value.<br />

If a user data structure DATA was specified in KINMalloc, then<br />

JTVFUN must be defined as<br />

FUNCTION [JV, FLAG, IER, NEW_DATA] = JTVFUN(Y,V,FLAG,DATA)<br />

If the local modifications <strong>to</strong> the user data structure are needed in<br />

other user-provided functions then, besides setting the vec<strong>to</strong>r JV, and<br />

flags FLAG and IER, the JTVFUN function must also set NEW_DATA. Otherwise,<br />

it should set NEW_DATA=[] (do not set NEW_DATA = DATA as it would lead <strong>to</strong><br />

unnecessary copying).<br />

See also KINSetOptions<br />

NOTE: JTVFUN is specified through the property JacobianFn <strong>to</strong> KINSetOptions<br />

and is used only if the property LinearSolver was set <strong>to</strong> ’GMRES’ or ’BiCGStab’.<br />

Purpose<br />

KINPrecSetupFn<br />

KINPrecSetupFn - type for user provided preconditioner setup function.<br />

Synopsis<br />

This is a script file.<br />

Description<br />

KINPrecSetupFn - type for user provided preconditioner setup function.<br />

The user-supplied preconditioner setup subroutine should compute<br />

the right-preconditioner matrix P used <strong>to</strong> form the scaled preconditioned<br />

linear system:<br />

47

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

Saved successfully!

Ooh no, something went wrong!