@@ -52,7 +52,7 @@ or the steady state solution to a differential equation defined by a SteadyState
52
52
- `right`: if the solver is bracketing method, this is the final right bracket value.
53
53
- `stats`: statistics of the solver, such as the number of function evaluations required.
54
54
"""
55
- struct NonlinearSolution{T, N, uType, R, P, A, O, uType2, S} < :
55
+ struct NonlinearSolution{T, N, uType, R, P, A, O, uType2, S, Tr } < :
56
56
AbstractNonlinearSolution{T, N}
57
57
u:: uType
58
58
resid:: R
@@ -63,6 +63,7 @@ struct NonlinearSolution{T, N, uType, R, P, A, O, uType2, S} <:
63
63
left:: uType2
64
64
right:: uType2
65
65
stats:: S
66
+ trace:: Tr
66
67
end
67
68
68
69
TruncatedStacktraces. @truncate_stacktrace NonlinearSolution 1 2
@@ -78,14 +79,14 @@ function build_solution(prob::AbstractNonlinearProblem,
78
79
left = nothing ,
79
80
right = nothing ,
80
81
stats = nothing ,
82
+ trace = nothing ,
81
83
kwargs... )
82
84
T = eltype (eltype (u))
83
85
N = ndims (u)
84
86
85
87
NonlinearSolution{T, N, typeof (u), typeof (resid), typeof (prob), typeof (alg),
86
- typeof (original), typeof (left), typeof (stats)}(u, resid, prob, alg,
87
- retcode, original,
88
- left, right, stats)
88
+ typeof (original), typeof (left), typeof (stats), typeof (trace)}(u, resid, prob, alg,
89
+ retcode, original, left, right, stats, trace)
89
90
end
90
91
91
92
function sensitivity_solution (sol:: AbstractNonlinearSolution , u)
@@ -94,6 +95,6 @@ function sensitivity_solution(sol::AbstractNonlinearSolution, u)
94
95
95
96
NonlinearSolution{T, N, typeof (u), typeof (sol. resid), typeof (sol. prob),
96
97
typeof (sol. alg), typeof (sol. original), typeof (sol. left),
97
- typeof (sol. stats)}(u, sol. resid, sol. prob, sol. alg, sol. retcode,
98
- sol. original, sol. left, sol. right, sol. stats)
98
+ typeof (sol. stats), trace (sol . trace) }(u, sol. resid, sol. prob, sol. alg, sol. retcode,
99
+ sol. original, sol. left, sol. right, sol. stats, sol . trace )
99
100
end
0 commit comments