feat(jacobian): Added regularization

There are times when the jacobian matrix has infinities or nans. If
these cases correspond to species (rows or columns) which have
effectivley zero abundance (i.e. if Y(Cl-32) ~ 1e-310 and
(dY(H-2)/dt)/dY(Cl-32) is inf) then it is safe to regularize these
entries to 0. If this is not done then the solver will end up finding
NaN values for the molar abundances on subsequent steps. This has been
implimented through a small regularization function in the
CVODE_solver_strategy file.
This commit is contained in:
2025-11-14 18:49:29 -05:00
parent 2ed629e0bf
commit b5d76e3728
7 changed files with 365 additions and 16 deletions

View File

@@ -22,4 +22,8 @@ namespace gridfire::exceptions {
class SingularJacobianError final : public SolverError {
using SolverError::SolverError;
};
class IllConditionedJacobianError final : public SolverError {
using SolverError::SolverError;
};
}