module Dls:`sig`

..`end`

Direct Linear Solvers operating on dense, banded, and sparse matrices.

See sundials: Direct linear solvers optional input functions

See sundials: Direct linear solvers optional output functions

`include Sundials_LinearSolver.Direct`

type`'m`

jac_fn =`(Sundials.RealArray.t Kinsol.double, Sundials.RealArray.t)`

Kinsol.jacobian_arg -> 'm -> unit

Callback functions that compute dense approximations to a Jacobian
matrix. In the call `jac arg jm`

, `arg`

is a `Kinsol.jacobian_arg`

with two work vectors and the computed Jacobian must be stored
in `jm`

.

The callback should load the `(i,j)`

th entry of `jm`

with
$\partial y_i/\partial y_j$, i.e., the partial derivative of the
`i`

th equation with respect to the `j`

th variable, evaluated at the
values of `t`

and `y`

obtained from `arg`

. Only nonzero elements need
be loaded into `jm`

.

Neither the elements of

`arg`

nor the matrix `jm`

should
be accessed after the function has returned.See sundials: KINDlsDenseJacFn

`val solver : ``?jac:'m jac_fn ->`

('m, [> Nvector_serial.kind ] as 'a, 't)

Sundials.LinearSolver.Direct.serial_linear_solver ->

'a Kinsol.serial_session_linear_solver

Create a Kinsol-specific linear solver from a Jacobian approximation
function and a generic direct linear solver.
The Jacobian approximation function is optional for dense and banded
solvers (if not given an internal difference quotient approximation is
used), but must be provided for other solvers (or `Invalid_argument`

is
raised).

See sundials: CVDlsSetLinearSolver

See sundials: CVDlsSetJacFn

`val get_work_space : ``[> Nvector_serial.kind ] Kinsol.serial_session -> int * int`

Returns the sizes of the real and integer workspaces used by a direct linear solver.

**Returns**(`real_size`

,`integer_size`

)

See sundials: KINDlsGetWorkSpace

`val get_num_jac_evals : ``[> Nvector_serial.kind ] Kinsol.serial_session -> int`

Returns the number of calls made by a direct linear solver to the Jacobian approximation function.

See sundials: KINDlsGetNumJacEvals

`val get_num_func_evals : ``[> Nvector_serial.kind ] Kinsol.serial_session -> int`

Returns the number of calls made by a direct linear solver to the user system function for computing the difference quotient approximation to the Jacobian.

See sundials: KINDlsGetNumFuncEvals