Module Sundials_LinearSolver.Direct.Custom

module Custom: sig .. end

Custom direct linear solvers.


type 'lsolver tag = [ `Custom of 'lsolver ] 

Used to distinguish custom linear solvers

type ('matrix, 'data, 'kind, 'lsolver) ops = {
   init : 'lsolver -> unit; (*

Performs linear solver initalization.

*)
   setup : 'lsolver -> 'matrix -> unit; (*

Performs linear solver setup based on an updated matrix.

*)
   solve : 'lsolver -> 'matrix -> 'data -> 'data -> unit; (*

The call solve ls A x b should solve the linear system $Ax = b$ .

*)
   get_work_space : ('lsolver -> int * int) option; (*

Return the storage requirements for the linear solver. The result (lrw, liw) gives the number of words used for storing real values (lrw) and the number of words used for storing integer values (liw).

*)
}

The operations required to implement a direct linear solver. Failure should be indicated by raising an exception (preferably one of the exceptions in this package). Raising Sundials.RecoverableFailure indicates a generic recoverable failure.

val make : ('matrix, 'data, 'kind, 'lsolver) ops ->
'lsolver ->
('matrixkind, 'matrix, 'data, 'kind) Sundials.Matrix.t ->
('matrix, 'data, 'kind, 'lsolver tag)
Sundials_LinearSolver.Direct.linear_solver

Create a direct linear solver given a set of operations and an internal state.

NB: This feature is only available for Config.sundials_version >= 3.0.0.

val unwrap : ('matrix, 'data, 'kind, 'lsolver tag)
Sundials_LinearSolver.Direct.linear_solver -> 'lsolver

Return the internal state from an custom direct linear solver.