From 1136f8809bcff77f9bc96cfaeec0580e46b4f85e Mon Sep 17 00:00:00 2001 From: Harry Saxton Date: Thu, 22 Feb 2024 11:25:57 +0000 Subject: [PATCH 1/5] Update solve.jl use the Destats from SciMLBase --- src/solve.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/solve.jl b/src/solve.jl index 319e352..c6a145f 100644 --- a/src/solve.jl +++ b/src/solve.jl @@ -166,7 +166,8 @@ function DiffEqBase.__init(prob::DiffEqBase.AbstractDDEProblem, Val(isinplace(prob))) # separate statistics of the integrator and the history - stats = DDEStats(0) + #stats = DDEStats(0) + stats = SciMLBase.DEStats(0) # create solution alg_choice = iscomposite(alg) ? Int[] : nothing From 29077300fefe70c15bf87930a2e0e3cd71692a3d Mon Sep 17 00:00:00 2001 From: Harry Saxton Date: Thu, 22 Feb 2024 11:43:06 +0000 Subject: [PATCH 2/5] Update type.jl --- src/integrators/type.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/integrators/type.jl b/src/integrators/type.jl index c11c679..5400658 100644 --- a/src/integrators/type.jl +++ b/src/integrators/type.jl @@ -89,7 +89,8 @@ mutable struct DDEIntegrator{algType, IIP, uType, tType, P, eigenType, tTypeNoUn u_modified::Bool isdae::Bool opts::O - stats::DDEStats + #stats::DDEStats + stats::DEStats history::H differential_vars::DV integrator::IType From 51bbafc6401a12804360286e9f0029d90747e9e1 Mon Sep 17 00:00:00 2001 From: Harry Saxton Date: Thu, 22 Feb 2024 11:46:58 +0000 Subject: [PATCH 3/5] Update type.jl --- src/integrators/type.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integrators/type.jl b/src/integrators/type.jl index 5400658..9e88b3d 100644 --- a/src/integrators/type.jl +++ b/src/integrators/type.jl @@ -90,7 +90,7 @@ mutable struct DDEIntegrator{algType, IIP, uType, tType, P, eigenType, tTypeNoUn isdae::Bool opts::O #stats::DDEStats - stats::DEStats + stats::SciMLBase.DEStats history::H differential_vars::DV integrator::IType From 97c816ea3401df5328519139e8025a174256ebd0 Mon Sep 17 00:00:00 2001 From: Harry Saxton Date: Thu, 22 Feb 2024 15:19:14 +0000 Subject: [PATCH 4/5] Update type.jl This has no been tested locally and should allow for parallel execution of DDE --- src/integrators/type.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/integrators/type.jl b/src/integrators/type.jl index 9e88b3d..eaa1f44 100644 --- a/src/integrators/type.jl +++ b/src/integrators/type.jl @@ -89,7 +89,6 @@ mutable struct DDEIntegrator{algType, IIP, uType, tType, P, eigenType, tTypeNoUn u_modified::Bool isdae::Bool opts::O - #stats::DDEStats stats::SciMLBase.DEStats history::H differential_vars::DV From da185b02c6bbef7f16c60edb8421cdf7610c329c Mon Sep 17 00:00:00 2001 From: David Widmann Date: Thu, 22 Feb 2024 17:07:52 +0100 Subject: [PATCH 5/5] Remove DDEStats --- src/DelayDiffEq.jl | 1 - src/ddestats.jl | 34 ---------------------------------- src/solve.jl | 3 +-- 3 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 src/ddestats.jl diff --git a/src/DelayDiffEq.jl b/src/DelayDiffEq.jl index d360675..f4f99c3 100644 --- a/src/DelayDiffEq.jl +++ b/src/DelayDiffEq.jl @@ -35,7 +35,6 @@ export Discontinuity, MethodOfSteps include("discontinuity_type.jl") include("functionwrapper.jl") -include("ddestats.jl") include("integrators/type.jl") include("integrators/utils.jl") diff --git a/src/ddestats.jl b/src/ddestats.jl deleted file mode 100644 index 421376d..0000000 --- a/src/ddestats.jl +++ /dev/null @@ -1,34 +0,0 @@ -mutable struct DDEStats - nf::Int - nf2::Int - nw::Int - nsolve::Int - njacs::Int - nnonliniter::Int - nnonlinconvfail::Int - nfpiter::Int - nfpconvfail::Int - ncondition::Int - naccept::Int - nreject::Int - maxeig::Float64 -end - -DDEStats(x::Int = -1) = DDEStats(x, x, x, x, x, x, x, x, x, x, x, x, 0.0) - -function Base.show(io::IO, s::DDEStats) - println(io, summary(s)) - @printf io "%-60s %-d\n" "Number of function 1 evaluations:" s.nf - @printf io "%-60s %-d\n" "Number of function 2 evaluations:" s.nf2 - @printf io "%-60s %-d\n" "Number of W matrix evaluations:" s.nw - @printf io "%-60s %-d\n" "Number of linear solves:" s.nsolve - @printf io "%-60s %-d\n" "Number of Jacobians created:" s.njacs - @printf io "%-60s %-d\n" "Number of nonlinear solver iterations:" s.nnonliniter - @printf io "%-60s %-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 "%-60s %-d\n" "Number of rootfind condition calls:" s.ncondition - @printf io "%-60s %-d\n" "Number of accepted steps:" s.naccept - @printf io "%-60s %-d" "Number of rejected steps:" s.nreject - iszero(s.maxeig) || @printf io "\n%-60s %-d" "Maximum eigenvalue recorded:" s.maxeig -end diff --git a/src/solve.jl b/src/solve.jl index c6a145f..7a1e938 100644 --- a/src/solve.jl +++ b/src/solve.jl @@ -166,8 +166,7 @@ function DiffEqBase.__init(prob::DiffEqBase.AbstractDDEProblem, Val(isinplace(prob))) # separate statistics of the integrator and the history - #stats = DDEStats(0) - stats = SciMLBase.DEStats(0) + stats = SciMLBase.DEStats(0) # create solution alg_choice = iscomposite(alg) ? Int[] : nothing