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:
@@ -22,4 +22,8 @@ namespace gridfire::exceptions {
|
||||
class SingularJacobianError final : public SolverError {
|
||||
using SolverError::SolverError;
|
||||
};
|
||||
|
||||
class IllConditionedJacobianError final : public SolverError {
|
||||
using SolverError::SolverError;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user