A namespace for dealing with ODE solvers through the SUNDIALS package.
template<typename VectorType >
Type of function objects to interface with SUNDIALS linear solvers
This function type encapsulates the action of solving \(P^{-1}Ax=P^{-1}b\). The LinearOperator op
encapsulates the matrix vector product \(Ax\) and the LinearOperator prec
encapsulates the application of the preconditioner \(P^{-1}z\). The user can specify function objects of this type to attach custom linear solver routines to SUNDIALS. The two LinearOperators op
and prec
are built internally by SUNDIALS based on user settings. The parameters are interpreted as follows:
- Parameters
-
[in] | op | A LinearOperator that applies the matrix vector product |
[in] | prec | A LinearOperator that applies the preconditioner |
[out] | x | The output solution vector |
[in] | b | The right-hand side |
[in] | tol | Tolerance for the iterative solver |
This function should return:
- 0: Success
- >0: Recoverable error, ARKode will reattempt the solution and call this function again.
- <0: Unrecoverable error, the computation will be aborted and an assertion will be thrown.
Definition at line 150 of file sunlinsol_wrapper.h.