Module Sundials_LinearSolver.Direct

module Direct: sig .. end

Direct Linear Solvers


Definitions in this module are more conveniently accessed through session-specific direct linear solver modules like Cvode.Dls and Ida.Dls. For example, Cvode.Dls.dense is an alias for Sundials_LinearSolver.Direct.dense.

Types

type tag = [ `Basic ] 

Used to identify generic direct solvers.

type ('matrix, 'data, 'kind, 'tag) linear_solver = ('matrix, 'data, 'kind, 'tag) Sundials_LinearSolver_impl.Direct.linear_solver 

A generic direct linear solver. The type variables specify the Jacobian matrix ('matrix), the Nvector.nvector data ('data) and kind ('kind), and a 'tag used to identify specific solver features.

A linear solver of this type must be converted to session-specific form by Cvode.Dls.solver, Ida.Dls.solver, etc., before being attached to a session via init or reinit.

type ('mat, [> Nvector_serial.kind ], 'tag) serial_linear_solver = ('mat, Nvector_serial.data, [> Nvector_serial.kind ] as 'kind, 'tag)
linear_solver

Alias for linear solvers that are restricted to serial nvectors.

val dense : ([> Nvector_serial.kind ] as 'a) Nvector_serial.any ->
'a Sundials.Matrix.dense ->
(Sundials.Matrix.Dense.t, 'a, tag)
serial_linear_solver

Creates a direct linear solver on dense matrices. 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.

val lapack_dense : ([> Nvector_serial.kind ] as 'a) Nvector_serial.any ->
'a Sundials.Matrix.dense ->
(Sundials.Matrix.Dense.t, 'a, tag)
serial_linear_solver

Creates a direct linear solver on dense matrices using LAPACK. See Sundials_LinearSolver.Direct.dense. Only available if Config.lapack_enabled.

val band : ([> Nvector_serial.kind ] as 'a) Nvector_serial.any ->
'a Sundials.Matrix.band ->
(Sundials.Matrix.Band.t, 'a, tag)
serial_linear_solver

Creates a direct linear solver on banded matrices. 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.

val lapack_band : ([> Nvector_serial.kind ] as 'a) Nvector_serial.any ->
'a Sundials.Matrix.band ->
(Sundials.Matrix.Band.t, 'a, tag)
serial_linear_solver

Creates a direct linear solver on banded matrices using LAPACK. See Sundials_LinearSolver.Direct.band. Only available if Config.lapack_enabled.

module Klu: sig .. end

KLU direct linear solver operating on sparse matrices (requires KLU).

val klu : ?ordering:Klu.ordering ->
([> Nvector_serial.kind ] as 'a) Nvector_serial.any ->
('s, 'a) Sundials.Matrix.sparse ->
('s Sundials.Matrix.Sparse.t, 'a, Klu.tag)
serial_linear_solver

Creates a direct linear solver on sparse matrices using KLU. See Sundials_LinearSolver.Direct.Klu.make.

module Superlumt: sig .. end

SuperLUMT direct linear solver operating on sparse matrices (requires SuperLUMT).

val superlumt : ?ordering:Superlumt.ordering ->
nthreads:int ->
([> Nvector_serial.kind ] as 'a) Nvector_serial.any ->
('s, 'a) Sundials.Matrix.sparse ->
('s Sundials.Matrix.Sparse.t, 'a, Superlumt.tag)
serial_linear_solver

Creates a direct linear solver on sparse matrices using SuperLUMT. See Sundials_LinearSolver.Direct.Superlumt.make.

NB: The Matrix.Sparse.csr format is only supported for Config.sundials_version >= 3.0.0.

module Custom: sig .. end

Custom direct linear solvers.