pub enum RhsResult {
Ok,
RecoverableError(u8),
NonRecoverableError(u8),
}
Expand description
A return type for the right-hand-side rust function.
Adapted from Sundials cv-ode guide version 5.7 (BSD Licensed), setcion 4.6.1 :
If a recoverable error occurred,
cvode
will attempt to correct, if the error is unrecoverable, the integration is halted.A recoverable failure error return is typically used to flag a value of the dependent variableythat is “illegal” in some way (e.g., negative where only a non-negative value is physically meaningful). If such a return is made,
cvode
will attempt to recover (possibly repeating the nonlinear solve, or reducing the step size) in order to avoid this recoverable error return.
Variants§
Ok
Indicates that there was no error
RecoverableError(u8)
Indicate that there was a recoverable error and its code
NonRecoverableError(u8)
Indicatest hat there was a non recoverable error