Skip to content

Commit

Permalink
Fix incorrect exception types / messages for IDASolver (#2398)
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl authored Apr 19, 2024
1 parent 206df03 commit 09e0581
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/solver_idas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
namespace amici {

/*
* The following static members are callback function to CVODES.
* The following static members are callback function to IDAS.
* Their signatures must not be changes.
*/

Expand Down Expand Up @@ -437,7 +437,7 @@ void IDASolver::reInitPostProcess(

auto status = IDASetStopTime(ida_mem, tout);
if (status != IDA_SUCCESS)
throw IDAException(status, "CVodeSetStopTime");
throw IDAException(status, "IDASetStopTime");

status = IDASolve(
ami_mem, tout, t, yout->getNVector(), ypout->getNVector(), IDA_ONE_STEP
Expand Down Expand Up @@ -853,7 +853,7 @@ void IDASolver::setNonLinearSolver() const {
solver_memory_.get(), non_linear_solver_->get()
);
if (status != IDA_SUCCESS)
throw CvodeException(status, "CVodeSetNonlinearSolver");
throw IDAException(status, "IDASetNonlinearSolver");
}

void IDASolver::setNonLinearSolverSens() const {
Expand Down Expand Up @@ -883,15 +883,15 @@ void IDASolver::setNonLinearSolverSens() const {
}

if (status != IDA_SUCCESS)
throw CvodeException(status, "CVodeSolver::setNonLinearSolverSens");
throw IDAException(status, "IDASolver::setNonLinearSolverSens");
}

void IDASolver::setNonLinearSolverB(int which) const {
int status = IDASetNonlinearSolverB(
solver_memory_.get(), which, non_linear_solver_B_->get()
);
if (status != IDA_SUCCESS)
throw CvodeException(status, "CVodeSetNonlinearSolverB");
throw IDAException(status, "IDASetNonlinearSolverB");
}

/**
Expand Down

0 comments on commit 09e0581

Please sign in to comment.