@@ -78,16 +78,16 @@ function Base.showerror(io::IO, e::OverrideInitNoTolerance)
7878end
7979
8080"""
81- Utility function to evaluate the RHS of the ODE , using the integrator's `tmp_cache` if
81+ Utility function to evaluate the RHS, using the integrator's `tmp_cache` if
8282it is in-place or simply calling the function if not.
8383"""
84- function _evaluate_f_ode (integrator, f, isinplace:: Val{true} , args... )
84+ function _evaluate_f (integrator, f, isinplace:: Val{true} , args... )
8585 tmp = first (get_tmp_cache (integrator))
8686 f (tmp, args... )
8787 return tmp
8888end
8989
90- function _evaluate_f_ode (integrator, f, isinplace:: Val{false} , args... )
90+ function _evaluate_f (integrator, f, isinplace:: Val{false} , args... )
9191 return f (args... )
9292end
9393
@@ -126,7 +126,7 @@ function get_initial_values(
126126 algebraic_eqs = [all (iszero, x) for x in eachrow (M)]
127127 (iszero (algebraic_vars) || iszero (algebraic_eqs)) && return u0, p, true
128128 update_coefficients! (M, u0, p, t)
129- tmp = _evaluate_f_ode (integrator, f, isinplace, u0, p, t)
129+ tmp = _evaluate_f (integrator, f, isinplace, u0, p, t)
130130 tmp .= ArrayInterface. restructure (tmp, algebraic_eqs .* _vec (tmp))
131131
132132 normresid = isdefined (integrator. opts, :internalnorm ) ?
@@ -137,34 +137,17 @@ function get_initial_values(
137137 return u0, p, true
138138end
139139
140- """
141- Utility function to evaluate the RHS of the DAE, using the integrator's `tmp_cache` if
142- it is in-place or simply calling the function if not.
143- """
144- function _evaluate_f_dae (integrator, f, isinplace:: Val{true} , args... )
145- tmp = get_tmp_cache (integrator)[2 ]
146- f (tmp, args... )
147- return tmp
148- end
149-
150- function _evaluate_f_dae (integrator, f, isinplace:: Val{false} , args... )
151- return f (args... )
152- end
153-
154140function get_initial_values (
155141 prob:: AbstractDAEProblem , integrator:: DEIntegrator , f, alg:: CheckInit ,
156- isinplace:: Union{Val{true}, Val{false}} ; abstol = nothing , kwargs... )
142+ isinplace:: Union{Val{true}, Val{false}} ; abstol, kwargs... )
157143 u0 = state_values (integrator)
158144 p = parameter_values (integrator)
159145 t = current_time (integrator)
160146
161- resid = _evaluate_f_dae (integrator, f, isinplace, integrator. du, u0, p, t)
147+ resid = _evaluate_f (integrator, f, isinplace, integrator. du, u0, p, t)
162148 normresid = isdefined (integrator. opts, :internalnorm ) ?
163149 integrator. opts. internalnorm (resid, t) : norm (resid)
164150
165- if abstol === nothing
166- abstol = cache_get_abstol (integrator)
167- end
168151 if normresid > abstol
169152 throw (CheckInitFailureError (normresid, abstol))
170153 end
0 commit comments