-
-
Notifications
You must be signed in to change notification settings - Fork 242
Description
Please, add a new option to the DAE solvers, so that initialization is never performed by the DAE solver.
Note, the IDA DAE solver uses the following code in Sundials/src/common_interface/solve.jl:
f!(rtest, du0, u0, prob.p, t0)
if any(abs.(rtest) .>= reltol)
...
flag = IDACalcIC(mem, init_type, _t)
end
This means that solve first calls the user-suppled function f! = prob.f and then checks whether the absolute values of the returned residuals rtest are small enough. If this is not the case, the IDA initialization IDACalcIC is called. The problem is that this function may easily fail, even if the IDA integrator will integrate the model with the provided u0, du0. Explanation:
Initialization of DAEs is difficult. Good initializers use model information that is not available to a general DAE solver. For example assume that the DAE is initialized in steady state (so du=0) with a homotopy method (because good start values are not available for u0; this is, for example, standard for electric circuit simulators). Good non-linear solvers will not use the absolute values of the residuals as termination conditions, because this is not scale invariant (multiplying a residual equation with any number, will not change the exact mathematical solution). Therefore, it is easily possible that the solver test any(abs.(rtest) .>= reltol) fails, even if initialization is fine and the DAE integrator will integrate the model with the u0, du0 computed by an external initializer.