You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
case -1 : msg = {"CV_TOO_MUCH_WORK" , "The solver took mxstep internal steps but could not reach tout"}; break; // NOLINT
30
+
case -2 : msg = {"CV_TOO_MUCH_ACC" , "The solver could not satisfy the accuracy demanded by the user for some internal step"}; break; // NOLINT
31
+
case -3 : msg = {"CV_ERR_FAILURE" , "Error test failures occurred too many times during one internal time step or minimum step size was reached"}; break; // NOLINT
32
+
case -4 : msg = {"CV_CONV_FAILURE" , "Convergence test failures occurred too many times during one internal time step or minimum step size was reached"}; break; // NOLINT
33
+
case -8 : msg = {"CV_RHSFUNC_FAIL" , "The right-hand side function failed in an unrecoverable manner"}; break; // NOLINT
34
+
case -9 : msg = {"CV_FIRST_RHSFUNC_ERR", "The right-hand side function failed at the first call"}; break; // NOLINT
35
+
case -10 : msg = {"CV_REPTD_RHSFUNC_ERR", "The right-hand side function had repetead recoverable errors"}; break; // NOLINT
36
+
case -11 : msg = {"CV_UNREC_RHSFUNC_ERR", "The right-hand side function had a recoverable error, but no recovery is possible"}; break; // NOLINT
37
+
case -27 : msg = {"CV_TOO_CLOSE" , "The output and initial times are too close to each other"}; break; // NOLINT
38
+
default:
39
+
switch (flag) {
40
+
case -5 : msg = {"CV_LINIT_FAIL" , "The linear solver's initialization function failed"}; break; // NOLINT
41
+
case -6 : msg = {"CV_LSETUP_FAIL" , "The linear solver's setup function failed in an unrecoverable manner"}; break; // NOLINT
42
+
case -7 : msg = {"CV_LSOLVE_FAIL" , "The linear solver's solve function failed in an unrecoverable manner"}; break; // NOLINT
43
+
case -20 : msg = {"CV_MEM_FAIL" , "A memory allocation failed"}; break; // NOLINT
44
+
case -21 : msg = {"CV_MEM_NULL" , "The cvode_mem argument was NULL"}; break; // NOLINT
45
+
case -22 : msg = {"CV_ILL_INPUT" , "One of the function inputs is illegal"}; break; // NOLINT
46
+
case -23 : msg = {"CV_NO_MALLOC" , "The CVODE memory block was not allocated by a call to CVodeMalloc"}; break; // NOLINT
47
+
case -24 : msg = {"CV_BAD_K" , "The derivative order k is larger than the order used"}; break; // NOLINT
48
+
case -25 : msg = {"CV_BAD_T" , "The time t s outside the last step taken"}; break; // NOLINT
49
+
case -26 : msg = {"CV_BAD_DKY" , "The output derivative vector is NULL"}; break; // NOLINT
50
+
case -40 : msg = {"CV_BAD_IS" , "The sensitivity index is larger than the number of sensitivities computed"}; break; // NOLINT
51
+
case -41 : msg = {"CV_NO_SENS" , "Forward sensitivity integration was not activated"}; break; // NOLINT
52
+
case -42 : msg = {"CV_SRHSFUNC_FAIL" , "The sensitivity right-hand side function failed in an unrecoverable manner"}; break; // NOLINT
53
+
case -43 : msg = {"CV_FIRST_SRHSFUNC_ER", "The sensitivity right-hand side function failed at the first call"}; break; // NOLINT
54
+
case -44 : msg = {"CV_REPTD_SRHSFUNC_ER", "The sensitivity ight-hand side function had repetead recoverable errors"}; break; // NOLINT
55
+
case -45 : msg = {"CV_UNREC_SRHSFUNC_ER", "The sensitivity right-hand side function had a recoverable error, but no recovery is possible"}; break; // NOLINT
56
+
case -101: msg = {"CV_ADJMEM_NULL" , "The cvadj_mem argument was NULL"}; break; // NOLINT
57
+
case -103: msg = {"CV_BAD_TB0" , "The final time for the adjoint problem is outside the interval over which the forward problem was solved"}; break; // NOLINT
58
+
case -104: msg = {"CV_BCKMEM_NULL" , "The cvodes memory for the backward problem was not created"}; break; // NOLINT
59
+
case -105: msg = {"CV_REIFWD_FAIL" , "Reinitialization of the forward problem failed at the first checkpoint"}; break; // NOLINT
60
+
case -106: msg = {"CV_FWD_FAIL" , "An error occured during the integration of the forward problem"}; break; // NOLINT
61
+
case -107: msg = {"CV_BAD_ITASK" , "Wrong task for backward integration"}; break; // NOLINT
62
+
case -108: msg = {"CV_BAD_TBOUT" , "The desired output time is outside the interval over which the forward problem was solved"}; break; // NOLINT
63
+
case -109: msg = {"CV_GETY_BADT" , "Wrong time in interpolation function"}; break; // NOLINT
64
+
}
65
+
}
66
+
return msg;
67
+
}
68
+
69
+
/**
70
+
* Throws a std::runtime_error exception when a Sundial function fails
71
+
* (i.e. returns a negative flag)
72
+
*
73
+
* @param flag Error flag
74
+
* @param func_name Name of the function that returned the flag
75
+
* @throw <code>std::runtime_error</code> if the flag is negative
0 commit comments