Skip to content

Commit

Permalink
Model::checkFinite: exclude timepoints
Browse files Browse the repository at this point in the history
Removes the check for non-finite timepoints. This rather confusing (AMICI-dev#2370) than helpful.
The current timepoint is already included in all other nan/inf messages, and the other
timepoints don't matter in this context.

Closes AMICI-dev#2370.
  • Loading branch information
dweindl committed Apr 16, 2024
1 parent d993362 commit a321120
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,6 @@ int Model::checkFinite(
&& model_quantity != ModelQuantity::ts) {
checkFinite(state_.fixedParameters, ModelQuantity::k, t);
checkFinite(state_.unscaledParameters, ModelQuantity::p, t);
checkFinite(simulation_parameters_.ts_, ModelQuantity::ts, t);
if (!always_check_finite_ && model_quantity != ModelQuantity::w) {
// don't check twice if always_check_finite_ is true
checkFinite(derived_state_.w_, ModelQuantity::w, t);
Expand Down Expand Up @@ -1789,7 +1788,6 @@ int Model::checkFinite(
// check upstream
checkFinite(state_.fixedParameters, ModelQuantity::k, t);
checkFinite(state_.unscaledParameters, ModelQuantity::p, t);
checkFinite(simulation_parameters_.ts_, ModelQuantity::ts, t);
checkFinite(derived_state_.w_, ModelQuantity::w, t);

return AMICI_RECOVERABLE_ERROR;
Expand Down Expand Up @@ -1880,7 +1878,6 @@ int Model::checkFinite(SUNMatrix m, ModelQuantity model_quantity, realtype t)
// check upstream
checkFinite(state_.fixedParameters, ModelQuantity::k, t);
checkFinite(state_.unscaledParameters, ModelQuantity::p, t);
checkFinite(simulation_parameters_.ts_, ModelQuantity::ts, t);
checkFinite(derived_state_.w_, ModelQuantity::w, t);

return AMICI_RECOVERABLE_ERROR;
Expand Down

0 comments on commit a321120

Please sign in to comment.