Module Sundials_LinearSolver

module Sundials_LinearSolver: sig .. end

Generic linear solvers.

Sundials provides a set of functions for instantiating linear solvers from two families: Sundials_LinearSolver.Direct and Sundials_LinearSolver.Iterative. Any instance may be associated with at most one solver session.


Linear Solver Families

module Direct: sig .. end

Direct Linear Solvers

module Iterative: sig .. end

Iterative Linear Solvers

Exceptions

exception InvalidLinearSolver

Raised on invalid use of linear solver functions. For instance, initializing a session with Cvode.Diag and then calling Cvode.Spils.get_num_lin_iters, which rather requires a linear solver from Sundials_LinearSolver.Iterative.

exception UnrecoverableFailure of bool

Raised on an unrecoverable failure in a linear solver. The argument is true for a recoverable failure and false for an unrecoverable one. (SUNLS_PACKAGE_FAIL_REC/_UNREC)

exception MatrixNotSquare

Raised when creating a linear solver if the given matrix is not square.

exception MatrixVectorMismatch

Raised when creating a linear solver if the number of matrix rows and the vector length are not equal.

exception InsufficientStorageUpperBandwidth

Raised when the storage upper bandwidth (smu) of a Matrix.Band.t is insufficient for use in a particular linear solver.

exception LinearSolverInUse

Raised on an attempt to associate a linear solver instance with more than one session.

exception ATimesFailure of bool

Indicates failure of an atimes function. The argument is true for a recoverable failure and false for an unrecoverable one. (SUNLS_ATIMES_FAIL_REC/_UNREC)

exception PSetFailure of bool

Indicates failure of a preconditioner setup routine. The argument is true for a recoverable failure and false for an unrecoverable one. (SUNLS_PSET_FAIL_REC/_UNREC)

exception PSolveFailure of bool

Indicates failure of a preconditioner solver. The argument is true for a recoverable failure and false for an unrecoverable one. (SUNLS_PSOLVE_FAIL_REC/_UNREC)

exception GSFailure

Indicates failure of a Gram-Schmidt routine. (SUNLS_GS_FAIL)

exception QRSolFailure

Indicates that the QR solution found a singular result. (SUNLS_QRSOL_FAIL)

exception ResReduced

Indicates that the residual is reduced but without convergence to the desired tolerance. (SUNLS_RES_REDUCED)

exception ConvFailure

Indicates that a solver failed to converge. (SUNLS_CONV_FAIL)

exception QRfactFailure

Indicates that QR factorization encountered a singular matrix. (SUNLS_QRFACT_FAIL)

exception LUfactFailure

Indicates that LU factorization encountered a singular matrix. (SUNLS_LUFACT_FAIL)

exception PackageFailure of bool

Indicates failure in an external linear solver package. The argument is true for a recoverable failure and false for an unrecoverable one. (SUNLS_PACKAGE_FAIL_REC/_UNREC)

exception IllegalPrecType

Raised by Sundials_LinearSolver.Iterative.set_prec_type if the given type is not allowed.

exception InternalFailure of (string * int)

Indicates that an internal callback, identified by the first argument, returned the given unknown error code.