From 2868a148ee8cf68b1e4863b7e0108514853715c1 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Fri, 18 Oct 2024 07:53:40 +0200 Subject: [PATCH] .. --- include/amici/defines.h | 1 + src/amici.cpp | 1 + src/solver_cvodes.cpp | 4 ++++ src/solver_idas.cpp | 4 ++++ 4 files changed, 10 insertions(+) diff --git a/include/amici/defines.h b/include/amici/defines.h index 949c7fffc1..1c6741f8d2 100644 --- a/include/amici/defines.h +++ b/include/amici/defines.h @@ -60,6 +60,7 @@ constexpr double pi = M_PI; // // NOTE: When adding / removing / renaming return codes, // please update simulation_status_to_str_map in amici.h +constexpr int AMICI_WARNING= 99; constexpr int AMICI_RECOVERABLE_ERROR= 1; constexpr int AMICI_UNRECOVERABLE_ERROR= -10; constexpr int AMICI_TOO_MUCH_WORK= -1; diff --git a/src/amici.cpp b/src/amici.cpp index 3c795f0d7e..bba344358f 100644 --- a/src/amici.cpp +++ b/src/amici.cpp @@ -50,6 +50,7 @@ std::map simulation_status_to_str_map = { {AMICI_NOT_RUN, "AMICI_NOT_RUN"}, {AMICI_LSETUP_FAIL, "AMICI_LSETUP_FAIL"}, {AMICI_FIRST_QRHSFUNC_ERR, "AMICI_FIRST_QRHSFUNC_ERR"}, + {AMICI_WARNING, "AMICI_WARNING"}, }; std::unique_ptr runAmiciSimulation( diff --git a/src/solver_cvodes.cpp b/src/solver_cvodes.cpp index 53bfd32613..72fcfa78ed 100644 --- a/src/solver_cvodes.cpp +++ b/src/solver_cvodes.cpp @@ -90,6 +90,10 @@ static_assert( amici::AMICI_FIRST_QRHSFUNC_ERR == CV_FIRST_QRHSFUNC_ERR, "AMICI_FIRST_QRHSFUNC_ERR != CV_FIRST_QRHSFUNC_ERR" ); +static_assert( + amici::AMICI_WARNING == CV_WARNING, + "AMICI_WARNING != CV_WARNING" +); /* * The following static members are callback function to CVODES. diff --git a/src/solver_idas.cpp b/src/solver_idas.cpp index c50968d9a4..8e64edb92e 100644 --- a/src/solver_idas.cpp +++ b/src/solver_idas.cpp @@ -70,6 +70,10 @@ static_assert( amici::AMICI_IDAS_CONSTR_FAIL == IDA_CONSTR_FAIL, "AMICI_IDAS_CONSTR_FAIL != IDA_CONSTR_FAIL" ); +static_assert( + amici::AMICI_WARNING == IDA_WARNING, + "AMICI_WARNING != IDA_WARNING" +); /* * The following static members are callback function to IDAS.