Block decomposition: bugfix, cutoff option was ignored

Introduced in c699d57308
issue#70
Sébastien Villemot 2020-05-07 16:51:49 +02:00
parent 928aa977b6
commit ba214a100d
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 1 additions and 1 deletions

View File

@ -346,7 +346,7 @@ ModelTree::evaluateAndReduceJacobian(const eval_context_t &eval_context) const
cerr << endl;
exit(EXIT_FAILURE);
}
if (lag == 0)
if ((isnan(val) || fabs(val) >= cutoff) && lag == 0)
contemporaneous_jacobian[{ eq, var }] = val;
}
}