Skip to content

Commit b06cb09

Browse files
committed
Remove ImmutableNLStats
1 parent 86bb307 commit b06cb09

File tree

3 files changed

+1
-38
lines changed

3 files changed

+1
-38
lines changed

docs/src/basics/nonlinear_solution.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ SciMLBase.NonlinearSolution
99

1010
```@docs
1111
SciMLBase.NLStats
12-
NonlinearSolve.ImmutableNLStats
1312
```
1413

1514
## Return Code

src/core/generic.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function SciMLBase.solve!(cache::AbstractNonlinearSolveCache)
2929
end
3030

3131
function __compile_stats(cache::AbstractNonlinearSolveCache)
32-
return ImmutableNLStats(get_nf(cache), get_njacs(cache), get_nfactors(cache),
32+
return SciMLBase.NLStats(get_nf(cache), get_njacs(cache), get_nfactors(cache),
3333
get_nsolve(cache), get_nsteps(cache))
3434
end
3535

src/utils.jl

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -129,42 +129,6 @@ end
129129

130130
@inline __dot(x, y) = dot(_vec(x), _vec(y))
131131

132-
# Return an ImmutableNLStats object when we know that NLStats won't be updated
133-
"""
134-
ImmutableNLStats(nf, njacs, nfactors, nsolve, nsteps)
135-
136-
Statistics from the nonlinear equation solver about the solution process.
137-
138-
## Fields
139-
140-
- nf: Number of function evaluations.
141-
- njacs: Number of Jacobians created during the solve.
142-
- nfactors: Number of factorzations of the jacobian required for the solve.
143-
- nsolve: Number of linear solves `W \\ b` required for the solve.
144-
- nsteps: Total number of iterations for the nonlinear solver.
145-
"""
146-
struct ImmutableNLStats
147-
nf::Int
148-
njacs::Int
149-
nfactors::Int
150-
nsolve::Int
151-
nsteps::Int
152-
end
153-
154-
function Base.show(io::IO, ::MIME"text/plain", s::ImmutableNLStats)
155-
println(io, summary(s))
156-
@printf io "%-50s %-d\n" "Number of function evaluations:" s.nf
157-
@printf io "%-50s %-d\n" "Number of Jacobians created:" s.njacs
158-
@printf io "%-50s %-d\n" "Number of factorizations:" s.nfactors
159-
@printf io "%-50s %-d\n" "Number of linear solves:" s.nsolve
160-
@printf io "%-50s %-d" "Number of nonlinear solver iterations:" s.nsteps
161-
end
162-
163-
function Base.merge(s1::ImmutableNLStats, s2::ImmutableNLStats)
164-
return ImmutableNLStats(s1.nf + s2.nf, s1.njacs + s2.njacs, s1.nfactors + s2.nfactors,
165-
s1.nsolve + s2.nsolve, s1.nsteps + s2.nsteps)
166-
end
167-
168132
"""
169133
pickchunksize(x) = pickchunksize(length(x))
170134
pickchunksize(x::Int)

0 commit comments

Comments
 (0)