scikits-odes-sundials

scikits_odes_sundials

SUNDIALS wrapper

exception scikits_odes_sundials.CVODESolveException(soln)[source]

Base class for exceptions raised by CVODE.validate_flags.

exception scikits_odes_sundials.CVODESolveFailed(soln)[source]

CVODE.solve failed to reach endpoint

exception scikits_odes_sundials.CVODESolveFoundRoot(soln)[source]

CVODE.solve found a root

exception scikits_odes_sundials.CVODESolveReachedTSTOP(soln)[source]

CVODE.solve reached the endpoint specified by tstop.

exception scikits_odes_sundials.IDASolveException(soln)[source]

Base class for exceptions raised by IDA.validate_flags.

exception scikits_odes_sundials.IDASolveFailed(soln)[source]

IDA.solve failed to reach endpoint

exception scikits_odes_sundials.IDASolveFoundRoot(soln)[source]

IDA.solve found a root

exception scikits_odes_sundials.IDASolveReachedTSTOP(soln)[source]

IDA.solve reached the endpoint specified by tstop.

scikits_odes_sundials.cvode

class scikits_odes_sundials.cvode.CV_ContinuationFunction

Simple wrapper for functions called when ROOT or TSTOP are returned.

evaluate(self, DTYPE_t t, ndarray y, CVODE solver) int
class scikits_odes_sundials.cvode.CV_JacRhsFunction

Prototype for jacobian function.

Note that evaluate must return a integer, 0 for success, positive for recoverable failure, negative for unrecoverable failure (as per CVODE documentation).

evaluate(self, DTYPE_t t, ndarray y, ndarray fy, ndarray J) int

Returns the Jacobi matrix of the right hand side function, as:

d(rhs)/d y

(for dense the full matrix, for band only bands). Result has to be stored in the variable J, which is preallocated to the corresponding size.

This is a generic class, you should subclass is for the problem specific purposes.

class scikits_odes_sundials.cvode.CV_JacTimesSetupFunction

Prototype for jacobian times setup function.

Note that evaluate must return a integer, 0 for success, non-zero for error (as per CVODE documentation), with >0 a recoverable error (step is retried).

evaluate(self, DTYPE_t t, ndarray y, ndarray fy, userdata=None) int

This function calculates the product of the Jacobian with a given vector v. Use the userdata object to expose Jacobian related data to the solve function.

This is a generic class, you should subclass it for the problem specific purposes.

class scikits_odes_sundials.cvode.CV_JacTimesVecFunction

Prototype for jacobian times vector function.

Note that evaluate must return a integer, 0 for success, non-zero for error (as per CVODE documentation).

evaluate(self, ndarray v, ndarray Jv, DTYPE_t t, ndarray y, userdata=None) int

This function calculates the product of the Jacobian with a given vector v. Use the userdata object to expose Jacobian related data to the solve function.

This is a generic class, you should subclass it for the problem specific purposes.

class scikits_odes_sundials.cvode.CV_PrecSetupFunction

Prototype for preconditioning setup function.

Note that evaluate must return a integer, 0 for success, positive for recoverable failure, negative for unrecoverable failure (as per CVODE documentation).

evaluate(self, DTYPE_t t, ndarray y, bool jok, jcurPtr, DTYPE_t gamma, userdata=None) int

This function preprocesses and/or evaluates Jacobian-related data needed by the preconditioner. Use the userdata object to expose the preprocessed data to the solve function.

This is a generic class, you should subclass it for the problem specific purposes.

class scikits_odes_sundials.cvode.CV_PrecSolveFunction

Prototype for precondititioning solution function.

Note that evaluate must return a integer, 0 for success, positive for recoverable failure, negative for unrecoverable failure (as per CVODE documentation).

evaluate(self, DTYPE_t t, ndarray y, ndarray r, ndarray z, DTYPE_t gamma, DTYPE_t delta, int lr, userdata=None) int

This function solves the preconditioned system P*z = r, where P may be either a left or right preconditioner matrix. Here P should approximate (at least crudely) the Newton matrix M = I − gamma*J, where J is the Jacobian of the system. If preconditioning is done on both sides, the product of the two preconditioner matrices should approximate M.

This is a generic class, you should subclass it for the problem specific purposes.

class scikits_odes_sundials.cvode.CV_RhsFunction

Prototype for rhs function.

Note that evaluate must return a integer, 0 for success, positive for recoverable failure, negative for unrecoverable failure (as per CVODE documentation).

evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, userdata=None) int
class scikits_odes_sundials.cvode.CV_RootFunction

Prototype for root function.

Note that evaluate must return a integer, 0 for success, non-zero if error (as per CVODE documentation).

evaluate(self, DTYPE_t t, ndarray y, ndarray g, userdata=None) int
class scikits_odes_sundials.cvode.CV_WrapJacRhsFunction
evaluate(self, DTYPE_t t, ndarray y, ndarray fy, ndarray J) int

Returns the Jacobi matrix (for dense the full matrix, for band only bands. Result has to be stored in the variable J, which is preallocated to the corresponding size.

set_jacfn(self, jacfn)

Set some jacobian equations as a JacRhsFunction executable class.

class scikits_odes_sundials.cvode.CV_WrapJacTimesSetupFunction
evaluate(self, DTYPE_t t, ndarray y, ndarray fy, userdata=None) int
set_jac_times_setupfn(self, jac_times_setupfn)

Set some CV_JacTimesSetupFn executable class.

class scikits_odes_sundials.cvode.CV_WrapJacTimesVecFunction
evaluate(self, ndarray v, ndarray Jv, DTYPE_t t, ndarray y, userdata=None) int
set_jac_times_vecfn(self, jac_times_vecfn)

Set some CV_JacTimesVecFn executable class.

class scikits_odes_sundials.cvode.CV_WrapPrecSetupFunction
evaluate(self, DTYPE_t t, ndarray y, bool jok, jcurPtr, DTYPE_t gamma, userdata=None) int
set_prec_setupfn(self, prec_setupfn)

set a precondititioning setup method as a CV_PrecSetupFunction executable class

class scikits_odes_sundials.cvode.CV_WrapPrecSolveFunction
evaluate(self, DTYPE_t t, ndarray y, ndarray r, ndarray z, DTYPE_t gamma, DTYPE_t delta, int lr, userdata=None) int
set_prec_solvefn(self, prec_solvefn)

set a precondititioning solve method as a CV_PrecSolveFunction executable class

class scikits_odes_sundials.cvode.CV_WrapRhsFunction
evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, userdata=None) int
set_rhsfn(self, rhsfn)

set some rhs equations as a RhsFunction executable class

with_userdata

‘int’

Type:

with_userdata

class scikits_odes_sundials.cvode.CV_WrapRootFunction
evaluate(self, DTYPE_t t, ndarray y, ndarray g, userdata=None) int
set_rootfn(self, rootfn)

set root-ing condition(equations) as a RootFunction executable class

class scikits_odes_sundials.cvode.StatusEnum(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
scikits_odes_sundials.cvode.no_continue_fn(t, y, solver)

scikits_odes_sundials.ida

class scikits_odes_sundials.ida.IDA_ContinuationFunction

Simple wrapper for functions called when ROOT or TSTOP are returned.

evaluate(self, DTYPE_t t, ndarray y, ndarray yp, IDA solver) int
class scikits_odes_sundials.ida.IDA_JacRhsFunction

Prototype for jacobian function.

Note that evaluate must return a integer, 0 for success, positive for recoverable failure, negative for unrecoverable failure (as per IDA documentation).

evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, ndarray residual, DTYPE_t cj, ndarray J, userdata=None) int

Returns the Jacobi matrix of the residual function, as:

d(res)/d y + cj d(res)/d ydot

(for dense the full matrix, for band only bands). Result has to be stored in the variable J, which is preallocated to the corresponding size.

This is a generic class, you should subclass is for the problem specific purposes.”

class scikits_odes_sundials.ida.IDA_JacTimesSetupFunction

Prototype for jacobian times setup function.

Note that evaluate must return a integer, 0 for success, non-zero for error (as per CVODE documentation), with >0 a recoverable error (step is retried).

evaluate(self, DTYPE_t tt, ndarray yy, ndarray yp, ndarray rr, DTYPE_t cj, userdata=None) int

This function calculates the product of the Jacobian with a given vector v. Use the userdata object to expose Jacobian related data to the solve function.

This is a generic class, you should subclass it for the problem specific purposes.

class scikits_odes_sundials.ida.IDA_JacTimesVecFunction

Prototype for jacobian times vector function.

Note that evaluate must return a integer, 0 for success, non-zero for error (as per IDA documentation).

evaluate(self, DTYPE_t t, ndarray yy, ndarray yp, ndarray rr, ndarray v, ndarray Jv, DTYPE_t cj, userdata=None) int

This function calculates the product of the Jacobian with a given vector v. Use the userdata object to expose Jacobian related data to the solve function.

This is a generic class, you should subclass it for the problem specific purposes.

class scikits_odes_sundials.ida.IDA_PrecSetupFunction

Prototype for preconditioning setup function.

Note that evaluate must return a integer, 0 for success, positive for recoverable failure, negative for unrecoverable failure (as per CVODE documentation).

evaluate(self, DTYPE_t t, ndarray y, ndarray yp, ndarray rr, DTYPE_t cj, userdata=None) int

This function preprocesses and/or evaluates Jacobian-related data needed by the preconditioner. Use the userdata object to expose the preprocessed data to the solve function.

This is a generic class, you should subclass it for the problem specific purposes.

class scikits_odes_sundials.ida.IDA_PrecSolveFunction

Prototype for precondititioning solution function.

Note that evaluate must return a integer, 0 for success, positive for recoverable failure, negative for unrecoverable failure (as per CVODE documentation).

evaluate(self, DTYPE_t t, ndarray y, ndarray yp, ndarray r, ndarray rvec, ndarray z, DTYPE_t cj, DTYPE_t delta, userdata=None) int

This function solves the preconditioned system P*z = r, where P may be either a left or right preconditioner matrix. Here P should approximate (at least crudely) the Newton matrix M = I − gamma*J, where J is the Jacobian of the system. If preconditioning is done on both sides, the product of the two preconditioner matrices should approximate M.

This is a generic class, you should subclass it for the problem specific purposes.

class scikits_odes_sundials.ida.IDA_RhsFunction

Prototype for rhs function.

Note that evaluate must return a integer, 0 for success, positive for recoverable failure, negative for unrecoverable failure (as per IDA documentation).

evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, ndarray result, userdata=None) int
class scikits_odes_sundials.ida.IDA_RootFunction

Prototype for root function.

Note that evaluate must return a integer, 0 for success, non-zero for error (as per IDA documentation).

evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, ndarray g, userdata=None) int
class scikits_odes_sundials.ida.IDA_WrapJacRhsFunction
evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, ndarray residual, DTYPE_t cj, ndarray J, userdata=None) int

Returns the Jacobi matrix (for dense the full matrix, for band only bands. Result has to be stored in the variable J, which is preallocated to the corresponding size.

set_jacfn(self, jacfn)

Set some jacobian equations as a JacResFunction executable class.

class scikits_odes_sundials.ida.IDA_WrapJacTimesSetupFunction
evaluate(self, DTYPE_t tt, ndarray yy, ndarray yp, ndarray rr, DTYPE_t cj, userdata=None) int
set_jac_times_setupfn(self, jac_times_setupfn)

Set some IDA_JacTimesSetupFn executable class.

class scikits_odes_sundials.ida.IDA_WrapJacTimesVecFunction
evaluate(self, DTYPE_t t, ndarray yy, ndarray yp, ndarray rr, ndarray v, ndarray Jv, DTYPE_t cj, userdata=None) int
set_jac_times_vecfn(self, jac_times_vecfn)

Set some IDA_JacTimesVecFn executable class.

class scikits_odes_sundials.ida.IDA_WrapPrecSetupFunction
evaluate(self, DTYPE_t t, ndarray y, ndarray yp, ndarray rr, DTYPE_t cj, userdata=None) int
set_prec_setupfn(self, prec_setupfn)

set a precondititioning setup method as a IDA_PrecSetupFunction executable class

class scikits_odes_sundials.ida.IDA_WrapPrecSolveFunction
evaluate(self, DTYPE_t t, ndarray y, ndarray yp, ndarray r, ndarray rvec, ndarray z, DTYPE_t cj, DTYPE_t delta, userdata=None) int
set_prec_solvefn(self, prec_solvefn)

set a precondititioning solve method as a IDA_PrecSolveFunction executable class

class scikits_odes_sundials.ida.IDA_WrapRhsFunction
evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, ndarray result, userdata=None) int
set_resfn(self, resfn)

set some residual equations as a ResFunction executable class

class scikits_odes_sundials.ida.IDA_WrapRootFunction
evaluate(self, DTYPE_t t, ndarray y, ndarray ydot, ndarray g, userdata=None) int
set_rootfn(self, rootfn)

set root-ing condition(equations) as a RootFunction executable class

class scikits_odes_sundials.ida.StatusEnumIDA(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
scikits_odes_sundials.ida.no_continue_fn(t, y, yp, solver)