module Klu:sig
..end
KLU direct linear solver operating on sparse matrices (requires KLU).
typeordering =
Klu.ordering
=
| |
Amd |
(* | Approximate minimum degree permutation. | *) |
| |
ColAmd |
(* | Column approximate minimum degree permutation. | *) |
| |
Natural |
(* | Natural ordering. | *) |
The ordering algorithm used for reducing fill.
val make : ?context:Sundials.Context.t ->
?ordering:ordering ->
([> Nvector_serial.kind ] as 'a) Nvector.serial ->
('s, 'a) Sundials.Matrix.sparse ->
('s Sundials.Matrix.Sparse.t, 'a, [ `Dls | `Klu ])
Sundials_LinearSolver.serial_t
Creates a direct linear solver on sparse matrices using KLU. The nvector and matrix argument are used to determine the linear system size and to assess compatibility with the linear solver implementation. The matrix is used internally after the linear solver is attached to a session.
Config.NotImplementedBySundialsVersion
Solver not available.val reinit : ('s Sundials.Matrix.Sparse.t, [> Nvector_serial.kind ] as 'a, [> `Klu ])
Sundials_LinearSolver.serial_t ->
('s, 'a) Sundials.Matrix.sparse -> ?nnz:int -> unit -> unit
Reinitializes memory and flags for a new factorization (symbolic and
numeric) at the next solver setup call. In the call reinit ls a nnz
,
a
is the Jacobian matrix, which is reinitialized with the given
number of non-zeros if nnz
if given. New symbolic and numeric
factorizations will be completed at the next solver step.
val set_ordering : ('s Sundials.Matrix.Sparse.t, [> Nvector_serial.kind ], [> `Klu ])
Sundials_LinearSolver.serial_t ->
ordering -> unit
Sets the ordering algorithm used to minimize fill-in.