You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/initialization.jl
+48-13Lines changed: 48 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,15 @@ function Base.showerror(io::IO, e::OverrideInitMissingAlgorithm)
68
68
"OverrideInit specified but no NonlinearSolve.jl algorithm provided. Provide an algorithm via the `nlsolve_alg` keyword argument to `get_initial_values`.")
69
69
end
70
70
71
+
struct OverrideInitNoTolerance <:Exception
72
+
tolerance::Symbol
73
+
end
74
+
75
+
function Base.showerror(io::IO, e::OverrideInitNoTolerance)
76
+
print(io,
77
+
"Tolerances were not provided to `OverrideInit`. `$(e.tolerance)` must be provided as a keyword argument to `get_initial_values` or as a keyword argument to the `OverrideInit` constructor.")
78
+
end
79
+
71
80
"""
72
81
Utility function to evaluate the RHS of the ODE, using the integrator's `tmp_cache` if
73
82
it is in-place or simply calling the function if not.
@@ -98,11 +107,16 @@ _vec(v::AbstractVector) = v
98
107
99
108
Check if the algebraic constraints are satisfied, and error if they aren't. Returns
100
109
the `u0` and `p` as-is, and is always successful if it returns. Valid only for
101
-
`ODEProblem` and `DAEProblem`. Requires a `DEIntegrator` as its second argument.
110
+
`AbstractDEProblem` and `AbstractDAEProblem`. Requires a `DEIntegrator` as its second argument.
111
+
112
+
Keyword arguments:
113
+
- `abstol`: The absolute value below which the norm of the residual of algebraic equations
114
+
should lie. The norm function used is `integrator.opts.internalnorm` if present, and
0 commit comments