module Dls:sig
..end
include Sundials_LinearSolver.Direct
type'm
mass_fn =float -> Sundials.RealArray.t triple -> 'm -> unit
Functions that compute a mass matrix (or an approximation of one).
In the call mass t work m
,
t
is the independent variable,work
is workspace data, andm
is the output dense mass matrix.The callback should load the N
by N
matrix m
with an
approximation to the mass matrix $M(t)$. Only nonzero elements
need be loaded into m
.
Raising Sundials.RecoverableFailure
indicates a recoverable
error. Any other exception is treated as an unrecoverable error.
work
nor the matrix m
should be accessed after the function has returned.val solver : 'm mass_fn ->
bool ->
('m, Sundials.RealArray.t, [> Nvector_serial.kind ] as 'a, [> `Dls ])
Sundials.LinearSolver.t -> 'a Arkode.ARKStep.Mass.serial_solver
Create an Arkode-specific mass linear solver from a mass-matrix
constructor function and a generic dense linear solver. The
boolean argument indicates whether the mass matrix depends on the
independent variable t
, if not it is only computed and factored
once.
NB: The boolean argument is ignored in Config.sundials_version < 3.0.0.
val get_work_space : [> Nvector_serial.kind ] Arkode.ARKStep.serial_session -> int * int
Returns the sizes of the real and integer workspaces used by a direct linear mass matrix solver.
real_size
, integer_size
)val get_num_setups : [> Nvector_serial.kind ] Arkode.ARKStep.serial_session -> int
Returns the number of calls made to the mass matrix solver setup routine.
val get_num_mult_setups : [> Nvector_serial.kind ] Arkode.ARKStep.serial_session -> int
Returns the number of calls made to the mass matrix matvec setup routine.
val get_num_solves : [> Nvector_serial.kind ] Arkode.ARKStep.serial_session -> int
Returns the number of calls made to the mass matrix solver solve routine.
val get_num_mult : [> Nvector_serial.kind ] Arkode.ARKStep.serial_session -> int
Returns the number of calls made to the mass matrix-times-vector routine.