From 17ac37dcf7fe80396d304b4128c758635b524950 Mon Sep 17 00:00:00 2001 From: Harry Saxton Date: Thu, 22 Feb 2024 11:17:59 +0000 Subject: [PATCH] Update stats field This includes the fields nfpiter::Int nfpconvfail::Int from DDE --- src/solutions/ode_solutions.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/solutions/ode_solutions.jl b/src/solutions/ode_solutions.jl index 199c558ad..2b0e7d60b 100644 --- a/src/solutions/ode_solutions.jl +++ b/src/solutions/ode_solutions.jl @@ -32,13 +32,15 @@ mutable struct DEStats njacs::Int nnonliniter::Int nnonlinconvfail::Int + nfpiter::Int + nfpconvfail::Int ncondition::Int naccept::Int nreject::Int maxeig::Float64 end -DEStats(x::Int = -1) = DEStats(x, x, x, x, x, x, x, x, x, x, 0.0) +DEStats(x::Int = -1) = DEStats(x, x, x, x, x, x, x, x, x, x, x, x, 0.0) function Base.show(io::IO, ::MIME"text/plain", s::DEStats) println(io, summary(s)) @@ -49,6 +51,8 @@ function Base.show(io::IO, ::MIME"text/plain", s::DEStats) @printf io "%-50s %-d\n" "Number of Jacobians created:" s.njacs @printf io "%-50s %-d\n" "Number of nonlinear solver iterations:" s.nnonliniter @printf io "%-50s %-d\n" "Number of nonlinear solver convergence failures:" s.nnonlinconvfail + @printf io "%-60s %-d\n" "Number of fixed-point solver iterations:" s.nfpiter + @printf io "%-60s %-d\n" "Number of fixed-point solver convergence failures:" s.nfpconvfail @printf io "%-50s %-d\n" "Number of rootfind condition calls:" s.ncondition @printf io "%-50s %-d\n" "Number of accepted steps:" s.naccept @printf io "%-50s %-d" "Number of rejected steps:" s.nreject @@ -64,6 +68,8 @@ function Base.merge(a::DEStats, b::DEStats) a.njacs + b.njacs, a.nnonliniter + b.nnonliniter, a.nnonlinconvfail + b.nnonlinconvfail, + a.nfpiter + b.nfpiter, + a.nfpconvfail + b.nfpconvfail, a.ncondition + b.ncondition, a.naccept + b.naccept, a.nreject + b.nreject,