From d5123a533d14ed23f29d75cf07b913ce20940fcc Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Sat, 12 Oct 2024 11:21:34 +0200 Subject: [PATCH] Add simulation status AMICI_FIRST_QRHSFUNC_ERR (#2541) was missing. --- include/amici/defines.h | 1 + src/amici.cpp | 1 + src/solver_cvodes.cpp | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/include/amici/defines.h b/include/amici/defines.h index 40465ead01..949c7fffc1 100644 --- a/include/amici/defines.h +++ b/include/amici/defines.h @@ -73,6 +73,7 @@ constexpr int AMICI_CONSTR_FAIL= -15; constexpr int AMICI_CVODES_CONSTR_FAIL= -15; constexpr int AMICI_IDAS_CONSTR_FAIL= -11; constexpr int AMICI_ILL_INPUT= -22; +constexpr int AMICI_FIRST_QRHSFUNC_ERR= -32; constexpr int AMICI_ERROR= -99; constexpr int AMICI_NO_STEADY_STATE= -81; constexpr int AMICI_DAMPING_FACTOR_ERROR= -86; diff --git a/src/amici.cpp b/src/amici.cpp index 78d4794e41..3c795f0d7e 100644 --- a/src/amici.cpp +++ b/src/amici.cpp @@ -49,6 +49,7 @@ std::map simulation_status_to_str_map = { {AMICI_SUCCESS, "AMICI_SUCCESS"}, {AMICI_NOT_RUN, "AMICI_NOT_RUN"}, {AMICI_LSETUP_FAIL, "AMICI_LSETUP_FAIL"}, + {AMICI_FIRST_QRHSFUNC_ERR, "AMICI_FIRST_QRHSFUNC_ERR"}, }; std::unique_ptr runAmiciSimulation( diff --git a/src/solver_cvodes.cpp b/src/solver_cvodes.cpp index c7fa03be97..5237d121df 100644 --- a/src/solver_cvodes.cpp +++ b/src/solver_cvodes.cpp @@ -86,6 +86,10 @@ static_assert( amici::AMICI_FIRST_RHSFUNC_ERR == CV_FIRST_RHSFUNC_ERR, "AMICI_FIRST_RHSFUNC_ERR != CV_FIRST_RHSFUNC_ERR" ); +static_assert( + amici::AMICI_FIRST_QRHSFUNC_ERR == CV_FIRST_QRHSFUNC_ERR, + "AMICI_FIRST_QRHSFUNC_ERR != CV_FIRST_QRHSFUNC_ERR" + ); /* * The following static members are callback function to CVODES.