Skip to content

Commit

Permalink
Merge branch 'develop' into cmake_config
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl authored Oct 13, 2024
2 parents bd05be9 + d5123a5 commit c11c51e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/amici/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/amici.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ std::map<int, std::string> 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<ReturnData> runAmiciSimulation(
Expand Down
1 change: 1 addition & 0 deletions src/solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,7 @@ void Solver::initializeNonLinearSolverSens(Model const* model) const {
}

void Solver::setErrHandlerFn() const {
SUNContext_ClearErrHandlers(sunctx_);
auto sunerr = SUNContext_PushErrHandler(
sunctx_, wrapErrHandlerFn,
reinterpret_cast<void*>(const_cast<Solver*>(this))
Expand Down
4 changes: 4 additions & 0 deletions src/solver_cvodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c11c51e

Please sign in to comment.