From f0277ded6fd5f5c63fc0e2b7908e50770d4b854e Mon Sep 17 00:00:00 2001 From: jClugstor Date: Thu, 31 Jul 2025 15:52:07 -0400 Subject: [PATCH 01/74] add verbosity types --- lib/OrdinaryDiffEqCore/src/verbosity.jl | 194 ++++++++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 lib/OrdinaryDiffEqCore/src/verbosity.jl diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl new file mode 100644 index 0000000000..affc02c592 --- /dev/null +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -0,0 +1,194 @@ +ode_defaults = Dict( + :dt_NaN => Verbosity.Warn(), + :init_NaN => Verbosity.Warn(), + :rosenbrock_no_differential_states => Verbosity.Warn(), + :dense_output_saveat => Verbosity.Warn(), + :alg_switch => Verbosity.Warn(), + :mismatched_input_output_type => Verbosity.Warn() +) + +mutable struct ODEErrorControlVerbosity + dt_NaN::Verbosity.Type + init_NaN::Verbosity.Type + rosenbrock_no_differential_states::Verbosity.Type + dense_output_saveat::Verbosity.Type + + function ODEErrorControlVerbosity(; + dt_NaN = defaults[:dt_NaN], init_NaN = defaults[:init_NaN], + rosenbrock_no_differential_states = defaults[:rosenbrock_no_differential_states], dense_output_saveat = defaults[:dense_output_saveat]) + new(dt_NaN, init_NaN, rosenbrock_no_differential_states, dense_output_saveat) + end +end + +function ODEErrorControlVerbosity(verbose::Verbosity.Type) + @match verbose begin + Verbosity.None() => ODEErrorControlVerbosity(fill( + Verbosity.None(), length(fieldnames(ODEErrorControlVerbosity)))...) + + Verbosity.Info() => ODEErrorControlVerbosity(fill( + Verbosity.Info(), length(fieldnames(ODEErrorControlVerbosity)))...) + + Verbosity.Warn() => ODEErrorControlVerbosity(fill( + Verbosity.Warn(), length(fieldnames(ODEErrorControlVerbosity)))...) + + Verbosity.Error() => ODEErrorControlVerbosity(fill( + Verbosity.Error(), length(fieldnames(ODEErrorControlVerbosity)))...) + + Verbosity.Default() => ODEErrorControlVerbosity() + + Verbosity.Edge() => ODEErrorControlVerbosity() + + _ => @error "Not a valid choice for verbosity." + end +end + +mutable struct ODEPerformanceVerbosity + alg_switch::Verbosity.Type + mismatched_input_output_type::Verbosity.Type + + function ODEPerformanceVerbosity(; alg_switch = defaults[:alg_switch], + mismatched_input_output_type = defaults[:mismatched_input_output_type]) + new(alg_switch, mismatched_input_output_type) + end +end + +function ODEPerformanceVerbosity(verbose::Verbosity.Type) + @match verbose begin + Verbosity.None() => ODEPerformanceVerbosity(fill( + Verbosity.None(), length(fieldnames(ODEPerformanceVerbosity)))...) + + Verbosity.Info() => ODEPerformanceVerbosity(fill( + Verbosity.Info(), length(fieldnames(ODEPerformanceVerbosity)))...) + + Verbosity.Warn() => ODEPerformanceVerbosity(fill( + Verbosity.Warn(), length(fieldnames(ODEPerformanceVerbosity)))...) + + Verbosity.Error() => ODEPerformanceVerbosity(fill( + Verbosity.Error(), length(fieldnames(ODEPerformanceVerbosity)))...) + + Verbosity.Default() => ODEPerformanceVerbosity() + + _ => @error "Not a valid choice for verbosity." + end +end + +mutable struct ODENumericalVerbosity + @add_kwonly function ODENumericalVerbosity() + new() + end +end + +function ODENumericalVerbosity(verbose::Verbosity.Type) + @match verbose begin + Verbosity.None() => ODENumericalVerbosity(fill( + Verbosity.None(), length(fieldnames(ODENumericalVerbosity)))...) + + Verbosity.Info() => ODENumericalVerbosity(fill( + Verbosity.None(), length(fieldnames(ODENumericalVerbosity)))...) + + Verbosity.Warn() => ODENumericalVerbosity(fill( + Verbosity.Warn(), length(fieldnames(ODENumericalVerbosity)))...) + + Verbosity.Error() => ODENumericalVerbosity(fill( + Verbosity.Error(), length(fieldnames(ODENumericalVerbosity)))...) + + Verbosity.Default() => ODENumericalVerbosity() + + _ => @error "Not a valid choice for verbosity." + end +end + +struct ODEVerbosity{T} <: AbstractVerbositySpecifier{T} + linear_verbosity::LinearVerbosity + nonlinear_verbosity::NonlinearVerbosity + + error_control::ODEErrorControlVerbosity + performance::ODEPerformanceVerbosity + numerical::ODENumericalVerbosity +end + +function ODEVerbosity(verbose::Verbosity.Type) + @match verbose begin + Verbosity.Default() => ODEVerbosity{true}( + LinearVerbosity(Verbosity.Default()), + NonlinearVerbosity(Verbosity.Default()), + ODEErrorControlVerbosity(Verbosity.Default()), + ODEPerformanceVerbosity(Verbosity.Default()), + ODENumericalVerbosity(Verbosity.Default()) + ) + + Verbosity.None() => ODEVerbosity{false}( + LinearVerbosity(Verbosity.None()), + NonlinearVerbosity(Verbosity.None()), + ODEErrorControlVerbosity(Verbosity.None()), + ODEPerformanceVerbosity(Verbosity.None()), + ODENumericalVerbosity(Verbosity.None()) + ) + + Verbosity.All() => ODEVerbosity{true}( + LinearVerbosity(Verbosity.All()), + NonlinearVerbosity(Verbosity.All()), + ODEErrorControlVerbosity(Verbosity.Info()), + ODEPerformanceVerbosity(Verbosity.Info()), + ODENumericalVerbosity(Verbosity.Info()) + ) + + _ => @error "Not a valid choice for verbosity." + end +end + +function ODEVerbosity(; + error_control = Verbosity.Default(), performance = Verbosity.Default(), + numerical = Verbosity.Default(), linear_verbosity = Verbosity.Default(), + nonlinear_verbosity = Verbosity.Default(), kwargs...) + if error_control isa Verbosity.Type + error_control_verbosity = ODEErrorControlVerbosity(error_control) + else + error_control_verbosity = error_control + end + + if performance isa Verbosity.Type + performance_verbosity = ODEPerformanceVerbosity(performance) + else + performance_verbosity = performance + end + + if numerical isa Verbosity.Type + numerical_verbosity = ODENumericalVerbosity(numerical) + else + numerical_verbosity = numerical + end + + if linear_verbosity isa Verbosity.Type + linear = LinearVerbosity(linear_verbosity) + elseif linear_verbosity isa NamedTuple + linear = LinearVerbosity(linear) + else + linear = linear_verbosity + end + + if nonlinear_verbosity isa Verbosity.Type + nonlinear = NonlinearVerbosity(nonlinear_verbosity) + elseif nonlinear_verbosity isa NamedTuple + nonlinear = NonlinearVerbosity(nonlinear_verbosity) + else + nonlinear = nonlinear_verbosity + end + + if !isempty(kwargs) + for (key, value) in pairs(kwargs) + if hasfield(ODEErrorControlVerbosity, key) + setproperty!(error_control_verbosity, key, value) + elseif hasfield(ODEPerformanceVerbosity, key) + setproperty!(performance_verbosity, key, value) + elseif hasfield(ODENumericalVerbosity, key) + setproperty!(numerical_verbosity, key, value) + else + error("$key is not a recognized verbosity toggle.") + end + end + end + + ODEVerbosity{true}(linear, nonlinear, error_control_verbosity, + performance_verbosity, numerical_verbosity) +end \ No newline at end of file From 6b03263e5aff7ce226e27e23d41feb671b820b4c Mon Sep 17 00:00:00 2001 From: jClugstor Date: Thu, 31 Jul 2025 16:44:19 -0400 Subject: [PATCH 02/74] add imports --- lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl index 53e3383b49..86d0445441 100644 --- a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl +++ b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl @@ -90,6 +90,8 @@ import Accessors: @reset # SciMLStructures symbols imported but not directly used in OrdinaryDiffEqCore # using SciMLStructures: canonicalize, Tunable, isscimlstructure +using SciMLVerbosity: Verbosity, @SciMLMessage + using SymbolicIndexingInterface: state_values, parameter_values const CompiledFloats = Union{Float32, Float64} From b31b01aa174bb1c3c137dfd03fbb3e94ad84c83b Mon Sep 17 00:00:00 2001 From: jClugstor Date: Thu, 31 Jul 2025 16:44:27 -0400 Subject: [PATCH 03/74] unrestrict types --- lib/OrdinaryDiffEqCore/src/verbosity.jl | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index affc02c592..b4c445308e 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -99,8 +99,8 @@ function ODENumericalVerbosity(verbose::Verbosity.Type) end struct ODEVerbosity{T} <: AbstractVerbositySpecifier{T} - linear_verbosity::LinearVerbosity - nonlinear_verbosity::NonlinearVerbosity + linear_verbosity + nonlinear_verbosity error_control::ODEErrorControlVerbosity performance::ODEPerformanceVerbosity @@ -159,22 +159,6 @@ function ODEVerbosity(; numerical_verbosity = numerical end - if linear_verbosity isa Verbosity.Type - linear = LinearVerbosity(linear_verbosity) - elseif linear_verbosity isa NamedTuple - linear = LinearVerbosity(linear) - else - linear = linear_verbosity - end - - if nonlinear_verbosity isa Verbosity.Type - nonlinear = NonlinearVerbosity(nonlinear_verbosity) - elseif nonlinear_verbosity isa NamedTuple - nonlinear = NonlinearVerbosity(nonlinear_verbosity) - else - nonlinear = nonlinear_verbosity - end - if !isempty(kwargs) for (key, value) in pairs(kwargs) if hasfield(ODEErrorControlVerbosity, key) From dd06a723ad913ba642340ed66e6f9860c8389d69 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Thu, 31 Jul 2025 22:36:44 -0400 Subject: [PATCH 04/74] ensure backwards compat --- lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl | 1 + lib/OrdinaryDiffEqCore/src/solve.jl | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl index 86d0445441..c4ecf43036 100644 --- a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl +++ b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl @@ -138,6 +138,7 @@ end include("doc_utils.jl") include("misc_utils.jl") +include("verbosity.jl") include("algorithms.jl") include("composite_algs.jl") diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 6ddd866f87..ae42bc5603 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -54,7 +54,7 @@ function SciMLBase.__init( internalopnorm = opnorm, isoutofdomain = ODE_DEFAULT_ISOUTOFDOMAIN, unstable_check = ODE_DEFAULT_UNSTABLE_CHECK, - verbose = true, + verbose = ODEVerbosity(), timeseries_errors = true, dense_errors = false, advance_to_tstop = false, @@ -427,6 +427,16 @@ function SciMLBase.__init( controller = default_controller(_alg, cache, qoldinit, beta1, beta2) end + if verbose isa Bool + if verbose + verbose = ODEVerbosity() + else + verbose = ODEVerbosity(Verbosity.None()) + end + elseif verbose isa Verbosity.Type + verbose = ODEVerbosity(verbose) + end + save_end_user = save_end save_end = save_end === nothing ? save_everystep || isempty(saveat) || saveat isa Number || From e24bc4c020b8468ba51a16450ae0ddf3f234ac4a Mon Sep 17 00:00:00 2001 From: jClugstor Date: Thu, 31 Jul 2025 23:33:35 -0400 Subject: [PATCH 05/74] add SciMLMessage messages --- lib/OrdinaryDiffEqCore/src/initdt.jl | 12 +++---- .../src/integrators/controllers.jl | 4 ++- lib/OrdinaryDiffEqCore/src/solve.jl | 33 ++++++++++--------- lib/OrdinaryDiffEqCore/src/verbosity.jl | 7 ++-- .../src/initialize_dae.jl | 12 ++++--- 5 files changed, 39 insertions(+), 29 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/initdt.jl b/lib/OrdinaryDiffEqCore/src/initdt.jl index 991ed87ac9..1b52e598d5 100644 --- a/lib/OrdinaryDiffEqCore/src/initdt.jl +++ b/lib/OrdinaryDiffEqCore/src/initdt.jl @@ -128,10 +128,8 @@ # because it also checks if partials are NaN # https://discourse.julialang.org/t/incorporating-forcing-functions-in-the-ode-model/70133/26 if isnan(d₁) - if integrator.opts.verbose - @warn("First function call produced NaNs. Exiting. Double check that none of the initial conditions, parameters, or timespan values are NaN.") - end - + @SciMLMessage("First function call produced NaNs. Exiting. Double check that none of the initial conditions, parameters, or timespan values are NaN.", + integrator.opts.verbose, :init_NaN, :error_control) return tdir * dtmin end @@ -249,8 +247,10 @@ end d₀ = internalnorm(u0 ./ sk, t) f₀ = f(u0, p, t) - if integrator.opts.verbose && any(x -> any(isnan, x), f₀) - @warn("First function call produced NaNs. Exiting. Double check that none of the initial conditions, parameters, or timespan values are NaN.") + + if any(x -> any(isnan, x), f₀) + @SciMLMessage("First function call produced NaNs. Exiting. Double check that none of the initial conditions, parameters, or timespan values are NaN.", + integrator.opts.verbose, :init_NaN, :error_control) end inferredtype = Base.promote_op(/, typeof(u0), typeof(oneunit(t))) diff --git a/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl b/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl index 9c58c48432..b65bf7af68 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl @@ -297,7 +297,9 @@ end k = min(alg_order(alg), alg_adaptive_order(alg)) + 1 dt_factor = err1^(beta1 / k) * err2^(beta2 / k) * err3^(beta3 / k) if isnan(dt_factor) - @warn "unlimited dt_factor" dt_factor err1 err2 err3 beta1 beta2 beta3 k + @SciMLMessage("unlimited dt_factor", + integrator.opts.verbose, :unlimited_dt, :numerical) + #@warn "unlimited dt_factor" dt_factor err1 err2 err3 beta1 beta2 beta3 k end dt_factor = controller.limiter(dt_factor) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index ae42bc5603..a5cc7fb979 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -96,14 +96,25 @@ function SciMLBase.__init( error("This solver is not able to use mass matrices. For compatible solvers see https://docs.sciml.ai/DiffEqDocs/stable/solvers/dae_solve/") end + if verbose isa Bool + if verbose + verbose = ODEVerbosity() + else + verbose = ODEVerbosity(Verbosity.None()) + end + elseif verbose isa Verbosity.Type + verbose = ODEVerbosity(verbose) + end + if alg isa OrdinaryDiffEqRosenbrockAdaptiveAlgorithm && # https://github.com/SciML/OrdinaryDiffEq.jl/pull/2079 fixes this for Rosenbrock23 and 32 !only_diagonal_mass_matrix(alg) && prob.f.mass_matrix isa AbstractMatrix && all(isequal(0), prob.f.mass_matrix) # technically this should also warn for zero operators but those are hard to check for - if (dense || !isempty(saveat)) && verbose - @warn("Rosenbrock methods on equations without differential states do not bound the error on interpolations.") + if (dense || !isempty(saveat)) + @SciMLMessage("Rosenbrock methods on equations without differential states do not bound the error on interpolations.", + verbose, :rosenbrock_no_differential_states, :numerical) end end @@ -114,7 +125,8 @@ function SciMLBase.__init( end if !isempty(saveat) && dense - @warn("Dense output is incompatible with saveat. Please use the SavingCallback from the Callback Library to mix the two behaviors.") + @SciMLMessage("Dense output is incompatible with saveat. Please use the SavingCallback from the Callback Library to mix the two behaviors.", + verbose, :dense_output_saveat, :error_control) end progress && @logmsg(LogLevel(-1), progress_name, _id=progress_id, progress=0) @@ -427,16 +439,6 @@ function SciMLBase.__init( controller = default_controller(_alg, cache, qoldinit, beta1, beta2) end - if verbose isa Bool - if verbose - verbose = ODEVerbosity() - else - verbose = ODEVerbosity(Verbosity.None()) - end - elseif verbose isa Verbosity.Type - verbose = ODEVerbosity(verbose) - end - save_end_user = save_end save_end = save_end === nothing ? save_everystep || isempty(saveat) || saveat isa Number || @@ -651,9 +653,8 @@ function handle_dt!(integrator) error("Automatic dt setting has the wrong sign. Exiting. Please report this error.") end if isnan(integrator.dt) - if integrator.opts.verbose - @warn("Automatic dt set the starting dt as NaN, causing instability. Exiting.") - end + @SciMLMessage("Automatic dt set the starting dt as NaN, causing instability. Exiting.", + integrator.opts.verbose, :dt_NaN, :numerical) end elseif integrator.opts.adaptive && integrator.dt > zero(integrator.dt) && integrator.tdir < 0 diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index b4c445308e..6a98ea8136 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -4,13 +4,13 @@ ode_defaults = Dict( :rosenbrock_no_differential_states => Verbosity.Warn(), :dense_output_saveat => Verbosity.Warn(), :alg_switch => Verbosity.Warn(), - :mismatched_input_output_type => Verbosity.Warn() + :mismatched_input_output_type => Verbosity.Warn(), + :shampine_dt => Verbosity.Warn() ) mutable struct ODEErrorControlVerbosity dt_NaN::Verbosity.Type init_NaN::Verbosity.Type - rosenbrock_no_differential_states::Verbosity.Type dense_output_saveat::Verbosity.Type function ODEErrorControlVerbosity(; @@ -73,6 +73,9 @@ function ODEPerformanceVerbosity(verbose::Verbosity.Type) end mutable struct ODENumericalVerbosity + rosenbrock_no_differential_states::Verbosity.Type + shampine_dt::Verbosity.Type + unlimited_dt::Verbosity.Type @add_kwonly function ODENumericalVerbosity() new() end diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl index e87963f362..576e8a7374 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl @@ -162,7 +162,8 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD end if failed - @warn "ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`." + @SciMLMessage("ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", + integrator.opts.verbose, :shampine_dt, :numerical) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) end @@ -241,7 +242,8 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD end if failed - @warn "ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`." + @SciMLMessage("ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", + integrator.opts.verbose, :shampine_dt, :numerical) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) end @@ -318,7 +320,8 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA recursivecopy!(integrator.uprev2, integrator.uprev) end if nlsol.retcode != ReturnCode.Success - @warn "ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`." + @SciMLMessage("ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", + integrator.opts.verbose, :shampine_dt, :numerical) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) end @@ -366,7 +369,8 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA integrator.uprev2 = copy(integrator.uprev) end if nlsol.retcode != ReturnCode.Success - @warn "ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`." + @SciMLMessage("ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", + integrator.opts.verbose, :shampine_dt, :numerical) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) end From eca24a147ddd6b2dcc92aea0b668cb203629188e Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 1 Aug 2025 14:50:39 -0400 Subject: [PATCH 06/74] make constructors use kwargs --- lib/OrdinaryDiffEqCore/src/verbosity.jl | 124 ++++++++++++++---------- 1 file changed, 74 insertions(+), 50 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index 6a98ea8136..083082bc62 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -5,7 +5,8 @@ ode_defaults = Dict( :dense_output_saveat => Verbosity.Warn(), :alg_switch => Verbosity.Warn(), :mismatched_input_output_type => Verbosity.Warn(), - :shampine_dt => Verbosity.Warn() + :shampine_dt => Verbosity.Warn(), + :unlimited_dt => Verbosity.Warn() ) mutable struct ODEErrorControlVerbosity @@ -14,31 +15,35 @@ mutable struct ODEErrorControlVerbosity dense_output_saveat::Verbosity.Type function ODEErrorControlVerbosity(; - dt_NaN = defaults[:dt_NaN], init_NaN = defaults[:init_NaN], - rosenbrock_no_differential_states = defaults[:rosenbrock_no_differential_states], dense_output_saveat = defaults[:dense_output_saveat]) - new(dt_NaN, init_NaN, rosenbrock_no_differential_states, dense_output_saveat) + dt_NaN = ode_defaults[:dt_NaN], init_NaN = ode_defaults[:init_NaN], dense_output_saveat = ode_defaults[:dense_output_saveat]) + @info "here" + new(dt_NaN, init_NaN, dense_output_saveat) end end function ODEErrorControlVerbosity(verbose::Verbosity.Type) @match verbose begin - Verbosity.None() => ODEErrorControlVerbosity(fill( - Verbosity.None(), length(fieldnames(ODEErrorControlVerbosity)))...) + Verbosity.Default() => ODEErrorControlVerbosity() - Verbosity.Info() => ODEErrorControlVerbosity(fill( - Verbosity.Info(), length(fieldnames(ODEErrorControlVerbosity)))...) + Verbosity.None() => ODEErrorControlVerbosity(;NamedTuple{fieldnames(ODEErrorControlVerbosity)}(fill( + Verbosity.None(), + length(fieldnames(ODEErrorControlVerbosity))))...) - Verbosity.Warn() => ODEErrorControlVerbosity(fill( - Verbosity.Warn(), length(fieldnames(ODEErrorControlVerbosity)))...) + Verbosity.Info() => ODEErrorControlVerbosity(;NamedTuple{fieldnames(ODEErrorControlVerbosity)}(fill( + Verbosity.Info(), + length(fieldnames(ODEErrorControlVerbosity))))...) - Verbosity.Error() => ODEErrorControlVerbosity(fill( - Verbosity.Error(), length(fieldnames(ODEErrorControlVerbosity)))...) + Verbosity.Warn() => ODEErrorControlVerbosity(;NamedTuple{fieldnames(ODEErrorControlVerbosity)}(fill( + Verbosity.Warn(), + length(fieldnames(ODEErrorControlVerbosity))))...) - Verbosity.Default() => ODEErrorControlVerbosity() + Verbosity.Error() => ODEErrorControlVerbosity(;NamedTuple{fieldnames(ODEErrorControlVerbosity)}(fill( + Verbosity.Error(), + length(fieldnames(ODEErrorControlVerbosity))))...) Verbosity.Edge() => ODEErrorControlVerbosity() - _ => @error "Not a valid choice for verbosity." + _ => @error "$verbose is not a valid choice for verbosity." end end @@ -46,25 +51,33 @@ mutable struct ODEPerformanceVerbosity alg_switch::Verbosity.Type mismatched_input_output_type::Verbosity.Type - function ODEPerformanceVerbosity(; alg_switch = defaults[:alg_switch], - mismatched_input_output_type = defaults[:mismatched_input_output_type]) + function ODEPerformanceVerbosity(;alg_switch = ode_defaults[:alg_switch], + mismatched_input_output_type = ode_defaults[:mismatched_input_output_type]) new(alg_switch, mismatched_input_output_type) end end function ODEPerformanceVerbosity(verbose::Verbosity.Type) @match verbose begin - Verbosity.None() => ODEPerformanceVerbosity(fill( - Verbosity.None(), length(fieldnames(ODEPerformanceVerbosity)))...) - - Verbosity.Info() => ODEPerformanceVerbosity(fill( - Verbosity.Info(), length(fieldnames(ODEPerformanceVerbosity)))...) - - Verbosity.Warn() => ODEPerformanceVerbosity(fill( - Verbosity.Warn(), length(fieldnames(ODEPerformanceVerbosity)))...) - - Verbosity.Error() => ODEPerformanceVerbosity(fill( - Verbosity.Error(), length(fieldnames(ODEPerformanceVerbosity)))...) + Verbosity.None() => ODEPerformanceVerbosity(; + NamedTuple{fieldnames(ODEPerformanceVerbosity)}(fill( + Verbosity.None(), + length(fieldnames(ODEPerformanceVerbosity))))...) + + Verbosity.Info() => ODEPerformanceVerbosity(; + NamedTuple{fieldnames(ODEPerformanceVerbosity)}(fill( + Verbosity.Info(), + length(fieldnames(ODEPerformanceVerbosity))))...) + + Verbosity.Warn() => ODEPerformanceVerbosity(; + NamedTuple{fieldnames(ODEPerformanceVerbosity)}(fill( + Verbosity.Warn(), + length(fieldnames(ODEPerformanceVerbosity))))...) + + Verbosity.Error() => ODEPerformanceVerbosity(; + NamedTuple{fieldnames(ODEPerformanceVerbosity)}(fill( + Verbosity.Error(), + length(fieldnames(ODEPerformanceVerbosity))))...) Verbosity.Default() => ODEPerformanceVerbosity() @@ -76,24 +89,35 @@ mutable struct ODENumericalVerbosity rosenbrock_no_differential_states::Verbosity.Type shampine_dt::Verbosity.Type unlimited_dt::Verbosity.Type - @add_kwonly function ODENumericalVerbosity() - new() + function ODENumericalVerbosity(; + rosenbrock_no_differential_states = ode_defaults[:rosenbrock_no_differential_states], + shampine_dt = ode_defaults[:shampine_dt], + unlimited_dt = ode_defaults[:unlimited_dt]) + new(rosenbrock_no_differential_states, shampine_dt, unlimited_dt) end end function ODENumericalVerbosity(verbose::Verbosity.Type) @match verbose begin - Verbosity.None() => ODENumericalVerbosity(fill( - Verbosity.None(), length(fieldnames(ODENumericalVerbosity)))...) - - Verbosity.Info() => ODENumericalVerbosity(fill( - Verbosity.None(), length(fieldnames(ODENumericalVerbosity)))...) - - Verbosity.Warn() => ODENumericalVerbosity(fill( - Verbosity.Warn(), length(fieldnames(ODENumericalVerbosity)))...) - - Verbosity.Error() => ODENumericalVerbosity(fill( - Verbosity.Error(), length(fieldnames(ODENumericalVerbosity)))...) + Verbosity.None() => ODENumericalVerbosity(; + NamedTuple{fieldnames(ODENumericalVerbosity)}(fill( + Verbosity.None(), + length(fieldnames(ODENumericalVerbosity))))...) + + Verbosity.Info() => OODENumericalVerbosity(; + NamedTuple{fieldnames(ODENumericalVerbosity)}(fill( + Verbosity.Info(), + length(fieldnames(ODENumericalVerbosity))))...) + + Verbosity.Warn() => ODENumericalVerbosity(; + NamedTuple{fieldnames(ODENumericalVerbosity)}(fill( + Verbosity.Warn(), + length(fieldnames(ODENumericalVerbosity))))...) + + Verbosity.Error() => ODENumericalVerbosity(; + NamedTuple{fieldnames(ODENumericalVerbosity)}(fill( + Verbosity.Error(), + length(fieldnames(ODENumericalVerbosity))))...) Verbosity.Default() => ODENumericalVerbosity() @@ -101,9 +125,9 @@ function ODENumericalVerbosity(verbose::Verbosity.Type) end end -struct ODEVerbosity{T} <: AbstractVerbositySpecifier{T} - linear_verbosity - nonlinear_verbosity +struct ODEVerbosity{T} + linear_verbosity::Any + nonlinear_verbosity::Any error_control::ODEErrorControlVerbosity performance::ODEPerformanceVerbosity @@ -113,24 +137,24 @@ end function ODEVerbosity(verbose::Verbosity.Type) @match verbose begin Verbosity.Default() => ODEVerbosity{true}( - LinearVerbosity(Verbosity.Default()), - NonlinearVerbosity(Verbosity.Default()), + Verbosity.Default(), + Verbosity.Default(), ODEErrorControlVerbosity(Verbosity.Default()), ODEPerformanceVerbosity(Verbosity.Default()), ODENumericalVerbosity(Verbosity.Default()) ) Verbosity.None() => ODEVerbosity{false}( - LinearVerbosity(Verbosity.None()), - NonlinearVerbosity(Verbosity.None()), + Verbosity.None(), + Verbosity.None(), ODEErrorControlVerbosity(Verbosity.None()), ODEPerformanceVerbosity(Verbosity.None()), ODENumericalVerbosity(Verbosity.None()) ) Verbosity.All() => ODEVerbosity{true}( - LinearVerbosity(Verbosity.All()), - NonlinearVerbosity(Verbosity.All()), + Verbosity.Default(), + Verbosity.Default(), ODEErrorControlVerbosity(Verbosity.Info()), ODEPerformanceVerbosity(Verbosity.Info()), ODENumericalVerbosity(Verbosity.Info()) @@ -176,6 +200,6 @@ function ODEVerbosity(; end end - ODEVerbosity{true}(linear, nonlinear, error_control_verbosity, + ODEVerbosity{true}(linear_verbosity, nonlinear_verbosity, error_control_verbosity, performance_verbosity, numerical_verbosity) end \ No newline at end of file From 263eaa8c20de5f039b860eaa9528f8e206073f76 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 1 Aug 2025 14:50:55 -0400 Subject: [PATCH 07/74] add AbstractVerbositySpecifier --- lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl index c4ecf43036..643b301f88 100644 --- a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl +++ b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl @@ -90,7 +90,7 @@ import Accessors: @reset # SciMLStructures symbols imported but not directly used in OrdinaryDiffEqCore # using SciMLStructures: canonicalize, Tunable, isscimlstructure -using SciMLVerbosity: Verbosity, @SciMLMessage +using SciMLVerbosity: Verbosity, @SciMLMessage, AbstractVerbositySpecifier using SymbolicIndexingInterface: state_values, parameter_values From 674d3b189e1c826d96c5df44108fb6ed7fb71c9d Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 1 Aug 2025 14:57:11 -0400 Subject: [PATCH 08/74] add SciMLMessage imports --- .../src/OrdinaryDiffEqAdamsBashforthMoulton.jl | 2 +- lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl | 2 +- lib/OrdinaryDiffEqDefault/src/OrdinaryDiffEqDefault.jl | 2 +- .../src/OrdinaryDiffEqDifferentiation.jl | 2 +- .../src/OrdinaryDiffEqExplicitRK.jl | 2 +- .../src/OrdinaryDiffEqExponentialRK.jl | 2 +- .../src/OrdinaryDiffEqExtrapolation.jl | 2 +- lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl | 2 +- lib/OrdinaryDiffEqFeagin/src/OrdinaryDiffEqFeagin.jl | 2 +- .../src/OrdinaryDiffEqFunctionMap.jl | 2 +- .../src/OrdinaryDiffEqHighOrderRK.jl | 2 +- .../src/OrdinaryDiffEqIMEXMultistep.jl | 2 +- lib/OrdinaryDiffEqLinear/src/OrdinaryDiffEqLinear.jl | 2 +- .../src/OrdinaryDiffEqLowOrderRK.jl | 1 + .../src/OrdinaryDiffEqLowStorageRK.jl | 2 +- .../src/OrdinaryDiffEqNonlinearSolve.jl | 4 ++-- .../src/OrdinaryDiffEqNordsieck.jl | 2 +- lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl | 2 +- lib/OrdinaryDiffEqPRK/src/OrdinaryDiffEqPRK.jl | 2 +- lib/OrdinaryDiffEqQPRK/src/OrdinaryDiffEqQPRK.jl | 2 +- lib/OrdinaryDiffEqRKN/src/OrdinaryDiffEqRKN.jl | 2 +- .../src/OrdinaryDiffEqRosenbrock.jl | 2 +- lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl | 2 +- lib/OrdinaryDiffEqSSPRK/src/OrdinaryDiffEqSSPRK.jl | 2 +- .../src/OrdinaryDiffEqStabilizedIRK.jl | 2 +- .../src/OrdinaryDiffEqStabilizedRK.jl | 2 +- .../src/OrdinaryDiffEqSymplecticRK.jl | 2 +- .../src/OrdinaryDiffEqTaylorSeries.jl | 2 +- lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl | 2 +- lib/OrdinaryDiffEqVerner/src/OrdinaryDiffEqVerner.jl | 2 +- test/interface/verbosity.jl | 9 +++++++++ 31 files changed, 40 insertions(+), 30 deletions(-) create mode 100644 test/interface/verbosity.jl diff --git a/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/OrdinaryDiffEqAdamsBashforthMoulton.jl b/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/OrdinaryDiffEqAdamsBashforthMoulton.jl index fda67f03d6..448af25852 100644 --- a/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/OrdinaryDiffEqAdamsBashforthMoulton.jl +++ b/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/OrdinaryDiffEqAdamsBashforthMoulton.jl @@ -10,7 +10,7 @@ import OrdinaryDiffEqCore: OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCac trivial_limiter!, get_fsalfirstlast, generic_solver_docstring, full_cache, - _bool_to_ADType + _bool_to_ADType, @SciMLMessage import OrdinaryDiffEqLowOrderRK: BS3ConstantCache, BS3Cache, RK4ConstantCache, RK4Cache import RecursiveArrayTools: recursivefill! using MuladdMacro, FastBroadcast diff --git a/lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl b/lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl index fb7ab3d305..864ec2243d 100644 --- a/lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl +++ b/lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl @@ -21,7 +21,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, step_reject_controller!, post_newton_controller!, u_modified!, DAEAlgorithm, _unwrap_val, DummyController, get_fsalfirstlast, generic_solver_docstring, _bool_to_ADType, - _process_AD_choice + _process_AD_choice, @SciMLMessage using OrdinaryDiffEqSDIRK: ImplicitEulerConstantCache, ImplicitEulerCache using TruncatedStacktraces: @truncate_stacktrace diff --git a/lib/OrdinaryDiffEqDefault/src/OrdinaryDiffEqDefault.jl b/lib/OrdinaryDiffEqDefault/src/OrdinaryDiffEqDefault.jl index ea030b19ca..5873de2582 100644 --- a/lib/OrdinaryDiffEqDefault/src/OrdinaryDiffEqDefault.jl +++ b/lib/OrdinaryDiffEqDefault/src/OrdinaryDiffEqDefault.jl @@ -10,7 +10,7 @@ using OrdinaryDiffEqRosenbrock: Rosenbrock23, Rodas5P using OrdinaryDiffEqBDF: FBDF import OrdinaryDiffEqCore -import OrdinaryDiffEqCore: is_mass_matrix_alg, default_autoswitch, isdefaultalg +import OrdinaryDiffEqCore: is_mass_matrix_alg, default_autoswitch, isdefaultalg, @SciMLMessage import ADTypes: AutoFiniteDiff, AutoForwardDiff, AbstractADType import LinearSolve using LinearAlgebra: I, isdiag diff --git a/lib/OrdinaryDiffEqDifferentiation/src/OrdinaryDiffEqDifferentiation.jl b/lib/OrdinaryDiffEqDifferentiation/src/OrdinaryDiffEqDifferentiation.jl index 677b81e880..febdeeb76c 100644 --- a/lib/OrdinaryDiffEqDifferentiation/src/OrdinaryDiffEqDifferentiation.jl +++ b/lib/OrdinaryDiffEqDifferentiation/src/OrdinaryDiffEqDifferentiation.jl @@ -44,7 +44,7 @@ using OrdinaryDiffEqCore: OrdinaryDiffEqAlgorithm, OrdinaryDiffEqAdaptiveImplici get_new_W_γdt_cutoff, TryAgain, DIRK, COEFFICIENT_MULTISTEP, NORDSIECK_MULTISTEP, GLM, FastConvergence, Convergence, SlowConvergence, - VerySlowConvergence, Divergence, NLStatus, MethodType, constvalue + VerySlowConvergence, Divergence, NLStatus, MethodType, constvalue, @SciMLMessage import OrdinaryDiffEqCore: get_chunksize, resize_J_W!, resize_nlsolver!, alg_autodiff, _get_fwd_tag diff --git a/lib/OrdinaryDiffEqExplicitRK/src/OrdinaryDiffEqExplicitRK.jl b/lib/OrdinaryDiffEqExplicitRK/src/OrdinaryDiffEqExplicitRK.jl index 2c5d1d1758..a8491eac32 100644 --- a/lib/OrdinaryDiffEqExplicitRK/src/OrdinaryDiffEqExplicitRK.jl +++ b/lib/OrdinaryDiffEqExplicitRK/src/OrdinaryDiffEqExplicitRK.jl @@ -6,7 +6,7 @@ import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, alg_stability_size, unwrap_alg, OrdinaryDiffEqMutableCache, initialize!, perform_step!, isfsal, CompositeAlgorithm, calculate_residuals!, calculate_residuals, - full_cache, get_fsalfirstlast + full_cache, get_fsalfirstlast, @SciMLMessage using TruncatedStacktraces: @truncate_stacktrace using RecursiveArrayTools, FastBroadcast, MuladdMacro, DiffEqBase import LinearAlgebra: norm diff --git a/lib/OrdinaryDiffEqExponentialRK/src/OrdinaryDiffEqExponentialRK.jl b/lib/OrdinaryDiffEqExponentialRK/src/OrdinaryDiffEqExponentialRK.jl index ad51a34e39..70af626d91 100644 --- a/lib/OrdinaryDiffEqExponentialRK/src/OrdinaryDiffEqExponentialRK.jl +++ b/lib/OrdinaryDiffEqExponentialRK/src/OrdinaryDiffEqExponentialRK.jl @@ -9,7 +9,7 @@ import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, ismultistep, OrdinaryDiffEqAdaptiveExponentialAlgorithm, CompositeAlgorithm, ExponentialAlgorithm, fsal_typeof, isdtchangeable, calculate_residuals, calculate_residuals!, - full_cache, get_fsalfirstlast, + full_cache, get_fsalfirstlast, @SciMLMessage, generic_solver_docstring, _bool_to_ADType, _process_AD_choice import OrdinaryDiffEqCore using RecursiveArrayTools diff --git a/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl b/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl index 194b30e166..5fe13de84c 100644 --- a/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl +++ b/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl @@ -18,7 +18,7 @@ import OrdinaryDiffEqCore: alg_order, alg_maximum_order, get_current_adaptive_or _digest_beta1_beta2, timedepentdtmin, _unwrap_val, _reshape, _vec, get_fsalfirstlast, generic_solver_docstring, differentiation_rk_docstring, _bool_to_ADType, - _process_AD_choice, LinearAliasSpecifier + _process_AD_choice, LinearAliasSpecifier, @SciMLMessage using FastBroadcast, Polyester, MuladdMacro, RecursiveArrayTools, LinearSolve import OrdinaryDiffEqCore import FastPower diff --git a/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl b/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl index 7ab3cffccf..c8bb77ecff 100644 --- a/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl +++ b/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl @@ -18,7 +18,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, fac_default_gamma, get_current_adaptive_order, get_fsalfirstlast, isfirk, generic_solver_docstring, _bool_to_ADType, - _process_AD_choice, LinearAliasSpecifier + _process_AD_choice, LinearAliasSpecifier, @SciMLMessage using MuladdMacro, DiffEqBase, RecursiveArrayTools, Polyester isfirk, generic_solver_docstring using SciMLOperators: AbstractSciMLOperator diff --git a/lib/OrdinaryDiffEqFeagin/src/OrdinaryDiffEqFeagin.jl b/lib/OrdinaryDiffEqFeagin/src/OrdinaryDiffEqFeagin.jl index a796596133..dc9b244dce 100644 --- a/lib/OrdinaryDiffEqFeagin/src/OrdinaryDiffEqFeagin.jl +++ b/lib/OrdinaryDiffEqFeagin/src/OrdinaryDiffEqFeagin.jl @@ -9,7 +9,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, alg_cache, _vec, _reshape, @cache, isfsal, full_cache, constvalue, _unwrap_val, get_fsalfirstlast, generic_solver_docstring, trivial_limiter!, - _ode_interpolant!, _ode_addsteps! + _ode_interpolant!, _ode_addsteps!, @SciMLMessage using FastBroadcast, Polyester, MuladdMacro, RecursiveArrayTools using DiffEqBase: @def, @tight_loop_macros using Static: False diff --git a/lib/OrdinaryDiffEqFunctionMap/src/OrdinaryDiffEqFunctionMap.jl b/lib/OrdinaryDiffEqFunctionMap/src/OrdinaryDiffEqFunctionMap.jl index 7f35f5dc06..7e917727da 100644 --- a/lib/OrdinaryDiffEqFunctionMap/src/OrdinaryDiffEqFunctionMap.jl +++ b/lib/OrdinaryDiffEqFunctionMap/src/OrdinaryDiffEqFunctionMap.jl @@ -6,7 +6,7 @@ import OrdinaryDiffEqCore: isfsal, beta2_default, beta1_default, OrdinaryDiffEqA alg_cache, @cache, _ode_addsteps!, _ode_interpolant!, _ode_interpolant, get_fsalfirstlast, alg_order, OrdinaryDiffEqConstantCache, dt_required, - isdiscretecache, isdiscretealg, full_cache + isdiscretecache, isdiscretealg, full_cache, @SciMLMessage using DiffEqBase import RecursiveArrayTools: recursivecopy! import FastBroadcast: @.. diff --git a/lib/OrdinaryDiffEqHighOrderRK/src/OrdinaryDiffEqHighOrderRK.jl b/lib/OrdinaryDiffEqHighOrderRK/src/OrdinaryDiffEqHighOrderRK.jl index db7e15ffe0..b021ab2fc8 100644 --- a/lib/OrdinaryDiffEqHighOrderRK/src/OrdinaryDiffEqHighOrderRK.jl +++ b/lib/OrdinaryDiffEqHighOrderRK/src/OrdinaryDiffEqHighOrderRK.jl @@ -11,7 +11,7 @@ import OrdinaryDiffEqCore: alg_order, qmax_default, qmin_default, beta2_default, calculate_residuals!, calculate_residuals, CompiledFloats, copyat_or_push!, get_fsalfirstlast, unwrap_alg, _ode_interpolant, _ode_interpolant!, - DerivativeOrderNotPossibleError, full_cache, isdp8 + DerivativeOrderNotPossibleError, full_cache, isdp8, @SciMLMessage import Static: False import MuladdMacro: @muladd using DiffEqBase diff --git a/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl b/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl index 09ce3c180a..5fc328d6db 100644 --- a/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl +++ b/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl @@ -4,7 +4,7 @@ import OrdinaryDiffEqCore: alg_order, issplit, OrdinaryDiffEqNewtonAlgorithm, _u DEFAULT_PRECS, OrdinaryDiffEqConstantCache, OrdinaryDiffEqMutableCache, @cache, alg_cache, initialize!, perform_step!, @unpack, - full_cache, get_fsalfirstlast, + full_cache, get_fsalfirstlast, @SciMLMessage, generic_solver_docstring, _bool_to_ADType, _process_AD_choice using FastBroadcast diff --git a/lib/OrdinaryDiffEqLinear/src/OrdinaryDiffEqLinear.jl b/lib/OrdinaryDiffEqLinear/src/OrdinaryDiffEqLinear.jl index 0fdb370b03..38cc7a0843 100644 --- a/lib/OrdinaryDiffEqLinear/src/OrdinaryDiffEqLinear.jl +++ b/lib/OrdinaryDiffEqLinear/src/OrdinaryDiffEqLinear.jl @@ -9,7 +9,7 @@ import OrdinaryDiffEqCore: alg_order, alg_extrapolates, dt_required, initialize!, perform_step!, @unpack, unwrap_alg, calculate_residuals!, get_fsalfirstlast, _vec, isdtchangeable, full_cache, - generic_solver_docstring + generic_solver_docstring, @SciMLMessage using LinearAlgebra: mul!, I using SciMLOperators: AbstractSciMLOperator using ExponentialUtilities diff --git a/lib/OrdinaryDiffEqLowOrderRK/src/OrdinaryDiffEqLowOrderRK.jl b/lib/OrdinaryDiffEqLowOrderRK/src/OrdinaryDiffEqLowOrderRK.jl index 19d4c7ab50..4a702003ed 100644 --- a/lib/OrdinaryDiffEqLowOrderRK/src/OrdinaryDiffEqLowOrderRK.jl +++ b/lib/OrdinaryDiffEqLowOrderRK/src/OrdinaryDiffEqLowOrderRK.jl @@ -17,6 +17,7 @@ import OrdinaryDiffEqCore: alg_order, isfsal, beta2_default, beta1_default, AutoAlgSwitch, _ode_interpolant, _ode_interpolant!, full_cache, accept_step_controller, DerivativeOrderNotPossibleError, du_cache, u_cache, get_fsalfirstlast, copyat_or_push! + du_cache, u_cache, get_fsalfirstlast, @SciMLMessage using SciMLBase import MuladdMacro: @muladd import FastBroadcast: @.. diff --git a/lib/OrdinaryDiffEqLowStorageRK/src/OrdinaryDiffEqLowStorageRK.jl b/lib/OrdinaryDiffEqLowStorageRK/src/OrdinaryDiffEqLowStorageRK.jl index 22596ff12b..cf5c5a5e66 100644 --- a/lib/OrdinaryDiffEqLowStorageRK/src/OrdinaryDiffEqLowStorageRK.jl +++ b/lib/OrdinaryDiffEqLowStorageRK/src/OrdinaryDiffEqLowStorageRK.jl @@ -11,7 +11,7 @@ import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, calculate_residuals!, alg_cache, _vec, _reshape, @cache, isfsal, full_cache, constvalue, _unwrap_val, trivial_limiter!, perform_step!, initialize!, - explicit_rk_docstring, get_fsalfirstlast + explicit_rk_docstring, get_fsalfirstlast, @SciMLMessage using FastBroadcast, Polyester, MuladdMacro, RecursiveArrayTools, Adapt import StaticArrays: SArray, MVector, SVector, @SVector, StaticArray, MMatrix, SA import Static: False diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl index 4e58484ffb..e9713d3da0 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl @@ -29,7 +29,7 @@ import SciMLStructures: canonicalize, Tunable, isscimlstructure import OrdinaryDiffEqCore import SciMLOperators: islinear -import OrdinaryDiffEqCore: nlsolve_f, set_new_W!, set_W_γdt! +import OrdinaryDiffEqCore: nlsolve_f, set_new_W!, set_W_γdt!, @SciMLMessage @static if isdefined(OrdinaryDiffEqCore, :default_nlsolve) import OrdinaryDiffEqCore: default_nlsolve @@ -50,7 +50,7 @@ using OrdinaryDiffEqCore: resize_nlsolver!, _initialize_dae!, import OrdinaryDiffEqCore: _initialize_dae!, isnewton, get_W, isfirstcall, isfirststage, isJcurrent, get_new_W_γdt_cutoff, resize_nlsolver!, apply_step!, - postamble! + postamble!, @SciMLMessage import OrdinaryDiffEqDifferentiation: update_W!, is_always_new, build_uf, build_J_W, WOperator, StaticWOperator, wrapprecs, diff --git a/lib/OrdinaryDiffEqNordsieck/src/OrdinaryDiffEqNordsieck.jl b/lib/OrdinaryDiffEqNordsieck/src/OrdinaryDiffEqNordsieck.jl index 5db6344b12..45a2a0370e 100644 --- a/lib/OrdinaryDiffEqNordsieck/src/OrdinaryDiffEqNordsieck.jl +++ b/lib/OrdinaryDiffEqNordsieck/src/OrdinaryDiffEqNordsieck.jl @@ -11,7 +11,7 @@ import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, qsteady_max_default, calculate_residuals, calculate_residuals!, get_current_adaptive_order, get_fsalfirstlast, ode_interpolant, ode_interpolant!, trivial_limiter!, - generic_solver_docstring + generic_solver_docstring, @SciMLMessage using MuladdMacro, FastBroadcast, RecursiveArrayTools import LinearAlgebra: rmul! import Static: False diff --git a/lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl b/lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl index f286f5631b..0537f37589 100644 --- a/lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl +++ b/lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl @@ -6,7 +6,7 @@ import OrdinaryDiffEqCore: isfsal, alg_order, _unwrap_val, uses_uprev, @unpack, unwrap_alg, @cache, DEFAULT_PRECS, @threaded, initialize!, perform_step!, isthreaded, full_cache, get_fsalfirstlast, differentiation_rk_docstring, - _bool_to_ADType, _process_AD_choice + _bool_to_ADType, _process_AD_choice, @SciMLMessage import StaticArrays: SVector import MuladdMacro: @muladd import FastBroadcast: @.. diff --git a/lib/OrdinaryDiffEqPRK/src/OrdinaryDiffEqPRK.jl b/lib/OrdinaryDiffEqPRK/src/OrdinaryDiffEqPRK.jl index 8e0f3fe0d8..61d6a975f1 100644 --- a/lib/OrdinaryDiffEqPRK/src/OrdinaryDiffEqPRK.jl +++ b/lib/OrdinaryDiffEqPRK/src/OrdinaryDiffEqPRK.jl @@ -4,7 +4,7 @@ import OrdinaryDiffEqCore: OrdinaryDiffEqAlgorithm, alg_order, OrdinaryDiffEqMut OrdinaryDiffEqConstantCache, constvalue, @unpack, @cache, alg_cache, get_fsalfirstlast, unwrap_alg, perform_step!, @threaded, initialize!, isthreaded, - full_cache, generic_solver_docstring + full_cache, generic_solver_docstring, @SciMLMessage import MuladdMacro: @muladd import FastBroadcast: @.. using Polyester diff --git a/lib/OrdinaryDiffEqQPRK/src/OrdinaryDiffEqQPRK.jl b/lib/OrdinaryDiffEqQPRK/src/OrdinaryDiffEqQPRK.jl index 9e268acbe5..905764d7c8 100644 --- a/lib/OrdinaryDiffEqQPRK/src/OrdinaryDiffEqQPRK.jl +++ b/lib/OrdinaryDiffEqQPRK/src/OrdinaryDiffEqQPRK.jl @@ -7,7 +7,7 @@ import OrdinaryDiffEqCore: OrdinaryDiffEqAdaptiveAlgorithm, OrdinaryDiffEqConsta trivial_limiter!, alg_cache, alg_order, initialize!, perform_step!, get_fsalfirstlast, constvalue, calculate_residuals!, calculate_residuals, - full_cache + full_cache, @SciMLMessage using Static: False using MuladdMacro, FastBroadcast using RecursiveArrayTools: recursive_unitless_bottom_eltype, recursivefill! diff --git a/lib/OrdinaryDiffEqRKN/src/OrdinaryDiffEqRKN.jl b/lib/OrdinaryDiffEqRKN/src/OrdinaryDiffEqRKN.jl index cf23486570..f48eb1e923 100644 --- a/lib/OrdinaryDiffEqRKN/src/OrdinaryDiffEqRKN.jl +++ b/lib/OrdinaryDiffEqRKN/src/OrdinaryDiffEqRKN.jl @@ -12,7 +12,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, constvalue, _unwrap_val, _ode_interpolant, get_fsalfirstlast, trivial_limiter!, _ode_interpolant!, _ode_addsteps!, - generic_solver_docstring + generic_solver_docstring, @SciMLMessage using FastBroadcast, Polyester, MuladdMacro, RecursiveArrayTools using DiffEqBase: @def, @tight_loop_macros import OrdinaryDiffEqCore diff --git a/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl b/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl index ed279f8d43..f90d1c0fc1 100644 --- a/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl +++ b/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl @@ -13,7 +13,7 @@ import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, isWmethod, isfsal, _un calculate_residuals, has_stiff_interpolation, ODEIntegrator, resize_non_user_cache!, _ode_addsteps!, full_cache, DerivativeOrderNotPossibleError, _bool_to_ADType, - _process_AD_choice, LinearAliasSpecifier, copyat_or_push! + _process_AD_choice, LinearAliasSpecifier, @SciMLMessage, copyat_or_push! using MuladdMacro, FastBroadcast, RecursiveArrayTools import MacroTools: namify using MacroTools: @capture diff --git a/lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl b/lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl index a72d1e0584..d0c41bd0f8 100644 --- a/lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl +++ b/lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl @@ -14,7 +14,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, trivial_limiter!, _ode_interpolant!, isesdirk, issplit, ssp_coefficient, get_fsalfirstlast, generic_solver_docstring, - _bool_to_ADType, _process_AD_choice, current_extrapolant! + _bool_to_ADType, _process_AD_choice, current_extrapolant!, @SciMLMessage using TruncatedStacktraces: @truncate_stacktrace using MuladdMacro, MacroTools, FastBroadcast, RecursiveArrayTools using SciMLBase: SplitFunction diff --git a/lib/OrdinaryDiffEqSSPRK/src/OrdinaryDiffEqSSPRK.jl b/lib/OrdinaryDiffEqSSPRK/src/OrdinaryDiffEqSSPRK.jl index 911c3099ae..452556302d 100644 --- a/lib/OrdinaryDiffEqSSPRK/src/OrdinaryDiffEqSSPRK.jl +++ b/lib/OrdinaryDiffEqSSPRK/src/OrdinaryDiffEqSSPRK.jl @@ -12,7 +12,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, constvalue, _unwrap_val, explicit_rk_docstring, trivial_limiter!, _ode_interpolant, _ode_interpolant!, - _ode_addsteps!, get_fsalfirstlast, copyat_or_push! + _ode_addsteps!, get_fsalfirstlast, @SciMLMessage, copyat_or_push! using FastBroadcast, Polyester, MuladdMacro, RecursiveArrayTools using DiffEqBase: @def using Static: False diff --git a/lib/OrdinaryDiffEqStabilizedIRK/src/OrdinaryDiffEqStabilizedIRK.jl b/lib/OrdinaryDiffEqStabilizedIRK/src/OrdinaryDiffEqStabilizedIRK.jl index 2410c2a55b..c99731f919 100644 --- a/lib/OrdinaryDiffEqStabilizedIRK/src/OrdinaryDiffEqStabilizedIRK.jl +++ b/lib/OrdinaryDiffEqStabilizedIRK/src/OrdinaryDiffEqStabilizedIRK.jl @@ -7,7 +7,7 @@ import OrdinaryDiffEqCore: alg_order, alg_maximum_order, calculate_residuals, fac_default_gamma, OrdinaryDiffEqAlgorithm, OrdinaryDiffEqNewtonAdaptiveAlgorithm, OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCache, - OrdinaryDiffEqAdaptiveAlgorithm, + OrdinaryDiffEqAdaptiveAlgorithm, @SciMLMessage, OrdinaryDiffEqAdaptiveImplicitAlgorithm, alg_cache, _unwrap_val, DEFAULT_PRECS, @cache, _reshape, _vec, full_cache, get_fsalfirstlast, diff --git a/lib/OrdinaryDiffEqStabilizedRK/src/OrdinaryDiffEqStabilizedRK.jl b/lib/OrdinaryDiffEqStabilizedRK/src/OrdinaryDiffEqStabilizedRK.jl index 8ee60216d9..05025801b6 100644 --- a/lib/OrdinaryDiffEqStabilizedRK/src/OrdinaryDiffEqStabilizedRK.jl +++ b/lib/OrdinaryDiffEqStabilizedRK/src/OrdinaryDiffEqStabilizedRK.jl @@ -10,7 +10,7 @@ import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, calculate_residuals!, OrdinaryDiffEqAdaptiveAlgorithm, calc_dt_propose!, alg_cache, _vec, _reshape, @cache, constvalue, _unwrap_val, full_cache, get_fsalfirstlast, - generic_solver_docstring + generic_solver_docstring, @SciMLMessage using FastBroadcast, MuladdMacro, RecursiveArrayTools import StaticArrays: SArray, MVector, SVector, @SVector, StaticArray, MMatrix, SA import OrdinaryDiffEqCore diff --git a/lib/OrdinaryDiffEqSymplecticRK/src/OrdinaryDiffEqSymplecticRK.jl b/lib/OrdinaryDiffEqSymplecticRK/src/OrdinaryDiffEqSymplecticRK.jl index 2e05b19997..f57ded2674 100644 --- a/lib/OrdinaryDiffEqSymplecticRK/src/OrdinaryDiffEqSymplecticRK.jl +++ b/lib/OrdinaryDiffEqSymplecticRK/src/OrdinaryDiffEqSymplecticRK.jl @@ -9,7 +9,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, OrdinaryDiffEqPartitionedAlgorithm, CompiledFloats, uses_uprev, alg_cache, _vec, _reshape, @cache, isfsal, full_cache, - constvalue, _unwrap_val, + constvalue, _unwrap_val, @SciMLMessage, explicit_rk_docstring, trivial_limiter!, _ode_interpolant!, _ode_addsteps!, get_fsalfirstlast, generic_solver_docstring, default_linear_interpolation diff --git a/lib/OrdinaryDiffEqTaylorSeries/src/OrdinaryDiffEqTaylorSeries.jl b/lib/OrdinaryDiffEqTaylorSeries/src/OrdinaryDiffEqTaylorSeries.jl index a06dabaaf6..afcc1527d2 100644 --- a/lib/OrdinaryDiffEqTaylorSeries/src/OrdinaryDiffEqTaylorSeries.jl +++ b/lib/OrdinaryDiffEqTaylorSeries/src/OrdinaryDiffEqTaylorSeries.jl @@ -9,7 +9,7 @@ import OrdinaryDiffEqCore: alg_order, alg_stability_size, explicit_rk_docstring, CompiledFloats, @OnDemandTableauExtract, initialize!, perform_step!, OrdinaryDiffEqAlgorithm, CompositeAlgorithm, _ode_addsteps!, copyat_or_push!, - AutoAlgSwitch, get_fsalfirstlast, + AutoAlgSwitch, get_fsalfirstlast, @SciMLMessage, full_cache, DerivativeOrderNotPossibleError import Static: False import MuladdMacro: @muladd diff --git a/lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl b/lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl index 1bc8fe1cf0..e15c1813a5 100644 --- a/lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl +++ b/lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl @@ -7,7 +7,7 @@ import OrdinaryDiffEqCore: alg_order, alg_stability_size, explicit_rk_docstring, constvalue, @unpack, perform_step!, calculate_residuals, @cache, calculate_residuals!, _ode_interpolant, _ode_interpolant!, CompiledFloats, @OnDemandTableauExtract, initialize!, - perform_step!, + perform_step!, @SciMLMessage CompositeAlgorithm, _ode_addsteps!, copyat_or_push!, AutoAlgSwitch, get_fsalfirstlast, full_cache, DerivativeOrderNotPossibleError diff --git a/lib/OrdinaryDiffEqVerner/src/OrdinaryDiffEqVerner.jl b/lib/OrdinaryDiffEqVerner/src/OrdinaryDiffEqVerner.jl index 4fd7a60f84..d9dba1e539 100644 --- a/lib/OrdinaryDiffEqVerner/src/OrdinaryDiffEqVerner.jl +++ b/lib/OrdinaryDiffEqVerner/src/OrdinaryDiffEqVerner.jl @@ -8,7 +8,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCache, OrdinaryDiffEqAdaptiveAlgorithm, CompiledFloats, uses_uprev, alg_cache, _vec, _reshape, @cache, isfsal, full_cache, - constvalue, _unwrap_val, + constvalue, _unwrap_val, @SciMLMessage, explicit_rk_docstring, trivial_limiter!, _ode_interpolant, _ode_interpolant!, _ode_addsteps!, @fold, @OnDemandTableauExtract, AutoAlgSwitch, diff --git a/test/interface/verbosity.jl b/test/interface/verbosity.jl new file mode 100644 index 0000000000..0e1d88779e --- /dev/null +++ b/test/interface/verbosity.jl @@ -0,0 +1,9 @@ +using ODEProblemLibrary: prob_ode_vanderpol_stiff +using OrdinaryDiffEq, SciMLBase +import SciMLBase: Verbosity, ODEPerformanceVerbosity, ODEVerbosity + + +# Stiff Switching + +verb = ODEVerbosity(performance = ODEPerformanceVerbosity(alg_switch = Verbosity.Info())) +solve(prob_ode_vanderpol_stiff, AutoTsit5(Rodas5()), verbose = verb) \ No newline at end of file From 90bf91bc4b83edd00531dad279ce7b4a361d4875 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Mon, 20 Oct 2025 11:56:08 -0400 Subject: [PATCH 09/74] refactor ODEVerbosity --- lib/OrdinaryDiffEqCore/src/verbosity.jl | 397 ++++++++++++++---------- 1 file changed, 232 insertions(+), 165 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index 083082bc62..b7388e91b5 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -1,205 +1,272 @@ -ode_defaults = Dict( - :dt_NaN => Verbosity.Warn(), - :init_NaN => Verbosity.Warn(), - :rosenbrock_no_differential_states => Verbosity.Warn(), - :dense_output_saveat => Verbosity.Warn(), - :alg_switch => Verbosity.Warn(), - :mismatched_input_output_type => Verbosity.Warn(), - :shampine_dt => Verbosity.Warn(), - :unlimited_dt => Verbosity.Warn() -) - -mutable struct ODEErrorControlVerbosity - dt_NaN::Verbosity.Type - init_NaN::Verbosity.Type - dense_output_saveat::Verbosity.Type +# Group classifications +const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat) +const performance_options = (:alg_switch, :mismatched_input_output_type) +const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt) + +function option_group(option::Symbol) + if option in error_control_options + return :error_control + elseif option in performance_options + return :performance + elseif option in numerical_options + return :numerical + else + error("Unknown verbosity option: $option") + end +end - function ODEErrorControlVerbosity(; - dt_NaN = ode_defaults[:dt_NaN], init_NaN = ode_defaults[:init_NaN], dense_output_saveat = ode_defaults[:dense_output_saveat]) - @info "here" - new(dt_NaN, init_NaN, dense_output_saveat) +# Get all options in a group +function group_options(verbosity::ODEVerbosity, group::Symbol) + if group === :error_control + return NamedTuple{error_control_options}(getproperty(verbosity, opt) + for opt in error_control_options) + elseif group === :performance + return NamedTuple{performance_options}(getproperty(verbosity, opt) + for opt in performance_options) + elseif group === :numerical + return NamedTuple{numerical_options}(getproperty(verbosity, opt) + for opt in numerical_options) + else + error("Unknown group: $group") end end -function ODEErrorControlVerbosity(verbose::Verbosity.Type) - @match verbose begin - Verbosity.Default() => ODEErrorControlVerbosity() +""" + ODEVerbosity <: AbstractVerbositySpecifier - Verbosity.None() => ODEErrorControlVerbosity(;NamedTuple{fieldnames(ODEErrorControlVerbosity)}(fill( - Verbosity.None(), - length(fieldnames(ODEErrorControlVerbosity))))...) +Verbosity configuration for OrdinaryDiffEq.jl solvers, providing fine-grained control over +diagnostic messages, warnings, and errors during ODE solution. - Verbosity.Info() => ODEErrorControlVerbosity(;NamedTuple{fieldnames(ODEErrorControlVerbosity)}(fill( - Verbosity.Info(), - length(fieldnames(ODEErrorControlVerbosity))))...) +# Fields - Verbosity.Warn() => ODEErrorControlVerbosity(;NamedTuple{fieldnames(ODEErrorControlVerbosity)}(fill( - Verbosity.Warn(), - length(fieldnames(ODEErrorControlVerbosity))))...) +## Error Control Group +- `dt_NaN`: Messages when time step becomes NaN +- `init_NaN`: Messages when initial conditions contain NaN +- `dense_output_saveat`: Messages about dense output with saveat - Verbosity.Error() => ODEErrorControlVerbosity(;NamedTuple{fieldnames(ODEErrorControlVerbosity)}(fill( - Verbosity.Error(), - length(fieldnames(ODEErrorControlVerbosity))))...) +## Performance Group +- `alg_switch`: Messages when algorithm switching occurs +- `mismatched_input_output_type`: Messages when input/output types don't match - Verbosity.Edge() => ODEErrorControlVerbosity() +## Numerical Group +- `rosenbrock_no_differential_states`: Messages when Rosenbrock has no differential states +- `shampine_dt`: Messages about Shampine time step selection +- `unlimited_dt`: Messages when time step is unlimited - _ => @error "$verbose is not a valid choice for verbosity." - end -end +## Solver Verbosity Groups +- `linear_verbosity`: Verbosity configuration for linear solvers +- `nonlinear_verbosity`: Verbosity configuration for nonlinear solvers -mutable struct ODEPerformanceVerbosity - alg_switch::Verbosity.Type - mismatched_input_output_type::Verbosity.Type +# Constructors - function ODEPerformanceVerbosity(;alg_switch = ode_defaults[:alg_switch], - mismatched_input_output_type = ode_defaults[:mismatched_input_output_type]) - new(alg_switch, mismatched_input_output_type) - end -end + ODEVerbosity(preset::AbstractVerbosityPreset) -function ODEPerformanceVerbosity(verbose::Verbosity.Type) - @match verbose begin - Verbosity.None() => ODEPerformanceVerbosity(; - NamedTuple{fieldnames(ODEPerformanceVerbosity)}(fill( - Verbosity.None(), - length(fieldnames(ODEPerformanceVerbosity))))...) +Create an `ODEVerbosity` using a preset configuration: +- `SciMLLogging.None()`: All messages disabled +- `SciMLLogging.Minimal()`: Only critical errors and fatal issues +- `SciMLLogging.Standard()`: Balanced verbosity (default) +- `SciMLLogging.Detailed()`: Comprehensive debugging information +- `SciMLLogging.All()`: Maximum verbosity - Verbosity.Info() => ODEPerformanceVerbosity(; - NamedTuple{fieldnames(ODEPerformanceVerbosity)}(fill( - Verbosity.Info(), - length(fieldnames(ODEPerformanceVerbosity))))...) + ODEVerbosity(; error_control=nothing, performance=nothing, numerical=nothing, linear_verbosity=nothing, nonlinear_verbosity=nothing, kwargs...) - Verbosity.Warn() => ODEPerformanceVerbosity(; - NamedTuple{fieldnames(ODEPerformanceVerbosity)}(fill( - Verbosity.Warn(), - length(fieldnames(ODEPerformanceVerbosity))))...) +Create an `ODEVerbosity` with group-level or individual field control. - Verbosity.Error() => ODEPerformanceVerbosity(; - NamedTuple{fieldnames(ODEPerformanceVerbosity)}(fill( - Verbosity.Error(), - length(fieldnames(ODEPerformanceVerbosity))))...) +# Examples - Verbosity.Default() => ODEPerformanceVerbosity() +```julia +# Use a preset +verbose = ODEVerbosity(SciMLLogging.Standard()) - _ => @error "Not a valid choice for verbosity." - end -end - -mutable struct ODENumericalVerbosity - rosenbrock_no_differential_states::Verbosity.Type - shampine_dt::Verbosity.Type - unlimited_dt::Verbosity.Type - function ODENumericalVerbosity(; - rosenbrock_no_differential_states = ode_defaults[:rosenbrock_no_differential_states], - shampine_dt = ode_defaults[:shampine_dt], - unlimited_dt = ode_defaults[:unlimited_dt]) - new(rosenbrock_no_differential_states, shampine_dt, unlimited_dt) - end -end - -function ODENumericalVerbosity(verbose::Verbosity.Type) - @match verbose begin - Verbosity.None() => ODENumericalVerbosity(; - NamedTuple{fieldnames(ODENumericalVerbosity)}(fill( - Verbosity.None(), - length(fieldnames(ODENumericalVerbosity))))...) +# Set entire groups +verbose = ODEVerbosity( + error_control = SciMLLogging.WarnLevel(), + numerical = SciMLLogging.InfoLevel() +) - Verbosity.Info() => OODENumericalVerbosity(; - NamedTuple{fieldnames(ODENumericalVerbosity)}(fill( - Verbosity.Info(), - length(fieldnames(ODENumericalVerbosity))))...) +# Set individual fields +verbose = ODEVerbosity( + dt_NaN = SciMLLogging.ErrorLevel(), + alg_switch = SciMLLogging.InfoLevel() +) - Verbosity.Warn() => ODENumericalVerbosity(; - NamedTuple{fieldnames(ODENumericalVerbosity)}(fill( - Verbosity.Warn(), - length(fieldnames(ODENumericalVerbosity))))...) +# Mix group and individual settings +verbose = ODEVerbosity( + numerical = SciMLLogging.InfoLevel(), # Set all numerical to InfoLevel + unlimited_dt = SciMLLogging.ErrorLevel() # Override specific field +) +``` +""" +@concrete struct ODEVerbosity <: AbstractVerbositySpecifier + # Solver verbosity + linear_verbosity + nonlinear_verbosity + # Error control + dt_NaN + init_NaN + dense_output_saveat + # Performance + alg_switch + mismatched_input_output_type + # Numerical + rosenbrock_no_differential_states + shampine_dt + unlimited_dt +end - Verbosity.Error() => ODENumericalVerbosity(; - NamedTuple{fieldnames(ODENumericalVerbosity)}(fill( - Verbosity.Error(), - length(fieldnames(ODENumericalVerbosity))))...) +function ODEVerbosity(; + error_control = nothing, performance = nothing, numerical = nothing, + linear_verbosity = nothing, nonlinear_verbosity = nothing, kwargs...) + # Validate group arguments + if error_control !== nothing && !(error_control isa AbstractMessageLevel) + throw(ArgumentError("error_control must be a SciMLLogging.AbstractMessageLevel, got $(typeof(error_control))")) + end + if performance !== nothing && !(performance isa AbstractMessageLevel) + throw(ArgumentError("performance must be a SciMLLogging.AbstractMessageLevel, got $(typeof(performance))")) + end + if numerical !== nothing && !(numerical isa AbstractMessageLevel) + throw(ArgumentError("numerical must be a SciMLLogging.AbstractMessageLevel, got $(typeof(numerical))")) + end - Verbosity.Default() => ODENumericalVerbosity() + # Validate individual kwargs + for (key, value) in kwargs + if !(key in error_control_options || key in performance_options || + key in numerical_options) + throw(ArgumentError("Unknown verbosity option: $key. Valid options are: $(tuple(error_control_options..., performance_options..., numerical_options...))")) + end + if !(value isa AbstractMessageLevel) + throw(ArgumentError("$key must be a SciMLLogging.AbstractMessageLevel, got $(typeof(value))")) + end + end - _ => @error "Not a valid choice for verbosity." + # Build arguments using NamedTuple for type stability + default_args = ( + linear_verbosity = linear_verbosity === nothing ? Standard() : linear_verbosity, + nonlinear_verbosity = nonlinear_verbosity === nothing ? Standard() : + nonlinear_verbosity, + dt_NaN = WarnLevel(), + init_NaN = WarnLevel(), + dense_output_saveat = WarnLevel(), + alg_switch = WarnLevel(), + mismatched_input_output_type = WarnLevel(), + rosenbrock_no_differential_states = WarnLevel(), + shampine_dt = WarnLevel(), + unlimited_dt = WarnLevel() + ) + + # Apply group-level settings + final_args = if error_control !== nothing || performance !== nothing || + numerical !== nothing + NamedTuple{keys(default_args)}( + _resolve_arg_value( + key, default_args[key], error_control, performance, numerical) + for key in keys(default_args) + ) + else + default_args end -end -struct ODEVerbosity{T} - linear_verbosity::Any - nonlinear_verbosity::Any + # Apply individual overrides + if !isempty(kwargs) + final_args = merge(final_args, NamedTuple(kwargs)) + end - error_control::ODEErrorControlVerbosity - performance::ODEPerformanceVerbosity - numerical::ODENumericalVerbosity + ODEVerbosity(values(final_args)...) end -function ODEVerbosity(verbose::Verbosity.Type) - @match verbose begin - Verbosity.Default() => ODEVerbosity{true}( - Verbosity.Default(), - Verbosity.Default(), - ODEErrorControlVerbosity(Verbosity.Default()), - ODEPerformanceVerbosity(Verbosity.Default()), - ODENumericalVerbosity(Verbosity.Default()) +# Constructor for verbosity presets following the hierarchical levels: +# None < Minimal < Standard < Detailed < All +# Each level includes all messages from levels below it plus additional ones +function ODEVerbosity(verbose::AbstractVerbosityPreset) + if verbose isa Minimal + # Minimal: Only fatal errors and critical warnings + ODEVerbosity( + linear_verbosity = Minimal(), + nonlinear_verbosity = Minimal(), + dt_NaN = ErrorLevel(), + init_NaN = ErrorLevel(), + dense_output_saveat = Silent(), + alg_switch = Silent(), + mismatched_input_output_type = Silent(), + rosenbrock_no_differential_states = ErrorLevel(), + shampine_dt = Silent(), + unlimited_dt = ErrorLevel() ) - - Verbosity.None() => ODEVerbosity{false}( - Verbosity.None(), - Verbosity.None(), - ODEErrorControlVerbosity(Verbosity.None()), - ODEPerformanceVerbosity(Verbosity.None()), - ODENumericalVerbosity(Verbosity.None()) + elseif verbose isa Standard + # Standard: Everything from Minimal + non-fatal warnings + ODEVerbosity() + elseif verbose isa Detailed + # Detailed: Everything from Standard + debugging/solver behavior + ODEVerbosity( + linear_verbosity = Detailed(), + nonlinear_verbosity = Detailed(), + dt_NaN = WarnLevel(), + init_NaN = WarnLevel(), + dense_output_saveat = InfoLevel(), + alg_switch = InfoLevel(), + mismatched_input_output_type = WarnLevel(), + rosenbrock_no_differential_states = WarnLevel(), + shampine_dt = InfoLevel(), + unlimited_dt = WarnLevel() ) - - Verbosity.All() => ODEVerbosity{true}( - Verbosity.Default(), - Verbosity.Default(), - ODEErrorControlVerbosity(Verbosity.Info()), - ODEPerformanceVerbosity(Verbosity.Info()), - ODENumericalVerbosity(Verbosity.Info()) + elseif verbose isa All + # All: Maximum verbosity - every possible logging message at InfoLevel + ODEVerbosity( + linear_verbosity = All(), + nonlinear_verbosity = All(), + dt_NaN = WarnLevel(), + init_NaN = WarnLevel(), + dense_output_saveat = InfoLevel(), + alg_switch = InfoLevel(), + mismatched_input_output_type = InfoLevel(), + rosenbrock_no_differential_states = WarnLevel(), + shampine_dt = InfoLevel(), + unlimited_dt = WarnLevel() ) - - _ => @error "Not a valid choice for verbosity." end end -function ODEVerbosity(; - error_control = Verbosity.Default(), performance = Verbosity.Default(), - numerical = Verbosity.Default(), linear_verbosity = Verbosity.Default(), - nonlinear_verbosity = Verbosity.Default(), kwargs...) - if error_control isa Verbosity.Type - error_control_verbosity = ODEErrorControlVerbosity(error_control) - else - error_control_verbosity = error_control - end +@inline function ODEVerbosity(verbose::None) + ODEVerbosity( + None(), + None(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent() + ) +end - if performance isa Verbosity.Type - performance_verbosity = ODEPerformanceVerbosity(performance) +# Helper function to resolve argument values based on group membership +@inline function _resolve_arg_value( + key::Symbol, default_val, error_control, performance, numerical) + if key === :linear_verbosity || key === :nonlinear_verbosity + return default_val + elseif key in error_control_options && error_control !== nothing + return error_control + elseif key in performance_options && performance !== nothing + return performance + elseif key in numerical_options && numerical !== nothing + return numerical else - performance_verbosity = performance + return default_val end +end - if numerical isa Verbosity.Type - numerical_verbosity = ODENumericalVerbosity(numerical) +function Base.getproperty(verbosity::ODEVerbosity, name::Symbol) + # Check if this is a group name + if name === :error_control + return group_options(verbosity, :error_control) + elseif name === :performance + return group_options(verbosity, :performance) + elseif name === :numerical + return group_options(verbosity, :numerical) else - numerical_verbosity = numerical + # Fall back to default field access + return getfield(verbosity, name) end - - if !isempty(kwargs) - for (key, value) in pairs(kwargs) - if hasfield(ODEErrorControlVerbosity, key) - setproperty!(error_control_verbosity, key, value) - elseif hasfield(ODEPerformanceVerbosity, key) - setproperty!(performance_verbosity, key, value) - elseif hasfield(ODENumericalVerbosity, key) - setproperty!(numerical_verbosity, key, value) - else - error("$key is not a recognized verbosity toggle.") - end - end - end - - ODEVerbosity{true}(linear_verbosity, nonlinear_verbosity, error_control_verbosity, - performance_verbosity, numerical_verbosity) -end \ No newline at end of file +end From 9d7ce883b8e3654d2ba90949ca3082e9db502635 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Mon, 20 Oct 2025 12:00:56 -0400 Subject: [PATCH 10/74] update macro usage --- lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl | 3 ++- lib/OrdinaryDiffEqCore/src/initdt.jl | 4 ++-- lib/OrdinaryDiffEqCore/src/integrators/controllers.jl | 2 +- lib/OrdinaryDiffEqCore/src/solve.jl | 6 +++--- lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl | 8 ++++---- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl index 643b301f88..c179d781f4 100644 --- a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl +++ b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl @@ -90,7 +90,8 @@ import Accessors: @reset # SciMLStructures symbols imported but not directly used in OrdinaryDiffEqCore # using SciMLStructures: canonicalize, Tunable, isscimlstructure -using SciMLVerbosity: Verbosity, @SciMLMessage, AbstractVerbositySpecifier +using SciMLLogging: @SciMLMessage, AbstractVerbositySpecifier, AbstractVerbosityPreset, + None, Minimal, Standard, Detailed, All, Silent, InfoLevel, WarnLevel, CustomLevel using SymbolicIndexingInterface: state_values, parameter_values diff --git a/lib/OrdinaryDiffEqCore/src/initdt.jl b/lib/OrdinaryDiffEqCore/src/initdt.jl index 1b52e598d5..615b806e3d 100644 --- a/lib/OrdinaryDiffEqCore/src/initdt.jl +++ b/lib/OrdinaryDiffEqCore/src/initdt.jl @@ -129,7 +129,7 @@ # https://discourse.julialang.org/t/incorporating-forcing-functions-in-the-ode-model/70133/26 if isnan(d₁) @SciMLMessage("First function call produced NaNs. Exiting. Double check that none of the initial conditions, parameters, or timespan values are NaN.", - integrator.opts.verbose, :init_NaN, :error_control) + integrator.opts.verbose, :init_NaN) return tdir * dtmin end @@ -250,7 +250,7 @@ end if any(x -> any(isnan, x), f₀) @SciMLMessage("First function call produced NaNs. Exiting. Double check that none of the initial conditions, parameters, or timespan values are NaN.", - integrator.opts.verbose, :init_NaN, :error_control) + integrator.opts.verbose, :init_NaN) end inferredtype = Base.promote_op(/, typeof(u0), typeof(oneunit(t))) diff --git a/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl b/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl index b65bf7af68..1348fc2bdd 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl @@ -298,7 +298,7 @@ end dt_factor = err1^(beta1 / k) * err2^(beta2 / k) * err3^(beta3 / k) if isnan(dt_factor) @SciMLMessage("unlimited dt_factor", - integrator.opts.verbose, :unlimited_dt, :numerical) + integrator.opts.verbose, :unlimited_dt) #@warn "unlimited dt_factor" dt_factor err1 err2 err3 beta1 beta2 beta3 k end dt_factor = controller.limiter(dt_factor) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index a5cc7fb979..39ae1d8c03 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -114,7 +114,7 @@ function SciMLBase.__init( # technically this should also warn for zero operators but those are hard to check for if (dense || !isempty(saveat)) @SciMLMessage("Rosenbrock methods on equations without differential states do not bound the error on interpolations.", - verbose, :rosenbrock_no_differential_states, :numerical) + verbose, :rosenbrock_no_differential_states) end end @@ -126,7 +126,7 @@ function SciMLBase.__init( if !isempty(saveat) && dense @SciMLMessage("Dense output is incompatible with saveat. Please use the SavingCallback from the Callback Library to mix the two behaviors.", - verbose, :dense_output_saveat, :error_control) + verbose, :dense_output_saveat) end progress && @logmsg(LogLevel(-1), progress_name, _id=progress_id, progress=0) @@ -654,7 +654,7 @@ function handle_dt!(integrator) end if isnan(integrator.dt) @SciMLMessage("Automatic dt set the starting dt as NaN, causing instability. Exiting.", - integrator.opts.verbose, :dt_NaN, :numerical) + integrator.opts.verbose, :dt_NaN) end elseif integrator.opts.adaptive && integrator.dt > zero(integrator.dt) && integrator.tdir < 0 diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl index 576e8a7374..d5ddaee278 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl @@ -163,7 +163,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD if failed @SciMLMessage("ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", - integrator.opts.verbose, :shampine_dt, :numerical) + integrator.opts.verbose, :shampine_dt) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) end @@ -243,7 +243,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD if failed @SciMLMessage("ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", - integrator.opts.verbose, :shampine_dt, :numerical) + integrator.opts.verbose, :shampine_dt) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) end @@ -321,7 +321,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA end if nlsol.retcode != ReturnCode.Success @SciMLMessage("ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", - integrator.opts.verbose, :shampine_dt, :numerical) + integrator.opts.verbose, :shampine_dt) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) end @@ -370,7 +370,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA end if nlsol.retcode != ReturnCode.Success @SciMLMessage("ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", - integrator.opts.verbose, :shampine_dt, :numerical) + integrator.opts.verbose, :shampine_dt) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) end From 487c81926e2e41b9c88755300453e5c0b18195b1 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Tue, 21 Oct 2025 10:16:07 -0400 Subject: [PATCH 11/74] rearrange --- lib/OrdinaryDiffEqCore/src/solve.jl | 4 +- lib/OrdinaryDiffEqCore/src/verbosity.jl | 72 ++++++++++++------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 39ae1d8c03..897a65dbed 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -100,9 +100,9 @@ function SciMLBase.__init( if verbose verbose = ODEVerbosity() else - verbose = ODEVerbosity(Verbosity.None()) + verbose = ODEVerbosity(SciMLLogging.None()) end - elseif verbose isa Verbosity.Type + elseif verbose isa SciMLLogging.AbstractVerbosityPreset verbose = ODEVerbosity(verbose) end diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index b7388e91b5..05f53df528 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -1,36 +1,3 @@ -# Group classifications -const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat) -const performance_options = (:alg_switch, :mismatched_input_output_type) -const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt) - -function option_group(option::Symbol) - if option in error_control_options - return :error_control - elseif option in performance_options - return :performance - elseif option in numerical_options - return :numerical - else - error("Unknown verbosity option: $option") - end -end - -# Get all options in a group -function group_options(verbosity::ODEVerbosity, group::Symbol) - if group === :error_control - return NamedTuple{error_control_options}(getproperty(verbosity, opt) - for opt in error_control_options) - elseif group === :performance - return NamedTuple{performance_options}(getproperty(verbosity, opt) - for opt in performance_options) - elseif group === :numerical - return NamedTuple{numerical_options}(getproperty(verbosity, opt) - for opt in numerical_options) - else - error("Unknown group: $group") - end -end - """ ODEVerbosity <: AbstractVerbositySpecifier @@ -114,6 +81,40 @@ verbose = ODEVerbosity( unlimited_dt end +# Group classifications +const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat) +const performance_options = (:alg_switch, :mismatched_input_output_type) +const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt) + +function option_group(option::Symbol) + if option in error_control_options + return :error_control + elseif option in performance_options + return :performance + elseif option in numerical_options + return :numerical + else + error("Unknown verbosity option: $option") + end +end + +# Get all options in a group +function group_options(verbosity::ODEVerbosity, group::Symbol) + if group === :error_control + return NamedTuple{error_control_options}(getproperty(verbosity, opt) + for opt in error_control_options) + elseif group === :performance + return NamedTuple{performance_options}(getproperty(verbosity, opt) + for opt in performance_options) + elseif group === :numerical + return NamedTuple{numerical_options}(getproperty(verbosity, opt) + for opt in numerical_options) + else + error("Unknown group: $group") + end +end + + function ODEVerbosity(; error_control = nothing, performance = nothing, numerical = nothing, linear_verbosity = nothing, nonlinear_verbosity = nothing, kwargs...) @@ -141,9 +142,8 @@ function ODEVerbosity(; # Build arguments using NamedTuple for type stability default_args = ( - linear_verbosity = linear_verbosity === nothing ? Standard() : linear_verbosity, - nonlinear_verbosity = nonlinear_verbosity === nothing ? Standard() : - nonlinear_verbosity, + linear_verbosity = linear_verbosity === nothing ? Minimal() : linear_verbosity, + nonlinear_verbosity = nonlinear_verbosity === nothing ? Minimal() : nonlinear_verbosity, dt_NaN = WarnLevel(), init_NaN = WarnLevel(), dense_output_saveat = WarnLevel(), From 718ad710786cad943cdea3c01c35d19eeba9e7de Mon Sep 17 00:00:00 2001 From: jClugstor Date: Tue, 21 Oct 2025 16:30:45 -0400 Subject: [PATCH 12/74] add verbosity tests --- test/interface/verbosity.jl | 261 +++++++++++++++++++++++++++++++++++- 1 file changed, 256 insertions(+), 5 deletions(-) diff --git a/test/interface/verbosity.jl b/test/interface/verbosity.jl index 0e1d88779e..8c3ae0a815 100644 --- a/test/interface/verbosity.jl +++ b/test/interface/verbosity.jl @@ -1,9 +1,260 @@ +using OrdinaryDiffEqCore +using OrdinaryDiffEqCore: ODEVerbosity, option_group, group_options using ODEProblemLibrary: prob_ode_vanderpol_stiff -using OrdinaryDiffEq, SciMLBase -import SciMLBase: Verbosity, ODEPerformanceVerbosity, ODEVerbosity +using SciMLLogging +using Test +@testset "ODEVerbosity Tests" begin + @testset "Default constructor" begin + v1 = ODEVerbosity() + @test v1 isa ODEVerbosity + @test v1.dt_NaN isa SciMLLogging.WarnLevel + @test v1.init_NaN isa SciMLLogging.WarnLevel + @test v1.dense_output_saveat isa SciMLLogging.WarnLevel + @test v1.alg_switch isa SciMLLogging.WarnLevel + @test v1.mismatched_input_output_type isa SciMLLogging.WarnLevel + @test v1.rosenbrock_no_differential_states isa SciMLLogging.WarnLevel + @test v1.shampine_dt isa SciMLLogging.WarnLevel + @test v1.unlimited_dt isa SciMLLogging.WarnLevel + @test v1.linear_verbosity isa SciMLLogging.AbstractVerbosityPreset + @test v1.nonlinear_verbosity isa SciMLLogging.AbstractVerbosityPreset + end + + @testset "ODEVerbosity preset constructors" begin + v_none = ODEVerbosity(SciMLLogging.None()) + v_all = ODEVerbosity(SciMLLogging.All()) + v_minimal = ODEVerbosity(SciMLLogging.Minimal()) + v_standard = ODEVerbosity(SciMLLogging.Standard()) + v_detailed = ODEVerbosity(SciMLLogging.Detailed()) + + @test v_none.dt_NaN isa SciMLLogging.Silent + @test v_none.init_NaN isa SciMLLogging.Silent + @test v_none.alg_switch isa SciMLLogging.Silent + @test v_none.rosenbrock_no_differential_states isa SciMLLogging.Silent + + @test v_minimal.dt_NaN isa SciMLLogging.ErrorLevel + @test v_minimal.init_NaN isa SciMLLogging.ErrorLevel + @test v_minimal.alg_switch isa SciMLLogging.Silent + @test v_minimal.dense_output_saveat isa SciMLLogging.Silent + + @test v_standard.dt_NaN isa SciMLLogging.WarnLevel + @test v_standard.init_NaN isa SciMLLogging.WarnLevel + @test v_standard.alg_switch isa SciMLLogging.WarnLevel + + @test v_detailed.alg_switch isa SciMLLogging.InfoLevel + @test v_detailed.dense_output_saveat isa SciMLLogging.InfoLevel + @test v_detailed.shampine_dt isa SciMLLogging.InfoLevel + + @test v_all.alg_switch isa SciMLLogging.InfoLevel + @test v_all.shampine_dt isa SciMLLogging.InfoLevel + @test v_all.dense_output_saveat isa SciMLLogging.InfoLevel + end + + @testset "Group-level keyword constructors" begin + v_error = ODEVerbosity(error_control = ErrorLevel()) + @test v_error.dt_NaN isa SciMLLogging.ErrorLevel + @test v_error.init_NaN isa SciMLLogging.ErrorLevel + @test v_error.dense_output_saveat isa SciMLLogging.ErrorLevel + + v_numerical = ODEVerbosity(numerical = Silent()) + @test v_numerical.rosenbrock_no_differential_states isa SciMLLogging.Silent + @test v_numerical.shampine_dt isa SciMLLogging.Silent + @test v_numerical.unlimited_dt isa SciMLLogging.Silent + + v_performance = ODEVerbosity(performance = InfoLevel()) + @test v_performance.alg_switch isa SciMLLogging.InfoLevel + @test v_performance.mismatched_input_output_type isa SciMLLogging.InfoLevel + end + + @testset "Mixed group and individual settings" begin + v_mixed = ODEVerbosity( + numerical = Silent(), + shampine_dt = WarnLevel(), + performance = InfoLevel() + ) + # Individual override should take precedence + @test v_mixed.shampine_dt isa SciMLLogging.WarnLevel + # Other numerical options should use group setting + @test v_mixed.rosenbrock_no_differential_states isa SciMLLogging.Silent + @test v_mixed.unlimited_dt isa SciMLLogging.Silent + # Performance group setting should apply + @test v_mixed.alg_switch isa SciMLLogging.InfoLevel + @test v_mixed.mismatched_input_output_type isa SciMLLogging.InfoLevel + end + + @testset "Individual keyword arguments" begin + v_individual = ODEVerbosity( + dt_NaN = ErrorLevel(), + alg_switch = InfoLevel(), + shampine_dt = Silent() + ) + @test v_individual.dt_NaN isa SciMLLogging.ErrorLevel + @test v_individual.alg_switch isa SciMLLogging.InfoLevel + @test v_individual.shampine_dt isa SciMLLogging.Silent + # Unspecified options should use defaults + @test v_individual.init_NaN isa SciMLLogging.WarnLevel + @test v_individual.unlimited_dt isa SciMLLogging.WarnLevel + end + + @testset "Linear and nonlinear verbosity passthrough" begin + v_with_solvers = ODEVerbosity( + linear_verbosity = SciMLLogging.Detailed(), + nonlinear_verbosity = SciMLLogging.Minimal() + ) + @test v_with_solvers.linear_verbosity isa SciMLLogging.Detailed + @test v_with_solvers.nonlinear_verbosity isa SciMLLogging.Minimal + + v_with_solvers2 = ODEVerbosity( + linear_verbosity = SciMLLogging.None(), + nonlinear_verbosity = SciMLLogging.All() + ) + @test v_with_solvers2.linear_verbosity isa SciMLLogging.None + @test v_with_solvers2.nonlinear_verbosity isa SciMLLogging.All + end + + @testset "Group classification functions" begin + @test option_group(:dt_NaN) == :error_control + @test option_group(:init_NaN) == :error_control + @test option_group(:dense_output_saveat) == :error_control + @test option_group(:alg_switch) == :performance + @test option_group(:mismatched_input_output_type) == :performance + @test option_group(:rosenbrock_no_differential_states) == :numerical + @test option_group(:shampine_dt) == :numerical + @test option_group(:unlimited_dt) == :numerical + + # Test error for unknown option + @test_throws ErrorException option_group(:unknown_option) + end + + @testset "Group options function" begin + v = ODEVerbosity(numerical = WarnLevel()) + numerical_opts = group_options(v, :numerical) + @test numerical_opts isa NamedTuple + @test :rosenbrock_no_differential_states in keys(numerical_opts) + @test :shampine_dt in keys(numerical_opts) + @test :unlimited_dt in keys(numerical_opts) + @test numerical_opts.rosenbrock_no_differential_states isa SciMLLogging.WarnLevel + @test numerical_opts.shampine_dt isa SciMLLogging.WarnLevel + @test numerical_opts.unlimited_dt isa SciMLLogging.WarnLevel + + error_opts = group_options(v, :error_control) + @test :dt_NaN in keys(error_opts) + @test :init_NaN in keys(error_opts) + @test :dense_output_saveat in keys(error_opts) + + performance_opts = group_options(v, :performance) + @test :alg_switch in keys(performance_opts) + @test :mismatched_input_output_type in keys(performance_opts) + + # Test error for unknown group + @test_throws ErrorException group_options(v, :unknown_group) + end + + @testset "Group getproperty access" begin + v = ODEVerbosity() + + # Test getting groups returns NamedTuples + error_group = v.error_control + performance_group = v.performance + numerical_group = v.numerical + + @test error_group isa NamedTuple + @test performance_group isa NamedTuple + @test numerical_group isa NamedTuple + + # Test correct keys are present + @test :dt_NaN in keys(error_group) + @test :init_NaN in keys(error_group) + @test :dense_output_saveat in keys(error_group) + + @test :alg_switch in keys(performance_group) + @test :mismatched_input_output_type in keys(performance_group) + + @test :rosenbrock_no_differential_states in keys(numerical_group) + @test :shampine_dt in keys(numerical_group) + @test :unlimited_dt in keys(numerical_group) + + # Test values are AbstractMessageLevel types + @test error_group.dt_NaN isa SciMLLogging.AbstractMessageLevel + @test performance_group.alg_switch isa SciMLLogging.AbstractMessageLevel + @test numerical_group.shampine_dt isa SciMLLogging.AbstractMessageLevel + + # Individual field access should still work + @test v.dt_NaN isa SciMLLogging.WarnLevel + @test v.alg_switch isa SciMLLogging.WarnLevel + @test v.shampine_dt isa SciMLLogging.WarnLevel + end + + @testset "Argument validation" begin + # Test invalid error_control type + @test_throws ArgumentError ODEVerbosity(error_control = "invalid") + @test_throws ArgumentError ODEVerbosity(performance = 123) + @test_throws ArgumentError ODEVerbosity(numerical = :symbol) + + # Test unknown keyword argument + @test_throws ArgumentError ODEVerbosity(unknown_field = WarnLevel()) + + # Test invalid value for individual field + @test_throws ArgumentError ODEVerbosity(dt_NaN = "not_a_level") + end + + @testset "All error control fields" begin + v = ODEVerbosity(error_control = InfoLevel()) + @test v.dt_NaN isa SciMLLogging.InfoLevel + @test v.init_NaN isa SciMLLogging.InfoLevel + @test v.dense_output_saveat isa SciMLLogging.InfoLevel + end + + @testset "All performance fields" begin + v = ODEVerbosity(performance = ErrorLevel()) + @test v.alg_switch isa SciMLLogging.ErrorLevel + @test v.mismatched_input_output_type isa SciMLLogging.ErrorLevel + end + + @testset "All numerical fields" begin + v = ODEVerbosity(numerical = InfoLevel()) + @test v.rosenbrock_no_differential_states isa SciMLLogging.InfoLevel + @test v.shampine_dt isa SciMLLogging.InfoLevel + @test v.unlimited_dt isa SciMLLogging.InfoLevel + end + + @testset "Multiple group settings" begin + v = ODEVerbosity( + error_control = ErrorLevel(), + performance = InfoLevel(), + numerical = Silent() + ) + @test v.dt_NaN isa SciMLLogging.ErrorLevel + @test v.alg_switch isa SciMLLogging.InfoLevel + @test v.shampine_dt isa SciMLLogging.Silent + end + + @testset "Complex mixed settings" begin + v = ODEVerbosity( + error_control = WarnLevel(), + performance = InfoLevel(), + numerical = Silent(), + linear_verbosity = SciMLLogging.Detailed(), + nonlinear_verbosity = SciMLLogging.Minimal(), + dt_NaN = ErrorLevel(), # Override specific error_control field + shampine_dt = WarnLevel() # Override specific numerical field + ) + # Check overrides took precedence + @test v.dt_NaN isa SciMLLogging.ErrorLevel + @test v.shampine_dt isa SciMLLogging.WarnLevel + # Check other fields follow group settings + @test v.init_NaN isa SciMLLogging.WarnLevel + @test v.alg_switch isa SciMLLogging.InfoLevel + @test v.unlimited_dt isa SciMLLogging.Silent + # Check solver verbosity + @test v.linear_verbosity isa SciMLLogging.Detailed + @test v.nonlinear_verbosity isa SciMLLogging.Minimal + end + + @testset "Stiff Switching Message" begin + verb = ODEVerbosity(performance = ODEPerformanceVerbosity(alg_switch = Verbosity.Info())) + solve(prob_ode_vanderpol_stiff, AutoTsit5(Rodas5()), verbose = verb) + end +end -# Stiff Switching -verb = ODEVerbosity(performance = ODEPerformanceVerbosity(alg_switch = Verbosity.Info())) -solve(prob_ode_vanderpol_stiff, AutoTsit5(Rodas5()), verbose = verb) \ No newline at end of file From f5f84fa59f13d984c0518490b3b844c23bf06df8 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 22 Oct 2025 10:50:13 -0400 Subject: [PATCH 13/74] imports and fixes for verbosity --- lib/OrdinaryDiffEqCore/Project.toml | 4 ++++ lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl | 4 +++- lib/OrdinaryDiffEqCore/src/integrators/type.jl | 2 +- lib/OrdinaryDiffEqCore/src/solve.jl | 4 ++-- .../src/OrdinaryDiffEqDifferentiation.jl | 2 +- lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl | 8 ++++---- .../src/OrdinaryDiffEqLowOrderRK.jl | 3 +-- lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl | 2 +- 8 files changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/Project.toml b/lib/OrdinaryDiffEqCore/Project.toml index 4cf4f09a5e..b88d7339ab 100644 --- a/lib/OrdinaryDiffEqCore/Project.toml +++ b/lib/OrdinaryDiffEqCore/Project.toml @@ -7,6 +7,7 @@ version = "1.36.0" SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" Reexport = "189a3867-3050-52da-a836-e630ba90ab69" Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471" StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" FunctionWrappersWrappers = "77dc65aa-8811-40c2-897b-53d922fa7daf" FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" @@ -25,6 +26,7 @@ Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" Preferences = "21216c6a-2e73-6563-6e65-726566657250" +SciMLLogging = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1" SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" @@ -50,6 +52,7 @@ SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" SafeTestsets = "0.1.0" SciMLOperators = "1.4" Accessors = "0.1.36" +ConcreteStructs = "0.2" StaticArraysCore = "1.4.3" SciMLStructures = "1.7" FunctionWrappersWrappers = "0.1" @@ -67,6 +70,7 @@ LinearAlgebra = "1.10" TruncatedStacktraces = "1.4" SimpleUnPack = "1.1" SciMLBase = "2.115" +SciMLLogging = "1.3.1" FastClosures = "0.3" DataStructures = "0.18.22, 0.19" Static = "1.2" diff --git a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl index c179d781f4..31a5418147 100644 --- a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl +++ b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl @@ -90,11 +90,13 @@ import Accessors: @reset # SciMLStructures symbols imported but not directly used in OrdinaryDiffEqCore # using SciMLStructures: canonicalize, Tunable, isscimlstructure -using SciMLLogging: @SciMLMessage, AbstractVerbositySpecifier, AbstractVerbosityPreset, +using SciMLLogging: SciMLLogging, @SciMLMessage, AbstractVerbositySpecifier, AbstractVerbosityPreset, None, Minimal, Standard, Detailed, All, Silent, InfoLevel, WarnLevel, CustomLevel using SymbolicIndexingInterface: state_values, parameter_values +using ConcreteStructs: @concrete + const CompiledFloats = Union{Float32, Float64} import Preferences diff --git a/lib/OrdinaryDiffEqCore/src/integrators/type.jl b/lib/OrdinaryDiffEqCore/src/integrators/type.jl index 7dc9e1a9c6..1c94d2464d 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/type.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/type.jl @@ -42,7 +42,7 @@ mutable struct DEOptions{absType, relType, QT, tType, Controller, F1, F2, F3, F4 callback::F4 isoutofdomain::F5 unstable_check::F7 - verbose::Bool + verbose::ODEVerbosity calck::Bool force_dtmin::Bool advance_to_tstop::Bool diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 897a65dbed..de112f5dee 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -100,9 +100,9 @@ function SciMLBase.__init( if verbose verbose = ODEVerbosity() else - verbose = ODEVerbosity(SciMLLogging.None()) + verbose = ODEVerbosity(None()) end - elseif verbose isa SciMLLogging.AbstractVerbosityPreset + elseif verbose isa AbstractVerbosityPreset verbose = ODEVerbosity(verbose) end diff --git a/lib/OrdinaryDiffEqDifferentiation/src/OrdinaryDiffEqDifferentiation.jl b/lib/OrdinaryDiffEqDifferentiation/src/OrdinaryDiffEqDifferentiation.jl index febdeeb76c..607e7ad268 100644 --- a/lib/OrdinaryDiffEqDifferentiation/src/OrdinaryDiffEqDifferentiation.jl +++ b/lib/OrdinaryDiffEqDifferentiation/src/OrdinaryDiffEqDifferentiation.jl @@ -6,7 +6,7 @@ import ADTypes: AutoFiniteDiff, AutoForwardDiff, AbstractADType, AutoSparse import ForwardDiff, FiniteDiff import ForwardDiff.Dual import LinearSolve -import LinearSolve: OperatorAssumptions +import LinearSolve: OperatorAssumptions, LinearVerbosity import FunctionWrappersWrappers import DiffEqBase diff --git a/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl b/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl index 553e128857..86a3671174 100644 --- a/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl +++ b/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl @@ -866,10 +866,10 @@ build_uf(alg, nf, t, p, ::Val{false}) = UDerivativeWrapper(nf, t, p) function LinearSolve.init_cacheval( alg::LinearSolve.DefaultLinearSolver, A::WOperator, b, u, Pl, Pr, - maxiters::Int, abstol, reltol, verbose::Bool, + maxiters::Int, abstol, reltol, verbose::LinearVerbosity, assumptions::OperatorAssumptions) LinearSolve.init_cacheval(alg, A.J, b, u, Pl, Pr, - maxiters::Int, abstol, reltol, verbose::Bool, + maxiters::Int, abstol, reltol, verbose::LinearVerbosity, assumptions::OperatorAssumptions) end @@ -897,10 +897,10 @@ for alg in [LinearSolve.AppleAccelerateLUFactorization, LinearSolve.SparspakFactorization, LinearSolve.UMFPACKFactorization] @eval function LinearSolve.init_cacheval(alg::$alg, A::WOperator, b, u, Pl, Pr, - maxiters::Int, abstol, reltol, verbose::Bool, + maxiters::Int, abstol, reltol, verbose::LinearVerbosity, assumptions::OperatorAssumptions) LinearSolve.init_cacheval(alg, A.J, b, u, Pl, Pr, - maxiters::Int, abstol, reltol, verbose::Bool, + maxiters::Int, abstol, reltol, verbose::LinearVerbosity, assumptions::OperatorAssumptions) end end diff --git a/lib/OrdinaryDiffEqLowOrderRK/src/OrdinaryDiffEqLowOrderRK.jl b/lib/OrdinaryDiffEqLowOrderRK/src/OrdinaryDiffEqLowOrderRK.jl index 4a702003ed..e826a9e10d 100644 --- a/lib/OrdinaryDiffEqLowOrderRK/src/OrdinaryDiffEqLowOrderRK.jl +++ b/lib/OrdinaryDiffEqLowOrderRK/src/OrdinaryDiffEqLowOrderRK.jl @@ -16,8 +16,7 @@ import OrdinaryDiffEqCore: alg_order, isfsal, beta2_default, beta1_default, @cache, CompiledFloats, alg_cache, CompositeAlgorithm, AutoAlgSwitch, _ode_interpolant, _ode_interpolant!, full_cache, accept_step_controller, DerivativeOrderNotPossibleError, - du_cache, u_cache, get_fsalfirstlast, copyat_or_push! - du_cache, u_cache, get_fsalfirstlast, @SciMLMessage + du_cache, u_cache, get_fsalfirstlast, copyat_or_push!, @SciMLMessage using SciMLBase import MuladdMacro: @muladd import FastBroadcast: @.. diff --git a/lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl b/lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl index e15c1813a5..0cb4dfff5e 100644 --- a/lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl +++ b/lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl @@ -7,7 +7,7 @@ import OrdinaryDiffEqCore: alg_order, alg_stability_size, explicit_rk_docstring, constvalue, @unpack, perform_step!, calculate_residuals, @cache, calculate_residuals!, _ode_interpolant, _ode_interpolant!, CompiledFloats, @OnDemandTableauExtract, initialize!, - perform_step!, @SciMLMessage + perform_step!, @SciMLMessage, CompositeAlgorithm, _ode_addsteps!, copyat_or_push!, AutoAlgSwitch, get_fsalfirstlast, full_cache, DerivativeOrderNotPossibleError From 233ea3757f05570c0dfa1a29fd30c23f8d43ed06 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 22 Oct 2025 11:32:50 -0400 Subject: [PATCH 14/74] set linear verbosity to Minimal --- .../src/OrdinaryDiffEqExtrapolation.jl | 2 +- .../src/extrapolation_caches.jl | 16 +++++++------- .../src/OrdinaryDiffEqFIRK.jl | 2 +- lib/OrdinaryDiffEqFIRK/src/firk_caches.jl | 16 +++++++------- .../src/OrdinaryDiffEqNonlinearSolve.jl | 2 +- lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl | 3 ++- .../src/OrdinaryDiffEqRosenbrock.jl | 2 +- .../src/generic_rosenbrock.jl | 3 ++- .../src/rosenbrock_caches.jl | 21 ++++++++++++------- 9 files changed, 38 insertions(+), 29 deletions(-) diff --git a/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl b/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl index 5fe13de84c..1affe2d063 100644 --- a/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl +++ b/lib/OrdinaryDiffEqExtrapolation/src/OrdinaryDiffEqExtrapolation.jl @@ -18,7 +18,7 @@ import OrdinaryDiffEqCore: alg_order, alg_maximum_order, get_current_adaptive_or _digest_beta1_beta2, timedepentdtmin, _unwrap_val, _reshape, _vec, get_fsalfirstlast, generic_solver_docstring, differentiation_rk_docstring, _bool_to_ADType, - _process_AD_choice, LinearAliasSpecifier, @SciMLMessage + _process_AD_choice, LinearAliasSpecifier, @SciMLMessage, Minimal using FastBroadcast, Polyester, MuladdMacro, RecursiveArrayTools, LinearSolve import OrdinaryDiffEqCore import FastPower diff --git a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl index 418ef01b5a..b557a55879 100644 --- a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl +++ b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl @@ -271,7 +271,7 @@ function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) linsolve1 = init( - linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -280,7 +280,7 @@ function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, for i in 2:get_thread_count(alg) linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) linsolve[i] = init(linprob, alg.linsolve, - alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end @@ -1160,7 +1160,7 @@ function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) linsolve1 = init( - linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -1169,7 +1169,7 @@ function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, for i in 2:get_thread_count(alg) linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) linsolve[i] = init(linprob, alg.linsolve, - alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end @@ -1490,7 +1490,7 @@ function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) linsolve1 = init( - linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -1499,7 +1499,7 @@ function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, for i in 2:get_thread_count(alg) linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) linsolve[i] = init(linprob, alg.linsolve, - alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end @@ -1688,7 +1688,7 @@ function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) linsolve1 = init( - linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -1697,7 +1697,7 @@ function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype for i in 2:get_thread_count(alg) linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) linsolve[i] = init(linprob, alg.linsolve, - alias = LinearAliasSpecifier(alias_A = true, alias_b = true)) + alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end diff --git a/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl b/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl index c8bb77ecff..b6e2ae1e9e 100644 --- a/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl +++ b/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl @@ -18,7 +18,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, fac_default_gamma, get_current_adaptive_order, get_fsalfirstlast, isfirk, generic_solver_docstring, _bool_to_ADType, - _process_AD_choice, LinearAliasSpecifier, @SciMLMessage + _process_AD_choice, LinearAliasSpecifier, @SciMLMessage, Minimal using MuladdMacro, DiffEqBase, RecursiveArrayTools, Polyester isfirk, generic_solver_docstring using SciMLOperators: AbstractSciMLOperator diff --git a/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl b/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl index 6f99a62cf3..4d0160328b 100644 --- a/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl +++ b/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl @@ -105,7 +105,7 @@ function alg_cache(alg::RadauIIA3, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W1, _vec(cubuff); u0 = _vec(dw12)) linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -245,13 +245,13 @@ function alg_cache(alg::RadauIIA5, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W1, _vec(ubuff); u0 = _vec(dw1)) linsolve1 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) linprob = LinearProblem(W2, _vec(cubuff); u0 = _vec(dw23)) linsolve2 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -437,19 +437,19 @@ function alg_cache(alg::RadauIIA9, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W1, _vec(ubuff); u0 = _vec(dw1)) linsolve1 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) linprob = LinearProblem(W2, _vec(cubuff1); u0 = _vec(dw23)) linsolve2 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) linprob = LinearProblem(W3, _vec(cubuff2); u0 = _vec(dw45)) linsolve3 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -644,12 +644,12 @@ function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits} linprob = LinearProblem(W1, _vec(ubuff); u0 = _vec(dw1)) linsolve1 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) linsolve2 = [init(LinearProblem(W2[i], _vec(cubuff[i]); u0 = _vec(dw2[i])), alg.linsolve, alias = LinearAliasSpecifier( alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) for i in 1:((max_stages - 1) ÷ 2)] rtol = reltol isa Number ? reltol : zero(reltol) diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl index e9713d3da0..ea9b98d586 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl @@ -50,7 +50,7 @@ using OrdinaryDiffEqCore: resize_nlsolver!, _initialize_dae!, import OrdinaryDiffEqCore: _initialize_dae!, isnewton, get_W, isfirstcall, isfirststage, isJcurrent, get_new_W_γdt_cutoff, resize_nlsolver!, apply_step!, - postamble!, @SciMLMessage + postamble!, @SciMLMessage, Minimal import OrdinaryDiffEqDifferentiation: update_W!, is_always_new, build_uf, build_J_W, WOperator, StaticWOperator, wrapprecs, diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl index 49a0db411d..099f7dfb6b 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl @@ -219,7 +219,8 @@ function build_nlsolver( linsolve = init(linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = Minimal()) tType = typeof(t) invγdt = inv(oneunit(t) * one(uTolType)) diff --git a/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl b/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl index f90d1c0fc1..1f3943e628 100644 --- a/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl +++ b/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl @@ -13,7 +13,7 @@ import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, isWmethod, isfsal, _un calculate_residuals, has_stiff_interpolation, ODEIntegrator, resize_non_user_cache!, _ode_addsteps!, full_cache, DerivativeOrderNotPossibleError, _bool_to_ADType, - _process_AD_choice, LinearAliasSpecifier, @SciMLMessage, copyat_or_push! + _process_AD_choice, LinearAliasSpecifier, @SciMLMessage, Minimal, copyat_or_push! using MuladdMacro, FastBroadcast, RecursiveArrayTools import MacroTools: namify using MacroTools: @capture diff --git a/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl b/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl index ce714f99c6..702889c49b 100644 --- a/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl +++ b/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl @@ -254,7 +254,8 @@ function gen_algcache(cacheexpr::Expr,constcachename::Symbol,algname::Symbol,tab linprob = LinearProblem(W,_vec(linsolve_tmp); u0=_vec(tmp)) linsolve = init(linprob,alg.linsolve,alias = LinearAliasSpecifier(alias_A=true,alias_b=true), Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), - Pr = Diagonal(_vec(weight))) + Pr = Diagonal(_vec(weight)), + verbose = Minimal()) $cachename($(valsyms...)) end end diff --git a/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl b/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl index 1764a14430..b9d3606df5 100644 --- a/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl +++ b/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl @@ -164,7 +164,8 @@ function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits}, linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = Minimal()) algebraic_vars = f.mass_matrix === I ? nothing : @@ -215,7 +216,8 @@ function alg_cache(alg::Rosenbrock32, u, rate_prototype, ::Type{uEltypeNoUnits}, linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = Minimal()) algebraic_vars = f.mass_matrix === I ? nothing : [all(iszero, x) for x in eachcol(f.mass_matrix)] @@ -367,7 +369,8 @@ function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits}, linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = Minimal()) Rosenbrock33Cache(u, uprev, du, du1, du2, k1, k2, k3, k4, fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, @@ -458,7 +461,8 @@ function alg_cache(alg::Rodas3, u, rate_prototype, ::Type{uEltypeNoUnits}, linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = Minimal()) Rosenbrock34Cache(u, uprev, du, du1, du2, k1, k2, k3, k4, fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, @@ -656,7 +660,8 @@ function alg_cache(alg::Rodas23W, u, rate_prototype, ::Type{uEltypeNoUnits}, linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = Minimal()) Rodas23WCache(u, uprev, dense1, dense2, dense3, du, du1, du2, k1, k2, k3, k4, k5, fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, linsolve_tmp, @@ -705,7 +710,8 @@ function alg_cache(alg::Rodas3P, u, rate_prototype, ::Type{uEltypeNoUnits}, linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, - assumptions = LinearSolve.OperatorAssumptions(true)) + assumptions = LinearSolve.OperatorAssumptions(true), + verbose = Minimal()) Rodas3PCache(u, uprev, dense1, dense2, dense3, du, du1, du2, k1, k2, k3, k4, k5, fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, linsolve_tmp, @@ -820,7 +826,8 @@ function alg_cache( linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A=true, alias_b=true), Pl=Pl, Pr=Pr, - assumptions=LinearSolve.OperatorAssumptions(true)) + assumptions=LinearSolve.OperatorAssumptions(true), + verbose = Minimal()) # Return the cache struct with vectors From f89195ee9e6f2cb2abf26e6b74b41db5ab6808e0 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 22 Oct 2025 11:38:05 -0400 Subject: [PATCH 15/74] set Nonlinear verbosity to Minimal --- .../src/initialize_dae.jl | 16 ++++++++-------- lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl | 2 +- .../src/SimpleImplicitDiscreteSolve.jl | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl index d5ddaee278..807238ddc6 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl @@ -152,7 +152,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD nlprob = NonlinearProblem(nlfunc, integrator.u, p) nlsolve = default_nlsolve(alg.nlsolve, isinplace, u0, nlprob, isAD) nlsol = solve(nlprob, nlsolve; abstol = integrator.opts.abstol, - reltol = integrator.opts.reltol) + reltol = integrator.opts.reltol, verbose = Minimal()) integrator.u .= nlsol.u failed = nlsol.retcode != ReturnCode.Success end @@ -231,7 +231,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD nlsolve = default_nlsolve(alg.nlsolve, isinplace, nlprob, u0) nlsol = solve(nlprob, nlsolve; abstol = integrator.opts.abstol, - reltol = integrator.opts.reltol) + reltol = integrator.opts.reltol, verbose = Minimal()) integrator.u = nlsol.u failed = nlsol.retcode != ReturnCode.Success end @@ -312,7 +312,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA nlprob = NonlinearProblem(nlfunc, u0, p) nlsolve = default_nlsolve(alg.nlsolve, isinplace, u0, nlprob, isAD) nlsol = solve(nlprob, nlsolve; abstol = integrator.opts.abstol, - reltol = integrator.opts.reltol) + reltol = integrator.opts.reltol, verbose = Minimal()) integrator.u = nlsol.u recursivecopy!(integrator.uprev, integrator.u) @@ -360,7 +360,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA nlfunc = NonlinearFunction(nlequation; jac_prototype = f.jac_prototype) nlprob = NonlinearProblem(nlfunc, u0) nlsol = solve(nlprob, nlsolve; abstol = integrator.opts.abstol, - reltol = integrator.opts.reltol) + reltol = integrator.opts.reltol, verbose = Minimal()) integrator.u = nlsol.u @@ -459,7 +459,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD nlprob = NonlinearProblem(nlfunc, alg_u, p) nlsolve = default_nlsolve(alg.nlsolve, isinplace, u, nlprob, isAD) - nlsol = solve(nlprob, nlsolve; abstol = alg.abstol, reltol = integrator.opts.reltol) + nlsol = solve(nlprob, nlsolve; abstol = alg.abstol, reltol = integrator.opts.reltol, verbose = Minimal()) alg_u .= nlsol recursivecopy!(integrator.uprev, integrator.u) @@ -519,7 +519,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD nlprob = NonlinearProblem(nlfunc, u0[algebraic_vars]) nlsolve = default_nlsolve(alg.nlsolve, isinplace, u0, nlprob, isAD) - nlsol = solve(nlprob, nlsolve) + nlsol = solve(nlprob, nlsolve, verbose = Minimal()) u[algebraic_vars] .= nlsol.u @@ -607,7 +607,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA nlfunc = NonlinearFunction(nlequation!; jac_prototype = f.jac_prototype) nlprob = NonlinearProblem(nlfunc, ifelse.(differential_vars, du, u), p) - nlsol = solve(nlprob, nlsolve; abstol = alg.abstol, reltol = integrator.opts.reltol) + nlsol = solve(nlprob, nlsolve; abstol = alg.abstol, reltol = integrator.opts.reltol, verbose = Minimal()) @. du = ifelse(differential_vars, nlsol.u, du) @. u = ifelse(differential_vars, u, nlsol.u) @@ -658,7 +658,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA @show nlsolve - nlsol = solve(nlprob, nlsolve) + nlsol = solve(nlprob, nlsolve, verbose = Minimal()) du = ifelse.(differential_vars, nlsol.u, du) u = ifelse.(differential_vars, u, nlsol.u) diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl index 099f7dfb6b..635675c2c6 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl @@ -326,7 +326,7 @@ function build_nlsolver( (tmp, γ, α, tstep, invγdt, DIRK, p, dt, f) end prob = NonlinearProblem(NonlinearFunction{false}(nlf), copy(ztmp), nlp_params) - cache = init(prob, nlalg.alg) + cache = init(prob, nlalg.alg, verbose = Minimal()) nlcache = NonlinearSolveCache( nothing, tstep, nothing, nothing, invγdt, prob, cache) else diff --git a/lib/SimpleImplicitDiscreteSolve/src/SimpleImplicitDiscreteSolve.jl b/lib/SimpleImplicitDiscreteSolve/src/SimpleImplicitDiscreteSolve.jl index d392ddfa50..b575961ee3 100644 --- a/lib/SimpleImplicitDiscreteSolve/src/SimpleImplicitDiscreteSolve.jl +++ b/lib/SimpleImplicitDiscreteSolve/src/SimpleImplicitDiscreteSolve.jl @@ -65,7 +65,7 @@ function SciMLBase.solve(prob::ImplicitDiscreteProblem, alg::SimpleIDSolve; nlf = isinplace(f) ? (out, u, p) -> f(out, u, uprev, p, t) : (u, p) -> f(u, uprev, p, t) nlprob = NonlinearProblem{isinplace(f)}(nlf, uprev, p) - nlsol = solve(nlprob, SimpleNewtonRaphson()) + nlsol = solve(nlprob, SimpleNewtonRaphson(), verbose = Minimal()) u = nlsol.u save_everystep && (us[i] = u) convfail = (nlsol.retcode != ReturnCode.Success) From 991bd67f9e938f1a9a935af824c7507828c7704c Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 22 Oct 2025 12:08:03 -0400 Subject: [PATCH 16/74] fix imports --- lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl | 3 ++- lib/OrdinaryDiffEqCore/src/verbosity.jl | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl index 31a5418147..10f7f7a75a 100644 --- a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl +++ b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl @@ -91,7 +91,8 @@ import Accessors: @reset # using SciMLStructures: canonicalize, Tunable, isscimlstructure using SciMLLogging: SciMLLogging, @SciMLMessage, AbstractVerbositySpecifier, AbstractVerbosityPreset, - None, Minimal, Standard, Detailed, All, Silent, InfoLevel, WarnLevel, CustomLevel + None, Minimal, Standard, Detailed, All, Silent, InfoLevel, WarnLevel, ErrorLevel, + CustomLevel, AbstractMessageLevel using SymbolicIndexingInterface: state_values, parameter_values diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index 05f53df528..c62c182340 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -183,14 +183,14 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) ODEVerbosity( linear_verbosity = Minimal(), nonlinear_verbosity = Minimal(), - dt_NaN = ErrorLevel(), - init_NaN = ErrorLevel(), + dt_NaN = WarnLevel(), + init_NaN = WarnLevel(), dense_output_saveat = Silent(), alg_switch = Silent(), mismatched_input_output_type = Silent(), - rosenbrock_no_differential_states = ErrorLevel(), + rosenbrock_no_differential_states = WarnLevel(), shampine_dt = Silent(), - unlimited_dt = ErrorLevel() + unlimited_dt = WarnLevel() ) elseif verbose isa Standard # Standard: Everything from Minimal + non-fatal warnings From af4659bf43ccae67d163271e7a29315841d3f5b7 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 22 Oct 2025 15:44:22 -0400 Subject: [PATCH 17/74] add verbosity options for the warnings in SciMLBase check_errors --- lib/OrdinaryDiffEqCore/src/verbosity.jl | 47 +++++++++++++++++++++---- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index c62c182340..45f126f8e5 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -10,6 +10,10 @@ diagnostic messages, warnings, and errors during ODE solution. - `dt_NaN`: Messages when time step becomes NaN - `init_NaN`: Messages when initial conditions contain NaN - `dense_output_saveat`: Messages about dense output with saveat +- `max_iters`: Messages when maximum iterations are reached +- `dt_min_unstable`: Messages when time step becomes too small/unstable +- `instability`: Messages when numerical instability is detected +- `newton_convergence`: Messages when Newton iteration fails to converge ## Performance Group - `alg_switch`: Messages when algorithm switching occurs @@ -19,6 +23,7 @@ diagnostic messages, warnings, and errors during ODE solution. - `rosenbrock_no_differential_states`: Messages when Rosenbrock has no differential states - `shampine_dt`: Messages about Shampine time step selection - `unlimited_dt`: Messages when time step is unlimited +- `dt_epsilon`: Messages when timestep goes below floating point epsilon ## Solver Verbosity Groups - `linear_verbosity`: Verbosity configuration for linear solvers @@ -72,6 +77,10 @@ verbose = ODEVerbosity( dt_NaN init_NaN dense_output_saveat + max_iters + dt_min_unstable + instability + newton_convergence # Performance alg_switch mismatched_input_output_type @@ -79,12 +88,13 @@ verbose = ODEVerbosity( rosenbrock_no_differential_states shampine_dt unlimited_dt + dt_epsilon end # Group classifications -const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat) +const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat, :max_iters, :dt_min_unstable, :instability, :newton_convergence) const performance_options = (:alg_switch, :mismatched_input_output_type) -const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt) +const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt, :dt_epsilon) function option_group(option::Symbol) if option in error_control_options @@ -147,11 +157,16 @@ function ODEVerbosity(; dt_NaN = WarnLevel(), init_NaN = WarnLevel(), dense_output_saveat = WarnLevel(), + max_iters = WarnLevel(), + dt_min_unstable = WarnLevel(), + instability = WarnLevel(), + newton_convergence = WarnLevel(), alg_switch = WarnLevel(), mismatched_input_output_type = WarnLevel(), rosenbrock_no_differential_states = WarnLevel(), shampine_dt = WarnLevel(), - unlimited_dt = WarnLevel() + unlimited_dt = WarnLevel(), + dt_epsilon = WarnLevel() ) # Apply group-level settings @@ -186,11 +201,16 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) dt_NaN = WarnLevel(), init_NaN = WarnLevel(), dense_output_saveat = Silent(), + max_iters = WarnLevel(), + dt_min_unstable = WarnLevel(), + instability = WarnLevel(), + newton_convergence = WarnLevel(), alg_switch = Silent(), mismatched_input_output_type = Silent(), rosenbrock_no_differential_states = WarnLevel(), shampine_dt = Silent(), - unlimited_dt = WarnLevel() + unlimited_dt = WarnLevel(), + dt_epsilon = Silent() ) elseif verbose isa Standard # Standard: Everything from Minimal + non-fatal warnings @@ -203,11 +223,16 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) dt_NaN = WarnLevel(), init_NaN = WarnLevel(), dense_output_saveat = InfoLevel(), + max_iters = WarnLevel(), + dt_min_unstable = WarnLevel(), + instability = WarnLevel(), + newton_convergence = WarnLevel(), alg_switch = InfoLevel(), mismatched_input_output_type = WarnLevel(), rosenbrock_no_differential_states = WarnLevel(), shampine_dt = InfoLevel(), - unlimited_dt = WarnLevel() + unlimited_dt = WarnLevel(), + dt_epsilon = InfoLevel() ) elseif verbose isa All # All: Maximum verbosity - every possible logging message at InfoLevel @@ -217,11 +242,16 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) dt_NaN = WarnLevel(), init_NaN = WarnLevel(), dense_output_saveat = InfoLevel(), + max_iters = WarnLevel(), + dt_min_unstable = WarnLevel(), + instability = WarnLevel(), + newton_convergence = WarnLevel(), alg_switch = InfoLevel(), mismatched_input_output_type = InfoLevel(), rosenbrock_no_differential_states = WarnLevel(), shampine_dt = InfoLevel(), - unlimited_dt = WarnLevel() + unlimited_dt = WarnLevel(), + dt_epsilon = InfoLevel() ) end end @@ -237,6 +267,11 @@ end Silent(), Silent(), Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), Silent() ) end From 32564899ad0fa66dca56b7c7e1bae13e016661c3 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 24 Oct 2025 13:33:11 -0400 Subject: [PATCH 18/74] remove bad getproperty --- lib/OrdinaryDiffEqCore/src/verbosity.jl | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index 45f126f8e5..3af61677e5 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -291,17 +291,3 @@ end return default_val end end - -function Base.getproperty(verbosity::ODEVerbosity, name::Symbol) - # Check if this is a group name - if name === :error_control - return group_options(verbosity, :error_control) - elseif name === :performance - return group_options(verbosity, :performance) - elseif name === :numerical - return group_options(verbosity, :numerical) - else - # Fall back to default field access - return getfield(verbosity, name) - end -end From 5a86f27ca21d85967a64a27cdaf7c9dd943b0512 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 29 Oct 2025 06:38:36 -0400 Subject: [PATCH 19/74] Update Project.toml --- lib/OrdinaryDiffEqNonlinearSolve/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqNonlinearSolve/Project.toml b/lib/OrdinaryDiffEqNonlinearSolve/Project.toml index 4bf05c1229..2cdf595873 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/Project.toml +++ b/lib/OrdinaryDiffEqNonlinearSolve/Project.toml @@ -44,7 +44,7 @@ FastBroadcast = "0.3" Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" -LinearSolve = "3.26" +LinearSolve = "3.46" LineSearches = "7.4" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" From 0bb110d1eb76aa0f3466b352a9014d4e536cd7f1 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 29 Oct 2025 06:39:04 -0400 Subject: [PATCH 20/74] Update Project.toml --- lib/OrdinaryDiffEqDefault/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqDefault/Project.toml b/lib/OrdinaryDiffEqDefault/Project.toml index 64c6b513dc..8dd6581ad4 100644 --- a/lib/OrdinaryDiffEqDefault/Project.toml +++ b/lib/OrdinaryDiffEqDefault/Project.toml @@ -37,7 +37,7 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" OrdinaryDiffEqBDF = "1.9.0" OrdinaryDiffEqVerner = "1.5.0" -LinearSolve = "3.26" +LinearSolve = "3.46" PrecompileTools = "1.2" EnumX = "1.0" LinearAlgebra = "1.10" From d1f53127021f5b5df3522b50a1b7588f253ae33b Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 29 Oct 2025 06:39:32 -0400 Subject: [PATCH 21/74] Update Project.toml --- lib/OrdinaryDiffEqDifferentiation/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqDifferentiation/Project.toml b/lib/OrdinaryDiffEqDifferentiation/Project.toml index 32a601b7f5..94dbe0511c 100644 --- a/lib/OrdinaryDiffEqDifferentiation/Project.toml +++ b/lib/OrdinaryDiffEqDifferentiation/Project.toml @@ -49,7 +49,7 @@ Test = "<0.0.1, 1" FiniteDiff = "2.27" StaticArrayInterface = "1.8" DifferentiationInterface = "0.6.54, 0.7" -LinearSolve = "3.26" +LinearSolve = "3.46" ConstructionBase = "1.5.8" LinearAlgebra = "1.10" SciMLBase = "2.99" From 3440085892a033e50b4f4ac271b6146b64ce91c3 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 29 Oct 2025 06:39:49 -0400 Subject: [PATCH 22/74] Update Project.toml --- lib/OrdinaryDiffEqBDF/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqBDF/Project.toml b/lib/OrdinaryDiffEqBDF/Project.toml index b7f57e4e9e..5f73a1942c 100644 --- a/lib/OrdinaryDiffEqBDF/Project.toml +++ b/lib/OrdinaryDiffEqBDF/Project.toml @@ -45,7 +45,7 @@ FastBroadcast = "0.3" Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" -LinearSolve = "3.26" +LinearSolve = "3.46" PrecompileTools = "1.2" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" From 57e79e33129f6bb3c2a342c5fd09ae21c81a056a Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 29 Oct 2025 06:40:12 -0400 Subject: [PATCH 23/74] Update Project.toml --- lib/OrdinaryDiffEqExponentialRK/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqExponentialRK/Project.toml b/lib/OrdinaryDiffEqExponentialRK/Project.toml index f0b4519f9f..743f83befa 100644 --- a/lib/OrdinaryDiffEqExponentialRK/Project.toml +++ b/lib/OrdinaryDiffEqExponentialRK/Project.toml @@ -38,7 +38,7 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" OrdinaryDiffEqVerner = "1.5.0" -LinearSolve = "3.26" +LinearSolve = "3.46" ExponentialUtilities = "1.27" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" From 0e47f99f0e2533429fb2408269f6144ae03d4c96 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 29 Oct 2025 06:40:41 -0400 Subject: [PATCH 24/74] Update Project.toml --- lib/OrdinaryDiffEqRosenbrock/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqRosenbrock/Project.toml b/lib/OrdinaryDiffEqRosenbrock/Project.toml index 837be508bf..a5f597937e 100644 --- a/lib/OrdinaryDiffEqRosenbrock/Project.toml +++ b/lib/OrdinaryDiffEqRosenbrock/Project.toml @@ -45,7 +45,7 @@ DiffEqDevTools = "2.44.4" FiniteDiff = "2.27" MuladdMacro = "0.2" DifferentiationInterface = "0.6.54, 0.7" -LinearSolve = "3.26" +LinearSolve = "3.46" Polyester = "0.7" PrecompileTools = "1.2" LinearAlgebra = "1.10" From 0a05e3c8456c8908126eea1281ec49bfb0e56e97 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 29 Oct 2025 06:40:56 -0400 Subject: [PATCH 25/74] Update Project.toml --- lib/OrdinaryDiffEqExtrapolation/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqExtrapolation/Project.toml b/lib/OrdinaryDiffEqExtrapolation/Project.toml index 3c53dfe14f..c6d87944ed 100644 --- a/lib/OrdinaryDiffEqExtrapolation/Project.toml +++ b/lib/OrdinaryDiffEqExtrapolation/Project.toml @@ -32,7 +32,7 @@ FastBroadcast = "0.3" Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" -LinearSolve = "3.26" +LinearSolve = "3.46" Polyester = "0.7" OrdinaryDiffEqDifferentiation = "1.12.0" SciMLBase = "2.99" From 53765a544f71216ac85e4ac5867aabac99293186 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 29 Oct 2025 06:41:08 -0400 Subject: [PATCH 26/74] Update Project.toml --- lib/OrdinaryDiffEqFIRK/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqFIRK/Project.toml b/lib/OrdinaryDiffEqFIRK/Project.toml index 64249c963d..7c84d40be4 100644 --- a/lib/OrdinaryDiffEqFIRK/Project.toml +++ b/lib/OrdinaryDiffEqFIRK/Project.toml @@ -39,7 +39,7 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" FastGaussQuadrature = "1.0.2" MuladdMacro = "0.2" -LinearSolve = "3.26" +LinearSolve = "3.46" Polyester = "0.7" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" From e5d4bcfb777a19117bdff2a526952da506b1f024 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Tue, 4 Nov 2025 15:33:52 -0500 Subject: [PATCH 27/74] make ODEVerbosity concrete in DEOptions --- lib/OrdinaryDiffEqCore/src/integrators/type.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/integrators/type.jl b/lib/OrdinaryDiffEqCore/src/integrators/type.jl index 1c94d2464d..1796cce4d3 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/type.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/type.jl @@ -1,6 +1,6 @@ mutable struct DEOptions{absType, relType, QT, tType, Controller, F1, F2, F3, F4, F5, F6, F7, tstopsType, discType, ECType, SType, MI, tcache, savecache, - disccache} + disccache, verbType} maxiters::MI save_everystep::Bool adaptive::Bool @@ -42,7 +42,7 @@ mutable struct DEOptions{absType, relType, QT, tType, Controller, F1, F2, F3, F4 callback::F4 isoutofdomain::F5 unstable_check::F7 - verbose::ODEVerbosity + verbose::verbType calck::Bool force_dtmin::Bool advance_to_tstop::Bool From 908c4f90353274c7eb6094ab82955fc8d6e34fbd Mon Sep 17 00:00:00 2001 From: jClugstor Date: Tue, 4 Nov 2025 15:34:02 -0500 Subject: [PATCH 28/74] add manual page for verbosity --- docs/src/verbosity.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/src/verbosity.md diff --git a/docs/src/verbosity.md b/docs/src/verbosity.md new file mode 100644 index 0000000000..e373e72a51 --- /dev/null +++ b/docs/src/verbosity.md @@ -0,0 +1,9 @@ +# Controlling Solver Verbosity + +OrdinaryDiffEq.jl provides fine-grained control over diagnostic messages, warnings, and errors +through the `verbose` keyword argument for `solve`. The verbosity system allows you to control what +information is displayed during the solve process. See [SciMLLogging.jl](https://docs.sciml.ai/SciMLLogging/dev/) for more details. + +```@docs +ODEVerbosity +``` \ No newline at end of file From b0843cffa0eaceae6b1b9c5d06f08eb8b0010cef Mon Sep 17 00:00:00 2001 From: jClugstor Date: Tue, 4 Nov 2025 15:37:46 -0500 Subject: [PATCH 29/74] fix DEOptions constructor --- lib/OrdinaryDiffEqCore/src/solve.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index de112f5dee..0db3b7b7c1 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -455,7 +455,7 @@ function SciMLBase.__init( typeof(d_discontinuities_internal), typeof(userdata), typeof(save_idxs), typeof(maxiters), typeof(tstops), - typeof(saveat), typeof(d_discontinuities)}(maxiters, save_everystep, + typeof(saveat), typeof(d_discontinuities), typeof(verbose)}(maxiters, save_everystep, adaptive, abstol_internal, reltol_internal, QT(gamma), QT(qmax), From 1163230dc9075889209546b833d20943bce5f422 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Tue, 4 Nov 2025 15:50:12 -0500 Subject: [PATCH 30/74] bump OrdinaryDiffEqCore version --- lib/OrdinaryDiffEqCore/Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqCore/Project.toml b/lib/OrdinaryDiffEqCore/Project.toml index b88d7339ab..28483ecbe0 100644 --- a/lib/OrdinaryDiffEqCore/Project.toml +++ b/lib/OrdinaryDiffEqCore/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqCore" uuid = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" authors = ["ParamThakkar123 "] -version = "1.36.0" +version = "1.37.0" [deps] SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" From 7c0ee0d32e311d9a46ec7dc584f533a89d432362 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Tue, 4 Nov 2025 15:50:37 -0500 Subject: [PATCH 31/74] bump lower bounds for OrdinaryDiffEqCore --- Project.toml | 2 +- lib/ImplicitDiscreteSolve/Project.toml | 2 +- lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml | 2 +- lib/OrdinaryDiffEqBDF/Project.toml | 2 +- lib/OrdinaryDiffEqDefault/Project.toml | 2 +- lib/OrdinaryDiffEqDifferentiation/Project.toml | 2 +- lib/OrdinaryDiffEqExplicitRK/Project.toml | 2 +- lib/OrdinaryDiffEqExponentialRK/Project.toml | 2 +- lib/OrdinaryDiffEqExtrapolation/Project.toml | 2 +- lib/OrdinaryDiffEqFIRK/Project.toml | 2 +- lib/OrdinaryDiffEqFeagin/Project.toml | 2 +- lib/OrdinaryDiffEqFunctionMap/Project.toml | 2 +- lib/OrdinaryDiffEqHighOrderRK/Project.toml | 2 +- lib/OrdinaryDiffEqIMEXMultistep/Project.toml | 2 +- lib/OrdinaryDiffEqLinear/Project.toml | 2 +- lib/OrdinaryDiffEqLowOrderRK/Project.toml | 2 +- lib/OrdinaryDiffEqLowStorageRK/Project.toml | 2 +- lib/OrdinaryDiffEqNonlinearSolve/Project.toml | 2 +- lib/OrdinaryDiffEqNordsieck/Project.toml | 2 +- lib/OrdinaryDiffEqPDIRK/Project.toml | 2 +- lib/OrdinaryDiffEqPRK/Project.toml | 2 +- lib/OrdinaryDiffEqQPRK/Project.toml | 2 +- lib/OrdinaryDiffEqRKN/Project.toml | 2 +- lib/OrdinaryDiffEqRosenbrock/Project.toml | 2 +- lib/OrdinaryDiffEqSDIRK/Project.toml | 2 +- lib/OrdinaryDiffEqSIMDRK/Project.toml | 2 +- lib/OrdinaryDiffEqSSPRK/Project.toml | 2 +- lib/OrdinaryDiffEqStabilizedIRK/Project.toml | 2 +- lib/OrdinaryDiffEqStabilizedRK/Project.toml | 2 +- lib/OrdinaryDiffEqSymplecticRK/Project.toml | 2 +- lib/OrdinaryDiffEqTaylorSeries/Project.toml | 2 +- lib/OrdinaryDiffEqTsit5/Project.toml | 2 +- lib/OrdinaryDiffEqVerner/Project.toml | 2 +- 33 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Project.toml b/Project.toml index 1ca32cd475..f3d9b8931d 100644 --- a/Project.toml +++ b/Project.toml @@ -134,7 +134,7 @@ MuladdMacro = "0.2.4" NonlinearSolve = "4.10" OrdinaryDiffEqAdamsBashforthMoulton = "1.4.0" OrdinaryDiffEqBDF = "1.9.0" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" OrdinaryDiffEqDefault = "1.7.0" OrdinaryDiffEqDifferentiation = "1.12.0" OrdinaryDiffEqExplicitRK = "1.3.0" diff --git a/lib/ImplicitDiscreteSolve/Project.toml b/lib/ImplicitDiscreteSolve/Project.toml index d25e9f75d1..8d2cae8c4f 100644 --- a/lib/ImplicitDiscreteSolve/Project.toml +++ b/lib/ImplicitDiscreteSolve/Project.toml @@ -24,7 +24,7 @@ Test = "1.10.0" OrdinaryDiffEqSDIRK = "1.6.0" SciMLBase = "2.99" SimpleNonlinearSolve = "2.7" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" SymbolicIndexingInterface = "0.3.38" julia = "1.10" diff --git a/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml b/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml index 4971a132c4..bf326f71d5 100644 --- a/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml +++ b/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml @@ -33,7 +33,7 @@ DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" Polyester = "0.7" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" OrdinaryDiffEqLowOrderRK = "1.5.0" Aqua = "0.8.11" diff --git a/lib/OrdinaryDiffEqBDF/Project.toml b/lib/OrdinaryDiffEqBDF/Project.toml index 5f73a1942c..e0f300b4d3 100644 --- a/lib/OrdinaryDiffEqBDF/Project.toml +++ b/lib/OrdinaryDiffEqBDF/Project.toml @@ -52,7 +52,7 @@ OrdinaryDiffEqDifferentiation = "1.12.0" OrdinaryDiffEqSDIRK = "1.6.0" TruncatedStacktraces = "1.4" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" ArrayInterface = "7.19" Enzyme = "0.13" diff --git a/lib/OrdinaryDiffEqDefault/Project.toml b/lib/OrdinaryDiffEqDefault/Project.toml index 8dd6581ad4..c1719218a0 100644 --- a/lib/OrdinaryDiffEqDefault/Project.toml +++ b/lib/OrdinaryDiffEqDefault/Project.toml @@ -42,7 +42,7 @@ PrecompileTools = "1.2" EnumX = "1.0" LinearAlgebra = "1.10" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" SparseArrays = "1.10" Aqua = "0.8.11" Preferences = "1.4" diff --git a/lib/OrdinaryDiffEqDifferentiation/Project.toml b/lib/OrdinaryDiffEqDifferentiation/Project.toml index 94dbe0511c..36868f04c1 100644 --- a/lib/OrdinaryDiffEqDifferentiation/Project.toml +++ b/lib/OrdinaryDiffEqDifferentiation/Project.toml @@ -53,7 +53,7 @@ LinearSolve = "3.46" ConstructionBase = "1.5.8" LinearAlgebra = "1.10" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" ConcreteStructs = "0.2" SparseArrays = "1.10" Aqua = "0.8.11" diff --git a/lib/OrdinaryDiffEqExplicitRK/Project.toml b/lib/OrdinaryDiffEqExplicitRK/Project.toml index e0d6678dd9..af6de05f8e 100644 --- a/lib/OrdinaryDiffEqExplicitRK/Project.toml +++ b/lib/OrdinaryDiffEqExplicitRK/Project.toml @@ -32,7 +32,7 @@ MuladdMacro = "0.2" LinearAlgebra = "1.10" TruncatedStacktraces = "1.4" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" diff --git a/lib/OrdinaryDiffEqExponentialRK/Project.toml b/lib/OrdinaryDiffEqExponentialRK/Project.toml index 743f83befa..cb2f73d009 100644 --- a/lib/OrdinaryDiffEqExponentialRK/Project.toml +++ b/lib/OrdinaryDiffEqExponentialRK/Project.toml @@ -44,7 +44,7 @@ LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" OrdinaryDiffEqSDIRK = "1.6.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" SparseArrays = "1.10" Aqua = "0.8.11" julia = "1.10" diff --git a/lib/OrdinaryDiffEqExtrapolation/Project.toml b/lib/OrdinaryDiffEqExtrapolation/Project.toml index c6d87944ed..b986db5db5 100644 --- a/lib/OrdinaryDiffEqExtrapolation/Project.toml +++ b/lib/OrdinaryDiffEqExtrapolation/Project.toml @@ -36,7 +36,7 @@ LinearSolve = "3.46" Polyester = "0.7" OrdinaryDiffEqDifferentiation = "1.12.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" diff --git a/lib/OrdinaryDiffEqFIRK/Project.toml b/lib/OrdinaryDiffEqFIRK/Project.toml index 7c84d40be4..7c0315a7e4 100644 --- a/lib/OrdinaryDiffEqFIRK/Project.toml +++ b/lib/OrdinaryDiffEqFIRK/Project.toml @@ -44,7 +44,7 @@ Polyester = "0.7" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" GenericSchur = "0.5" julia = "1.10" diff --git a/lib/OrdinaryDiffEqFeagin/Project.toml b/lib/OrdinaryDiffEqFeagin/Project.toml index bbd905e512..d8c03faa0e 100644 --- a/lib/OrdinaryDiffEqFeagin/Project.toml +++ b/lib/OrdinaryDiffEqFeagin/Project.toml @@ -32,7 +32,7 @@ DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" Polyester = "0.7" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" julia = "1.10" diff --git a/lib/OrdinaryDiffEqFunctionMap/Project.toml b/lib/OrdinaryDiffEqFunctionMap/Project.toml index eea9aade8f..57753c7aa1 100644 --- a/lib/OrdinaryDiffEqFunctionMap/Project.toml +++ b/lib/OrdinaryDiffEqFunctionMap/Project.toml @@ -29,7 +29,7 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" julia = "1.10" diff --git a/lib/OrdinaryDiffEqHighOrderRK/Project.toml b/lib/OrdinaryDiffEqHighOrderRK/Project.toml index 06f7e70337..49e70c7ad1 100644 --- a/lib/OrdinaryDiffEqHighOrderRK/Project.toml +++ b/lib/OrdinaryDiffEqHighOrderRK/Project.toml @@ -30,7 +30,7 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" julia = "1.10" diff --git a/lib/OrdinaryDiffEqIMEXMultistep/Project.toml b/lib/OrdinaryDiffEqIMEXMultistep/Project.toml index f53e6032c0..8aef7af1af 100644 --- a/lib/OrdinaryDiffEqIMEXMultistep/Project.toml +++ b/lib/OrdinaryDiffEqIMEXMultistep/Project.toml @@ -29,7 +29,7 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" OrdinaryDiffEqDifferentiation = "1.12.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" diff --git a/lib/OrdinaryDiffEqLinear/Project.toml b/lib/OrdinaryDiffEqLinear/Project.toml index cdf74b27dd..e7ff169003 100644 --- a/lib/OrdinaryDiffEqLinear/Project.toml +++ b/lib/OrdinaryDiffEqLinear/Project.toml @@ -35,7 +35,7 @@ OrdinaryDiffEqVerner = "1.5.0" ExponentialUtilities = "1.27" LinearAlgebra = "1.10" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" diff --git a/lib/OrdinaryDiffEqLowOrderRK/Project.toml b/lib/OrdinaryDiffEqLowOrderRK/Project.toml index 6d0c460560..0324240aa7 100644 --- a/lib/OrdinaryDiffEqLowOrderRK/Project.toml +++ b/lib/OrdinaryDiffEqLowOrderRK/Project.toml @@ -32,7 +32,7 @@ DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" LinearAlgebra = "1.10" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" julia = "1.10" diff --git a/lib/OrdinaryDiffEqLowStorageRK/Project.toml b/lib/OrdinaryDiffEqLowStorageRK/Project.toml index d88c73a70c..3eaac2166b 100644 --- a/lib/OrdinaryDiffEqLowStorageRK/Project.toml +++ b/lib/OrdinaryDiffEqLowStorageRK/Project.toml @@ -39,7 +39,7 @@ MuladdMacro = "0.2" PrecompileTools = "1.2" Polyester = "0.7" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" Preferences = "1.4" diff --git a/lib/OrdinaryDiffEqNonlinearSolve/Project.toml b/lib/OrdinaryDiffEqNonlinearSolve/Project.toml index 2cdf595873..efd97fa154 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/Project.toml +++ b/lib/OrdinaryDiffEqNonlinearSolve/Project.toml @@ -50,7 +50,7 @@ LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" OrdinaryDiffEqSDIRK = "1.6.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" SimpleNonlinearSolve = "2.7" FastClosures = "0.3" Aqua = "0.8.11" diff --git a/lib/OrdinaryDiffEqNordsieck/Project.toml b/lib/OrdinaryDiffEqNordsieck/Project.toml index 969270877a..25cc0ca558 100644 --- a/lib/OrdinaryDiffEqNordsieck/Project.toml +++ b/lib/OrdinaryDiffEqNordsieck/Project.toml @@ -36,7 +36,7 @@ MuladdMacro = "0.2" Polyester = "0.7" LinearAlgebra = "1.10" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" julia = "1.10" diff --git a/lib/OrdinaryDiffEqPDIRK/Project.toml b/lib/OrdinaryDiffEqPDIRK/Project.toml index 0f5d3045af..b0f45f4ac2 100644 --- a/lib/OrdinaryDiffEqPDIRK/Project.toml +++ b/lib/OrdinaryDiffEqPDIRK/Project.toml @@ -34,7 +34,7 @@ MuladdMacro = "0.2" Polyester = "0.7" OrdinaryDiffEqDifferentiation = "1.12.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" StaticArrays = "1.9" julia = "1.10" diff --git a/lib/OrdinaryDiffEqPRK/Project.toml b/lib/OrdinaryDiffEqPRK/Project.toml index ee2acb4078..82cfae38f9 100644 --- a/lib/OrdinaryDiffEqPRK/Project.toml +++ b/lib/OrdinaryDiffEqPRK/Project.toml @@ -29,7 +29,7 @@ DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" Polyester = "0.7" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" diff --git a/lib/OrdinaryDiffEqQPRK/Project.toml b/lib/OrdinaryDiffEqQPRK/Project.toml index 49f9ba3b23..61f3af39ff 100644 --- a/lib/OrdinaryDiffEqQPRK/Project.toml +++ b/lib/OrdinaryDiffEqQPRK/Project.toml @@ -30,7 +30,7 @@ Random = "<0.0.1, 1" DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" julia = "1.10" diff --git a/lib/OrdinaryDiffEqRKN/Project.toml b/lib/OrdinaryDiffEqRKN/Project.toml index 61fdb90bb4..ddfd3366a6 100644 --- a/lib/OrdinaryDiffEqRKN/Project.toml +++ b/lib/OrdinaryDiffEqRKN/Project.toml @@ -32,7 +32,7 @@ DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" Polyester = "0.7" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" diff --git a/lib/OrdinaryDiffEqRosenbrock/Project.toml b/lib/OrdinaryDiffEqRosenbrock/Project.toml index a5f597937e..0d310bbf5f 100644 --- a/lib/OrdinaryDiffEqRosenbrock/Project.toml +++ b/lib/OrdinaryDiffEqRosenbrock/Project.toml @@ -51,7 +51,7 @@ PrecompileTools = "1.2" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" Preferences = "1.4" diff --git a/lib/OrdinaryDiffEqSDIRK/Project.toml b/lib/OrdinaryDiffEqSDIRK/Project.toml index 5cce2749fa..871eb65d8c 100644 --- a/lib/OrdinaryDiffEqSDIRK/Project.toml +++ b/lib/OrdinaryDiffEqSDIRK/Project.toml @@ -37,7 +37,7 @@ LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" TruncatedStacktraces = "1.4" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" MacroTools = "0.5" julia = "1.10" diff --git a/lib/OrdinaryDiffEqSIMDRK/Project.toml b/lib/OrdinaryDiffEqSIMDRK/Project.toml index f3b772286a..80fe71c568 100644 --- a/lib/OrdinaryDiffEqSIMDRK/Project.toml +++ b/lib/OrdinaryDiffEqSIMDRK/Project.toml @@ -22,7 +22,7 @@ SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "1" DiffEqDevTools = "2.44" MuladdMacro = "0.2" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "0.7, 0.8, 1" SLEEFPirates = "0.6" VectorizationBase = "0.21" diff --git a/lib/OrdinaryDiffEqSSPRK/Project.toml b/lib/OrdinaryDiffEqSSPRK/Project.toml index a216726008..cfe6399404 100644 --- a/lib/OrdinaryDiffEqSSPRK/Project.toml +++ b/lib/OrdinaryDiffEqSSPRK/Project.toml @@ -39,7 +39,7 @@ MuladdMacro = "0.2" PrecompileTools = "1.2" Polyester = "0.7" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" Preferences = "1.4" diff --git a/lib/OrdinaryDiffEqStabilizedIRK/Project.toml b/lib/OrdinaryDiffEqStabilizedIRK/Project.toml index 739352e46a..734cac832c 100644 --- a/lib/OrdinaryDiffEqStabilizedIRK/Project.toml +++ b/lib/OrdinaryDiffEqStabilizedIRK/Project.toml @@ -36,7 +36,7 @@ MuladdMacro = "0.2" LinearAlgebra = "1.10" OrdinaryDiffEqDifferentiation = "1.12.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" OrdinaryDiffEqStabilizedRK = "1.4.0" StaticArrays = "1.9" diff --git a/lib/OrdinaryDiffEqStabilizedRK/Project.toml b/lib/OrdinaryDiffEqStabilizedRK/Project.toml index 37c265a3cb..dc75eabafc 100644 --- a/lib/OrdinaryDiffEqStabilizedRK/Project.toml +++ b/lib/OrdinaryDiffEqStabilizedRK/Project.toml @@ -32,7 +32,7 @@ DiffEqDevTools = "2.44.4" MuladdMacro = "0.2" LinearAlgebra = "1.10" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" StaticArrays = "1.9" julia = "1.10" diff --git a/lib/OrdinaryDiffEqSymplecticRK/Project.toml b/lib/OrdinaryDiffEqSymplecticRK/Project.toml index b5ce7d2aea..ca9128eec9 100644 --- a/lib/OrdinaryDiffEqSymplecticRK/Project.toml +++ b/lib/OrdinaryDiffEqSymplecticRK/Project.toml @@ -38,7 +38,7 @@ Polyester = "0.7" LinearAlgebra = "1.10" OrdinaryDiffEqRKN = "1.4.0" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Aqua = "0.8.11" julia = "1.10" JET = "0.9.18, 0.10.4" diff --git a/lib/OrdinaryDiffEqTaylorSeries/Project.toml b/lib/OrdinaryDiffEqTaylorSeries/Project.toml index e6a075f5af..12eb442ca6 100644 --- a/lib/OrdinaryDiffEqTaylorSeries/Project.toml +++ b/lib/OrdinaryDiffEqTaylorSeries/Project.toml @@ -41,7 +41,7 @@ Symbolics = "6.48.0" LinearAlgebra = "1.10" TruncatedStacktraces = "1.4" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" Preferences = "1.4" diff --git a/lib/OrdinaryDiffEqTsit5/Project.toml b/lib/OrdinaryDiffEqTsit5/Project.toml index 372f4d49e0..9c4fc2b10b 100644 --- a/lib/OrdinaryDiffEqTsit5/Project.toml +++ b/lib/OrdinaryDiffEqTsit5/Project.toml @@ -36,7 +36,7 @@ PrecompileTools = "1.2" LinearAlgebra = "1.10" TruncatedStacktraces = "1.4" SciMLBase = "2.99" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" Static = "1.2" Aqua = "0.8.11" Preferences = "1.4" diff --git a/lib/OrdinaryDiffEqVerner/Project.toml b/lib/OrdinaryDiffEqVerner/Project.toml index 2a40a511ef..e7b4be5881 100644 --- a/lib/OrdinaryDiffEqVerner/Project.toml +++ b/lib/OrdinaryDiffEqVerner/Project.toml @@ -41,7 +41,7 @@ LinearAlgebra = "1.10" TruncatedStacktraces = "1.4" SciMLBase = "2.99" ODEProblemLibrary = "0.1.8" -OrdinaryDiffEqCore = "1.29.0" +OrdinaryDiffEqCore = "1.37.0" OrdinaryDiffEqExplicitRK = "1.4" Static = "1.2" Aqua = "0.8.11" From 2c0597a527cb44d7a473451d9f1cecf263c7ae7d Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 10:12:11 -0500 Subject: [PATCH 32/74] add verbose as argument to all alg_cache --- lib/ImplicitDiscreteSolve/src/cache.jl | 4 +- .../src/adams_bashforth_moulton_caches.jl | 52 +++--- lib/OrdinaryDiffEqBDF/src/bdf_caches.jl | 28 +-- lib/OrdinaryDiffEqBDF/src/dae_caches.jl | 12 +- .../src/caches/basic_caches.jl | 4 +- .../src/explicit_rk_caches.jl | 4 +- .../src/exponential_rk_caches.jl | 40 ++-- .../src/extrapolation_caches.jl | 28 +-- lib/OrdinaryDiffEqFIRK/src/firk_caches.jl | 16 +- lib/OrdinaryDiffEqFeagin/src/feagin_caches.jl | 12 +- .../src/functionmap_caches.jl | 4 +- .../src/high_order_rk_caches.jl | 16 +- .../src/imex_multistep_caches.jl | 8 +- lib/OrdinaryDiffEqLinear/src/linear_caches.jl | 68 +++---- .../src/low_order_rk_caches.jl | 104 +++++------ .../src/low_storage_rk_caches.jl | 176 +++++++++--------- .../src/nordsieck_caches.jl | 8 +- lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl | 4 +- lib/OrdinaryDiffEqPRK/src/prk_caches.jl | 4 +- lib/OrdinaryDiffEqQPRK/src/qprk_caches.jl | 4 +- lib/OrdinaryDiffEqRKN/src/rkn_caches.jl | 68 +++---- .../src/rosenbrock_caches.jl | 28 +-- .../src/kencarp_kvaerno_caches.jl | 36 ++-- lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl | 76 ++++---- lib/OrdinaryDiffEqSIMDRK/src/caches.jl | 6 +- lib/OrdinaryDiffEqSSPRK/src/ssprk_caches.jl | 72 +++---- .../src/irkc_caches.jl | 4 +- .../src/rkc_caches.jl | 24 +-- .../src/symplectic_caches.jl | 72 +++---- .../src/TaylorSeries_caches.jl | 8 +- lib/OrdinaryDiffEqTsit5/src/tsit_caches.jl | 4 +- lib/OrdinaryDiffEqVerner/src/verner_caches.jl | 20 +- 32 files changed, 507 insertions(+), 507 deletions(-) diff --git a/lib/ImplicitDiscreteSolve/src/cache.jl b/lib/ImplicitDiscreteSolve/src/cache.jl index f9c7835d82..765fec12fd 100644 --- a/lib/ImplicitDiscreteSolve/src/cache.jl +++ b/lib/ImplicitDiscreteSolve/src/cache.jl @@ -14,7 +14,7 @@ end function alg_cache(alg::IDSolve, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} state = ImplicitDiscreteState(isnothing(u) ? nothing : zero(u), p, t) IDSolveCache(u, uprev, state, nothing) end @@ -28,7 +28,7 @@ end function alg_cache(alg::IDSolve, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} state = ImplicitDiscreteState(isnothing(u) ? nothing : zero(u), p, t) IDSolveCache(u, uprev, state, nothing) end diff --git a/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/adams_bashforth_moulton_caches.jl b/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/adams_bashforth_moulton_caches.jl index 283b4b6b18..44b567a791 100644 --- a/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/adams_bashforth_moulton_caches.jl +++ b/lib/OrdinaryDiffEqAdamsBashforthMoulton/src/adams_bashforth_moulton_caches.jl @@ -26,7 +26,7 @@ end function alg_cache(alg::AB3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -39,7 +39,7 @@ end function alg_cache(alg::AB3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype AB3ConstantCache(k2, k3, 1) @@ -67,7 +67,7 @@ end function alg_cache(alg::ABM32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -80,7 +80,7 @@ end function alg_cache(alg::ABM32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype ABM32ConstantCache(k2, k3, 1) @@ -113,7 +113,7 @@ end function alg_cache(alg::AB4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -130,7 +130,7 @@ end function alg_cache(alg::AB4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype k4 = rate_prototype @@ -167,7 +167,7 @@ end function alg_cache(alg::ABM43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -188,7 +188,7 @@ end function alg_cache(alg::ABM43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype k4 = rate_prototype @@ -223,7 +223,7 @@ end function alg_cache(alg::AB5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -240,7 +240,7 @@ end function alg_cache(alg::AB5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype k4 = rate_prototype @@ -280,7 +280,7 @@ end function alg_cache(alg::ABM54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -302,7 +302,7 @@ end function alg_cache(alg::ABM54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k2 = rate_prototype k3 = rate_prototype k4 = rate_prototype @@ -351,7 +351,7 @@ end function alg_cache(alg::VCAB3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 3) c = fill(zero(t), 3, 3) g = fill(zero(t), 3) @@ -372,7 +372,7 @@ end function alg_cache(alg::VCAB3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) bk1 = zero(rate_prototype) bk2 = zero(rate_prototype) @@ -447,7 +447,7 @@ end function alg_cache(alg::VCAB4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 4) c = fill(zero(t), 4, 4) g = fill(zero(t), 4) @@ -468,7 +468,7 @@ end function alg_cache(alg::VCAB4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) rk3 = zero(rate_prototype) @@ -544,7 +544,7 @@ end function alg_cache(alg::VCAB5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 5) c = fill(zero(t), 5, 5) g = fill(zero(t), 5) @@ -565,7 +565,7 @@ end function alg_cache(alg::VCAB5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) rk3 = zero(rate_prototype) @@ -645,7 +645,7 @@ end function alg_cache(alg::VCABM3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 3) c = fill(zero(t), 4, 4) g = fill(zero(t), 4) @@ -667,7 +667,7 @@ end function alg_cache(alg::VCABM3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) bk1 = zero(rate_prototype) bk2 = zero(rate_prototype) @@ -751,7 +751,7 @@ end function alg_cache(alg::VCABM4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 4) c = fill(zero(t), 5, 5) g = fill(zero(t), 5) @@ -774,7 +774,7 @@ end function alg_cache(alg::VCABM4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) rk3 = zero(rate_prototype) @@ -857,7 +857,7 @@ end function alg_cache(alg::VCABM5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(t), 5) c = fill(zero(t), 6, 6) g = fill(zero(t), 6) @@ -880,7 +880,7 @@ end function alg_cache(alg::VCABM5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} rk1 = zero(rate_prototype) rk2 = zero(rate_prototype) rk3 = zero(rate_prototype) @@ -972,7 +972,7 @@ end function alg_cache(alg::VCABM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 13) c = fill(zero(t), 13, 13) g = fill(zero(t), 13) @@ -997,7 +997,7 @@ end function alg_cache(alg::VCABM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) k4 = zero(rate_prototype) dts = fill(zero(dt), 13) diff --git a/lib/OrdinaryDiffEqBDF/src/bdf_caches.jl b/lib/OrdinaryDiffEqBDF/src/bdf_caches.jl index 9917964992..6a6c786965 100644 --- a/lib/OrdinaryDiffEqBDF/src/bdf_caches.jl +++ b/lib/OrdinaryDiffEqBDF/src/bdf_caches.jl @@ -14,7 +14,7 @@ end function alg_cache(alg::ABDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(2) // 3, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -44,7 +44,7 @@ end function alg_cache(alg::ABDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(2) // 3, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) @@ -103,7 +103,7 @@ end function alg_cache(alg::SBDF, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(1) // 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -126,7 +126,7 @@ end function alg_cache(alg::SBDF, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(1) // 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) @@ -186,7 +186,7 @@ end function alg_cache(alg::QNDF1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = zero(inv((1 - alg.kappa))), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -207,7 +207,7 @@ end function alg_cache(alg::QNDF1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = zero(inv((1 - alg.kappa))), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) @@ -276,7 +276,7 @@ end function alg_cache(alg::QNDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = zero(inv((1 - alg.kappa))), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -299,7 +299,7 @@ end function alg_cache(alg::QNDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = zero(inv((1 - alg.kappa))), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) @@ -357,7 +357,7 @@ end function alg_cache(alg::QNDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits } where {MO} max_order = MO γ, c = Int64(1)//1, 1 @@ -423,7 +423,7 @@ end function alg_cache(alg::QNDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits } where {MO} max_order = MO γ, c = Int64(1)//1, 1 @@ -482,7 +482,7 @@ end function alg_cache(alg::MEBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) @@ -505,7 +505,7 @@ end function alg_cache(alg::MEBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -539,7 +539,7 @@ end function alg_cache(alg::FBDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits } where {MO} γ, c = Int64(1)//1, 1 max_order = MO @@ -614,7 +614,7 @@ end function alg_cache(alg::FBDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {MO, uEltypeNoUnits, uBottomEltypeNoUnits, + ::Val{true}, verbose) where {MO, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(1)//1, 1 fsalfirst = zero(rate_prototype) diff --git a/lib/OrdinaryDiffEqBDF/src/dae_caches.jl b/lib/OrdinaryDiffEqBDF/src/dae_caches.jl index 1c7383dc08..346af26d9d 100644 --- a/lib/OrdinaryDiffEqBDF/src/dae_caches.jl +++ b/lib/OrdinaryDiffEqBDF/src/dae_caches.jl @@ -24,7 +24,7 @@ end function alg_cache(alg::DImplicitEuler, du, u, res_prototype, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 α = 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, @@ -36,7 +36,7 @@ end function alg_cache(alg::DImplicitEuler, du, u, res_prototype, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 α = 1 k₁ = zero(rate_prototype) @@ -62,7 +62,7 @@ function alg_cache(alg::DABDF2, du, u, res_prototype, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(1) // 1, 1 α = Int64(1) // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, @@ -91,7 +91,7 @@ end function alg_cache(alg::DABDF2, du, u, res_prototype, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(1) // 1, 1 α = Int64(1) // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, @@ -140,7 +140,7 @@ end function alg_cache(alg::DFBDF{MO}, du, u, res_prototype, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, - uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{false}) where {MO} + uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{false}, verbose) where {MO} γ, c = 1.0, 1.0 max_order = MO nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -211,7 +211,7 @@ end function alg_cache(alg::DFBDF{MO}, du, u, res_prototype, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {MO} + ::Val{true}, verbose) where {MO} γ, c = 1.0, 1.0 fsalfirst = zero(rate_prototype) max_order = MO diff --git a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl index 5b97865624..12ccd639a3 100644 --- a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl +++ b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl @@ -59,7 +59,7 @@ end function alg_cache(alg::CompositeAlgorithm, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{V}) where {V, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{V}, verbose) where {V, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} caches = __alg_cache(alg.algs, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(V)) CompositeCache(caches, alg.choice_function, 1) @@ -68,7 +68,7 @@ end function alg_cache(alg::CompositeAlgorithm{CS, Tuple{A1, A2, A3, A4, A5, A6}}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{V}) where { + ::Val{V}, verbose) where { CS, V, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, A1, A2, A3, A4, A5, A6} args = (u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, diff --git a/lib/OrdinaryDiffEqExplicitRK/src/explicit_rk_caches.jl b/lib/OrdinaryDiffEqExplicitRK/src/explicit_rk_caches.jl index 943bbb4d64..fef7c657b5 100644 --- a/lib/OrdinaryDiffEqExplicitRK/src/explicit_rk_caches.jl +++ b/lib/OrdinaryDiffEqExplicitRK/src/explicit_rk_caches.jl @@ -16,7 +16,7 @@ get_fsalfirstlast(cache::ExplicitRKCache, u) = (cache.kk[1], cache.fsallast) function alg_cache(alg::ExplicitRK, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} kk = Vector{typeof(rate_prototype)}(undef, 0) for i in 1:(alg.tableau.stages) push!(kk, zero(rate_prototype)) @@ -55,6 +55,6 @@ end function alg_cache(alg::ExplicitRK, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ExplicitRKConstantCache(alg.tableau, rate_prototype) end diff --git a/lib/OrdinaryDiffEqExponentialRK/src/exponential_rk_caches.jl b/lib/OrdinaryDiffEqExponentialRK/src/exponential_rk_caches.jl index bf1891e40a..b3c6039b17 100644 --- a/lib/OrdinaryDiffEqExponentialRK/src/exponential_rk_caches.jl +++ b/lib/OrdinaryDiffEqExponentialRK/src/exponential_rk_caches.jl @@ -76,7 +76,7 @@ for (Alg, Cache) in [(:LawsonEuler, :LawsonEulerConstantCache), @eval function alg_cache(alg::$Alg, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if alg.krylov ops = nothing # no caching @@ -161,7 +161,7 @@ end function alg_cache(alg::LawsonEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, G, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # other caches @@ -218,7 +218,7 @@ end function alg_cache(alg::NorsettEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, G, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches plist = (1,) @@ -250,7 +250,7 @@ end function alg_cache(alg::ETDRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, F2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches plist = (2, 2) @@ -283,7 +283,7 @@ end function alg_cache(alg::ETDRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, Au, F2, F3, du1 = (zero(rate_prototype) for i in 1:5) # rateType caches plist = (1, 3, 3, 3) @@ -317,7 +317,7 @@ end function alg_cache(alg::ETDRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, Au, F2, F3, F4, du1 = (zero(rate_prototype) for i in 1:6) # rateType caches plist = (1, 1, 3, 3, 3, 3) @@ -354,7 +354,7 @@ end function alg_cache(alg::HochOst4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, Au, F2, F3, F4, F5, du1 = (zero(rate_prototype) for i in 1:8) # rateType caches plist = (3, 3, 3, 3, 3, 3, 3, 3, 3) @@ -394,7 +394,7 @@ for (Alg, Cache) in [(:Exp4, :Exp4ConstantCache), @eval function alg_cache(alg::$Alg, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if SciMLBase.has_jac(f) uf = nothing @@ -424,7 +424,7 @@ end function alg_cache(alg::Exp4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -471,7 +471,7 @@ end function alg_cache(alg::EPIRK4s3A, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -517,7 +517,7 @@ end function alg_cache(alg::EPIRK4s3B, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -563,7 +563,7 @@ end function alg_cache(alg::EPIRK5s3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz, k = (zero(u) for i in 1:3) # uType caches rtmp, rtmp2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -608,7 +608,7 @@ end function alg_cache(alg::EXPRB53s3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -654,7 +654,7 @@ end function alg_cache(alg::EPIRK5P1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -701,7 +701,7 @@ end function alg_cache(alg::EPIRK5P2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp, dz = (zero(u) for i in 1:2) # uType caches rtmp, rtmp2, dR, du1 = (zero(rate_prototype) for i in 1:4) # rateType caches # Allocate jacobian and caches for ForwardDiff @@ -740,7 +740,7 @@ for (Alg, Cache) in [(:Exprb32, :Exprb32ConstantCache), @eval function alg_cache(alg::$Alg, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if SciMLBase.has_jac(f) uf = nothing @@ -808,7 +808,7 @@ end function alg_cache(alg::Exprb32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} utilde, tmp, dz = (zero(u) for i in 1:3) # uType caches rtmp, F2, du1 = (zero(rate_prototype) for i in 1:3) # rateType caches plist = (3, 3) @@ -838,7 +838,7 @@ end function alg_cache(alg::Exprb43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} utilde, tmp, dz = (zero(u) for i in 1:3) # uType caches rtmp, Au, F2, F3, du1 = (zero(rate_prototype) for i in 1:5) # rateType caches plist = (1, 4, 4, 4) @@ -896,7 +896,7 @@ get_fsalfirstlast(cache::ETD2ConstantCache, u) = (ETD2Fsal(u), ETD2Fsal(u)) function alg_cache(alg::ETD2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} A = size(f.f1.f) == () ? convert(Number, f.f1.f) : convert(AbstractMatrix, f.f1.f) Phi = phi(dt * A, 2) ETD2ConstantCache(Phi[1], Phi[2], Phi[2] + Phi[3], -Phi[3]) @@ -918,7 +918,7 @@ get_fsalfirstlast(cache::ETD2Cache, u) = (ETD2Fsal(cache.rtmp1), ETD2Fsal(cache. function alg_cache(alg::ETD2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} A = size(f.f1.f) == () ? convert(Number, f.f1.f) : convert(AbstractMatrix, f.f1.f) Phi = phi(dt * A, 2) ETD2Cache( diff --git a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl index b557a55879..7dd6f3671b 100644 --- a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl +++ b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl @@ -44,7 +44,7 @@ end function alg_cache(alg::AitkenNeville, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) utilde = zero(u) k = zero(rate_prototype) @@ -80,7 +80,7 @@ end function alg_cache(alg::AitkenNeville, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dtpropose = zero(dt) cur_order = max(alg.init_order, alg.min_order) T = Array{typeof(u), 2}(undef, alg.max_order, alg.max_order) @@ -162,7 +162,7 @@ end function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dtpropose = zero(dt) #cur_order = max(alg.init_order, alg.min_order) QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. SciMLBase.__init in solve.jl @@ -200,7 +200,7 @@ end function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u_tmp = zero(u) u_tmps = Array{typeof(u_tmp), 1}(undef, get_thread_count(alg)) @@ -907,7 +907,7 @@ end function alg_cache(alg::ExtrapolationMidpointDeuflhard, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. SciMLBase.__init in solve.jl @@ -959,7 +959,7 @@ end function alg_cache(alg::ExtrapolationMidpointDeuflhard, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) u_temp1 = zero(u) @@ -1057,7 +1057,7 @@ end function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. SciMLBase.__init in solve.jl @@ -1099,7 +1099,7 @@ end function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} utilde = zero(u) u_temp1 = zero(u) u_temp2 = zero(u) @@ -1212,7 +1212,7 @@ end function alg_cache(alg::ExtrapolationMidpointHairerWanner, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. SciMLBase.__init in solve.jl @@ -1273,7 +1273,7 @@ end function alg_cache(alg::ExtrapolationMidpointHairerWanner, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) u_temp1 = zero(u) @@ -1333,7 +1333,7 @@ end function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. SciMLBase.__init in solve.jl @@ -1430,7 +1430,7 @@ end function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) u_temp1 = zero(u) @@ -1548,7 +1548,7 @@ end function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members QType = tTypeNoUnits <: Integer ? typeof(qmin_default(alg)) : tTypeNoUnits # Cf. SciMLBase.__init in solve.jl @@ -1628,7 +1628,7 @@ end function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} # Initialize cache's members utilde = zero(u) u_temp1 = zero(u) diff --git a/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl b/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl index 4d0160328b..dd88415a36 100644 --- a/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl +++ b/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl @@ -19,7 +19,7 @@ end function alg_cache(alg::RadauIIA3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UDerivativeWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA3Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -69,7 +69,7 @@ end function alg_cache(alg::RadauIIA3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UJacobianWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA3Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -141,7 +141,7 @@ end function alg_cache(alg::RadauIIA5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UDerivativeWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA5Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -200,7 +200,7 @@ end function alg_cache(alg::RadauIIA5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UJacobianWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA5Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -289,7 +289,7 @@ end function alg_cache(alg::RadauIIA9, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UDerivativeWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA9Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -369,7 +369,7 @@ end function alg_cache(alg::RadauIIA9, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UJacobianWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) tab = RadauIIA9Tableau(uToltype, constvalue(tTypeNoUnits)) @@ -488,7 +488,7 @@ end function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UDerivativeWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) @@ -568,7 +568,7 @@ end function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} uf = UJacobianWrapper(f, t, p) uToltype = constvalue(uBottomEltypeNoUnits) diff --git a/lib/OrdinaryDiffEqFeagin/src/feagin_caches.jl b/lib/OrdinaryDiffEqFeagin/src/feagin_caches.jl index e350b35725..ae02777304 100644 --- a/lib/OrdinaryDiffEqFeagin/src/feagin_caches.jl +++ b/lib/OrdinaryDiffEqFeagin/src/feagin_caches.jl @@ -32,7 +32,7 @@ end function alg_cache(alg::Feagin10, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Feagin10ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -63,7 +63,7 @@ end function alg_cache(alg::Feagin10, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Feagin10ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -106,7 +106,7 @@ end function alg_cache(alg::Feagin12, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Feagin12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -146,7 +146,7 @@ end function alg_cache(alg::Feagin12, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Feagin12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -199,7 +199,7 @@ end function alg_cache(alg::Feagin14, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Feagin14ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -250,6 +250,6 @@ end function alg_cache(alg::Feagin14, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Feagin14ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqFunctionMap/src/functionmap_caches.jl b/lib/OrdinaryDiffEqFunctionMap/src/functionmap_caches.jl index a2b03c0818..276691e6f5 100644 --- a/lib/OrdinaryDiffEqFunctionMap/src/functionmap_caches.jl +++ b/lib/OrdinaryDiffEqFunctionMap/src/functionmap_caches.jl @@ -8,7 +8,7 @@ get_fsalfirstlast(cache::FunctionMapCache, u) = (nothing, nothing) function alg_cache(alg::FunctionMap, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FunctionMapCache(u, uprev, FunctionMap_scale_by_time(alg) ? rate_prototype : (eltype(u) <: Enum ? copy(u) : zero(u))) @@ -19,7 +19,7 @@ struct FunctionMapConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::FunctionMap, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FunctionMapConstantCache() end diff --git a/lib/OrdinaryDiffEqHighOrderRK/src/high_order_rk_caches.jl b/lib/OrdinaryDiffEqHighOrderRK/src/high_order_rk_caches.jl index 3aed829fb2..7285d3888d 100644 --- a/lib/OrdinaryDiffEqHighOrderRK/src/high_order_rk_caches.jl +++ b/lib/OrdinaryDiffEqHighOrderRK/src/high_order_rk_caches.jl @@ -28,7 +28,7 @@ end function alg_cache(alg::TanYam7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = TanYam7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -52,7 +52,7 @@ end function alg_cache(alg::TanYam7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} TanYam7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -97,7 +97,7 @@ get_fsalfirstlast(cache::DP8Cache, u) = (cache.k1, cache.k13) function alg_cache(alg::DP8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -138,7 +138,7 @@ end function alg_cache(alg::DP8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DP8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -173,7 +173,7 @@ end function alg_cache(alg::TsitPap8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = TsitPap8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -200,7 +200,7 @@ end function alg_cache(alg::TsitPap8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} TsitPap8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -236,7 +236,7 @@ end function alg_cache(alg::PFRK87, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = PFRK87ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -263,6 +263,6 @@ end function alg_cache(alg::PFRK87, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} PFRK87ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqIMEXMultistep/src/imex_multistep_caches.jl b/lib/OrdinaryDiffEqIMEXMultistep/src/imex_multistep_caches.jl index d30425975a..36cbd93ba3 100644 --- a/lib/OrdinaryDiffEqIMEXMultistep/src/imex_multistep_caches.jl +++ b/lib/OrdinaryDiffEqIMEXMultistep/src/imex_multistep_caches.jl @@ -30,7 +30,7 @@ end function alg_cache(alg::CNAB2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -45,7 +45,7 @@ end function alg_cache(alg::CNAB2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) @@ -87,7 +87,7 @@ end function alg_cache(alg::CNLF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -103,7 +103,7 @@ end function alg_cache(alg::CNLF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) diff --git a/lib/OrdinaryDiffEqLinear/src/linear_caches.jl b/lib/OrdinaryDiffEqLinear/src/linear_caches.jl index c2867776d1..25caa3f099 100644 --- a/lib/OrdinaryDiffEqLinear/src/linear_caches.jl +++ b/lib/OrdinaryDiffEqLinear/src/linear_caches.jl @@ -16,7 +16,7 @@ end function alg_cache(alg::MagnusMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -30,7 +30,7 @@ end function alg_cache(alg::MagnusMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusMidpointConstantCache() end @@ -48,7 +48,7 @@ end function alg_cache(alg::RKMK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -62,7 +62,7 @@ end function alg_cache(alg::RKMK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKMK2ConstantCache() end @@ -80,7 +80,7 @@ end function alg_cache(alg::LieRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -94,7 +94,7 @@ end function alg_cache(alg::LieRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LieRK4ConstantCache() end @@ -112,7 +112,7 @@ end function alg_cache(alg::CG3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -126,7 +126,7 @@ end function alg_cache(alg::CG3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CG3ConstantCache() end @@ -144,7 +144,7 @@ end function alg_cache(alg::CG2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -158,7 +158,7 @@ end function alg_cache(alg::CG2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CG2ConstantCache() end @@ -204,7 +204,7 @@ end function alg_cache(alg::RKMK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -218,7 +218,7 @@ end function alg_cache(alg::RKMK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKMK4ConstantCache() end @@ -239,7 +239,7 @@ end function alg_cache(alg::MagnusAdapt4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -257,7 +257,7 @@ end function alg_cache(alg::MagnusAdapt4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusAdapt4ConstantCache() end @@ -275,7 +275,7 @@ end function alg_cache(alg::MagnusNC8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -289,7 +289,7 @@ end function alg_cache(alg::MagnusNC8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusNC8ConstantCache() end @@ -307,7 +307,7 @@ end function alg_cache(alg::MagnusGL4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -321,7 +321,7 @@ end function alg_cache(alg::MagnusGL4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGL4ConstantCache() end @@ -339,7 +339,7 @@ end function alg_cache(alg::MagnusGL8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -353,7 +353,7 @@ end function alg_cache(alg::MagnusGL8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGL8ConstantCache() end @@ -371,7 +371,7 @@ end function alg_cache(alg::MagnusNC6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -385,7 +385,7 @@ end function alg_cache(alg::MagnusNC6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusNC6ConstantCache() end @@ -403,7 +403,7 @@ end function alg_cache(alg::MagnusGL6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -417,7 +417,7 @@ end function alg_cache(alg::MagnusGL6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGL6ConstantCache() end @cache struct MagnusGauss4Cache{uType, rateType, WType, expType} <: @@ -435,7 +435,7 @@ end function alg_cache(alg::MagnusGauss4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -449,7 +449,7 @@ end function alg_cache(alg::MagnusGauss4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusGauss4ConstantCache() end @@ -467,7 +467,7 @@ end function alg_cache(alg::LieEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -481,7 +481,7 @@ end function alg_cache(alg::LieEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LieEulerConstantCache() end @@ -497,7 +497,7 @@ end function alg_cache(alg::CayleyEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) fsalfirst = zero(rate_prototype) CayleyEulerCache(u, uprev, zero(u), zero(u), fsalfirst, k) @@ -509,7 +509,7 @@ end function alg_cache(alg::CayleyEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CayleyEulerConstantCache() end @@ -528,7 +528,7 @@ end function alg_cache(alg::MagnusLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} W = false .* _vec(rate_prototype) .* _vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -542,7 +542,7 @@ end function alg_cache(alg::MagnusLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MagnusLeapfrogConstantCache() end @@ -551,7 +551,7 @@ struct LinearExponentialConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::LinearExponential, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LinearExponentialConstantCache() end @@ -582,7 +582,7 @@ end function alg_cache(alg::LinearExponential, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) rtmp = zero(rate_prototype) n = length(u) diff --git a/lib/OrdinaryDiffEqLowOrderRK/src/low_order_rk_caches.jl b/lib/OrdinaryDiffEqLowOrderRK/src/low_order_rk_caches.jl index 95c7f369fe..254215c2a6 100644 --- a/lib/OrdinaryDiffEqLowOrderRK/src/low_order_rk_caches.jl +++ b/lib/OrdinaryDiffEqLowOrderRK/src/low_order_rk_caches.jl @@ -17,7 +17,7 @@ end function alg_cache(alg::SplitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SplitEulerCache(u, uprev, zero(u), zero(rate_prototype), zero(rate_prototype)) end @@ -26,14 +26,14 @@ struct SplitEulerConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::SplitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SplitEulerConstantCache() end function alg_cache(alg::Euler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} EulerCache(u, uprev, zero(u), zero(rate_prototype), zero(rate_prototype)) end @@ -42,7 +42,7 @@ struct EulerConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Euler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} EulerConstantCache() end @@ -81,7 +81,7 @@ end function alg_cache(alg::Heun, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) HeunCache(u, uprev, zero(u), atmp, zero(rate_prototype), @@ -91,7 +91,7 @@ end function alg_cache(alg::Ralston, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) RalstonCache(u, uprev, zero(u), atmp, zero(rate_prototype), @@ -103,7 +103,7 @@ struct HeunConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Heun, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} HeunConstantCache() end @@ -112,7 +112,7 @@ struct RalstonConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Ralston, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RalstonConstantCache() end @@ -140,7 +140,7 @@ struct MidpointConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::Midpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -153,7 +153,7 @@ end function alg_cache(alg::Midpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MidpointConstantCache() end @@ -178,7 +178,7 @@ struct RK4ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::RK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -194,7 +194,7 @@ end function alg_cache(alg::RK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RK4ConstantCache() end @@ -218,7 +218,7 @@ end function alg_cache(alg::BS3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -235,7 +235,7 @@ end function alg_cache(alg::BS3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} BS3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -260,7 +260,7 @@ end function alg_cache(alg::OwrenZen3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = OwrenZen3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -277,7 +277,7 @@ end function alg_cache(alg::OwrenZen3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} OwrenZen3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -304,7 +304,7 @@ end function alg_cache(alg::OwrenZen4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = OwrenZen4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -323,7 +323,7 @@ end function alg_cache(alg::OwrenZen4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} OwrenZen4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -352,7 +352,7 @@ end function alg_cache(alg::OwrenZen5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = OwrenZen5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -373,7 +373,7 @@ end function alg_cache(alg::OwrenZen5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} OwrenZen5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -401,7 +401,7 @@ end function alg_cache(alg::BS5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = BS5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -422,7 +422,7 @@ end function alg_cache(alg::BS5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} BS5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -452,7 +452,7 @@ end function alg_cache(alg::DP5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -485,7 +485,7 @@ end function alg_cache(alg::DP5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DP5ConstantCache() end @@ -520,7 +520,7 @@ end function alg_cache(alg::Anas5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Anas5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -554,7 +554,7 @@ end function alg_cache(alg::Anas5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Anas5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -654,14 +654,14 @@ end function alg_cache(alg::RKO65, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKO65ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) # why not real(tTypeNoUnits)? end function alg_cache(alg::RKO65, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) @@ -917,14 +917,14 @@ end function alg_cache(alg::FRK65, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FRK65ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::FRK65, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = FRK65ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -1019,14 +1019,14 @@ end function alg_cache(alg::RKM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::RKM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = RKMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k = zero(rate_prototype) k1 = zero(rate_prototype) @@ -1066,14 +1066,14 @@ end function alg_cache(alg::MSRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return MSRK5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::MSRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1116,14 +1116,14 @@ end function alg_cache(alg::MSRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return MSRK6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::MSRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1161,7 +1161,7 @@ end function alg_cache(alg::PSRK4p7q6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return PSRK4p7q6ConstantCache( constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1169,7 +1169,7 @@ end function alg_cache(alg::PSRK4p7q6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1201,7 +1201,7 @@ end function alg_cache(alg::PSRK3p6q5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return PSRK3p6q5ConstantCache( constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1209,7 +1209,7 @@ end function alg_cache(alg::PSRK3p6q5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1239,7 +1239,7 @@ end function alg_cache(alg::PSRK3p5q4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return PSRK3p5q4ConstantCache( constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1247,7 +1247,7 @@ end function alg_cache(alg::PSRK3p5q4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1281,7 +1281,7 @@ end function alg_cache(alg::Stepanov5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Stepanov5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1289,7 +1289,7 @@ end function alg_cache(alg::Stepanov5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1343,14 +1343,14 @@ end function alg_cache(alg::SIR54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return SIR54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::SIR54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1386,14 +1386,14 @@ end function alg_cache(alg::Alshina2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Alshina2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::Alshina2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) utilde = zero(u) @@ -1424,14 +1424,14 @@ end function alg_cache(alg::Alshina3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Alshina3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::Alshina3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -1465,14 +1465,14 @@ end function alg_cache(alg::Alshina6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Alshina6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::Alshina6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) diff --git a/lib/OrdinaryDiffEqLowStorageRK/src/low_storage_rk_caches.jl b/lib/OrdinaryDiffEqLowStorageRK/src/low_storage_rk_caches.jl index 41a85c5726..269df041d8 100644 --- a/lib/OrdinaryDiffEqLowStorageRK/src/low_storage_rk_caches.jl +++ b/lib/OrdinaryDiffEqLowStorageRK/src/low_storage_rk_caches.jl @@ -48,7 +48,7 @@ end function alg_cache(alg::ORK256, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ORK256ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) williamson_condition = alg.williamson_condition @@ -69,14 +69,14 @@ end function alg_cache(alg::ORK256, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ORK256ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::RK46NL, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RK46NLConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -122,7 +122,7 @@ end function alg_cache(alg::RK46NL, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -256,14 +256,14 @@ end function alg_cache(alg::SHLDDRK_2N, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SHLDDRK_2NConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::SHLDDRK_2N, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -322,14 +322,14 @@ end function alg_cache(alg::SHLDDRK52, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SHLDDRK52ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::SHLDDRK52, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -341,7 +341,7 @@ end function alg_cache(alg::CarpenterKennedy2N54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = CarpenterKennedy2N54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -363,7 +363,7 @@ end function alg_cache(alg::CarpenterKennedy2N54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CarpenterKennedy2N54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -398,7 +398,7 @@ end function alg_cache(alg::SHLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SHLDDRK64ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) williamson_condition = alg.williamson_condition @@ -419,7 +419,7 @@ end function alg_cache(alg::SHLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SHLDDRK64ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -455,7 +455,7 @@ end function alg_cache(alg::DGLDDRK73_C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = DGLDDRK73_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -477,7 +477,7 @@ end function alg_cache(alg::DGLDDRK73_C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DGLDDRK73_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -516,7 +516,7 @@ end function alg_cache(alg::DGLDDRK84_C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = DGLDDRK84_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -538,7 +538,7 @@ end function alg_cache(alg::DGLDDRK84_C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DGLDDRK84_CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -577,7 +577,7 @@ end function alg_cache(alg::DGLDDRK84_F, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = DGLDDRK84_FConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -599,7 +599,7 @@ end function alg_cache(alg::DGLDDRK84_F, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DGLDDRK84_FConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -650,7 +650,7 @@ end function alg_cache(alg::NDBLSRK124, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = NDBLSRK124ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -672,7 +672,7 @@ end function alg_cache(alg::NDBLSRK124, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} NDBLSRK124ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -726,7 +726,7 @@ end function alg_cache(alg::NDBLSRK134, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = NDBLSRK134ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -748,7 +748,7 @@ end function alg_cache(alg::NDBLSRK134, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} NDBLSRK134ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -805,7 +805,7 @@ end function alg_cache(alg::NDBLSRK144, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = NDBLSRK144ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) tmp = zero(u) @@ -827,7 +827,7 @@ end function alg_cache(alg::NDBLSRK144, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} NDBLSRK144ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -881,7 +881,7 @@ end function alg_cache(alg::CFRLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -898,7 +898,7 @@ end function alg_cache(alg::CFRLDDRK64, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CFRLDDRK64ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -934,7 +934,7 @@ end function alg_cache(alg::TSLDDRK74, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -950,7 +950,7 @@ end function alg_cache(alg::TSLDDRK74, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} TSLDDRK74ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1011,7 +1011,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1028,7 +1028,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S32ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1095,7 +1095,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S82, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1112,7 +1112,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S82, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S82ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1161,7 +1161,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S53, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1178,7 +1178,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S53, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S53ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1308,7 +1308,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S173, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1325,7 +1325,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S173, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S173ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1398,7 +1398,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S94, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1415,7 +1415,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S94, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S94ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1551,7 +1551,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S184, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1568,7 +1568,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S184, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S184ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1647,7 +1647,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S105, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1664,7 +1664,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S105, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S105ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1812,7 +1812,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S205, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1829,7 +1829,7 @@ end function alg_cache(alg::ParsaniKetchesonDeconinck3S205, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ParsaniKetchesonDeconinck3S205ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1930,7 +1930,7 @@ end function alg_cache(alg::RDPK3Sp35, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -1954,7 +1954,7 @@ end function alg_cache(alg::RDPK3Sp35, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3Sp35ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2060,7 +2060,7 @@ end function alg_cache(alg::RDPK3Sp49, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -2084,7 +2084,7 @@ end function alg_cache(alg::RDPK3Sp49, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3Sp49ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2200,7 +2200,7 @@ end function alg_cache(alg::RDPK3Sp510, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -2225,7 +2225,7 @@ end function alg_cache(alg::RDPK3Sp510, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3Sp510ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2328,7 +2328,7 @@ end function alg_cache(alg::RDPK3SpFSAL35, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -2352,7 +2352,7 @@ end function alg_cache(alg::RDPK3SpFSAL35, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3SpFSAL35ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2459,7 +2459,7 @@ end function alg_cache(alg::RDPK3SpFSAL49, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -2483,7 +2483,7 @@ end function alg_cache(alg::RDPK3SpFSAL49, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3SpFSAL49ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2600,7 +2600,7 @@ end function alg_cache(alg::RDPK3SpFSAL510, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(rate_prototype) @@ -2624,7 +2624,7 @@ end function alg_cache(alg::RDPK3SpFSAL510, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RDPK3SpFSAL510ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2686,7 +2686,7 @@ end function alg_cache(alg::CKLLSRK43_2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2706,7 +2706,7 @@ end function alg_cache(alg::CKLLSRK43_2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK43_2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2749,7 +2749,7 @@ end function alg_cache(alg::CKLLSRK54_3C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2769,7 +2769,7 @@ end function alg_cache(alg::CKLLSRK54_3C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2836,7 +2836,7 @@ end function alg_cache(alg::CKLLSRK95_4S, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2856,7 +2856,7 @@ end function alg_cache(alg::CKLLSRK95_4S, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK95_4SConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -2923,7 +2923,7 @@ end function alg_cache(alg::CKLLSRK95_4C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -2943,7 +2943,7 @@ end function alg_cache(alg::CKLLSRK95_4C, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK95_4CConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3010,7 +3010,7 @@ end function alg_cache(alg::CKLLSRK95_4M, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3030,7 +3030,7 @@ end function alg_cache(alg::CKLLSRK95_4M, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK95_4MConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3109,7 +3109,7 @@ end function alg_cache(alg::CKLLSRK54_3C_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3132,7 +3132,7 @@ end function alg_cache(alg::CKLLSRK54_3C_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3C_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3180,7 +3180,7 @@ end function alg_cache(alg::CKLLSRK54_3M_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3203,7 +3203,7 @@ end function alg_cache(alg::CKLLSRK54_3M_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3M_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3252,7 +3252,7 @@ end function alg_cache(alg::CKLLSRK54_3N_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3275,7 +3275,7 @@ end function alg_cache(alg::CKLLSRK54_3N_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3N_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3345,7 +3345,7 @@ end function alg_cache(alg::CKLLSRK85_4C_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3368,7 +3368,7 @@ end function alg_cache(alg::CKLLSRK85_4C_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4C_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3438,7 +3438,7 @@ end function alg_cache(alg::CKLLSRK85_4M_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3461,7 +3461,7 @@ end function alg_cache(alg::CKLLSRK85_4M_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4M_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3531,7 +3531,7 @@ end function alg_cache(alg::CKLLSRK85_4P_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3554,7 +3554,7 @@ end function alg_cache(alg::CKLLSRK85_4P_3R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4P_3RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3642,7 +3642,7 @@ end function alg_cache(alg::CKLLSRK54_3N_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3667,7 +3667,7 @@ end function alg_cache(alg::CKLLSRK54_3N_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3N_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3717,7 +3717,7 @@ end function alg_cache(alg::CKLLSRK54_3M_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3742,7 +3742,7 @@ end function alg_cache(alg::CKLLSRK54_3M_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK54_3M_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3805,7 +3805,7 @@ end function alg_cache(alg::CKLLSRK65_4M_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3830,7 +3830,7 @@ end function alg_cache(alg::CKLLSRK65_4M_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK65_4M_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -3909,7 +3909,7 @@ end function alg_cache(alg::CKLLSRK85_4FM_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -3934,7 +3934,7 @@ end function alg_cache(alg::CKLLSRK85_4FM_4R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK85_4FM_4RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -4050,7 +4050,7 @@ end function alg_cache(alg::CKLLSRK75_4M_5R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -4078,6 +4078,6 @@ end function alg_cache(alg::CKLLSRK75_4M_5R, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CKLLSRK75_4M_5RConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqNordsieck/src/nordsieck_caches.jl b/lib/OrdinaryDiffEqNordsieck/src/nordsieck_caches.jl index a9ecb45215..7047cbffd5 100644 --- a/lib/OrdinaryDiffEqNordsieck/src/nordsieck_caches.jl +++ b/lib/OrdinaryDiffEqNordsieck/src/nordsieck_caches.jl @@ -22,7 +22,7 @@ end function alg_cache(alg::AN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} N = 5 z = [zero(rate_prototype) for i in 1:(N + 1)] Δ = u @@ -63,7 +63,7 @@ end function alg_cache(alg::AN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ################################################# # Tsit5 # Cannot alias pointers, since we have to use `k`s to start the Nordsieck vector @@ -142,7 +142,7 @@ end function alg_cache(alg::JVODE, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} N = 12 z = [rate_prototype for i in 1:(N + 1)] Δ = u @@ -214,7 +214,7 @@ end function alg_cache(alg::JVODE, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ################################################# # Tsit5 # Cannot alias pointers, since we have to use `k`s to start the Nordsieck vector diff --git a/lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl b/lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl index 2818424697..2df80a956b 100644 --- a/lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl +++ b/lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl @@ -51,7 +51,7 @@ end function alg_cache(alg::PDIRK44, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 if alg.threading nlsolver1 = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, @@ -76,7 +76,7 @@ end function alg_cache(alg::PDIRK44, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 if alg.threading nlsolver1 = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, diff --git a/lib/OrdinaryDiffEqPRK/src/prk_caches.jl b/lib/OrdinaryDiffEqPRK/src/prk_caches.jl index 059fffcbaa..60e5330fcc 100644 --- a/lib/OrdinaryDiffEqPRK/src/prk_caches.jl +++ b/lib/OrdinaryDiffEqPRK/src/prk_caches.jl @@ -66,7 +66,7 @@ end function alg_cache(alg::KuttaPRK2p5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) k1 = zero(rate_prototype) @@ -85,6 +85,6 @@ end function alg_cache(alg::KuttaPRK2p5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KuttaPRK2p5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqQPRK/src/qprk_caches.jl b/lib/OrdinaryDiffEqQPRK/src/qprk_caches.jl index 8ceb2bc451..0ff3da098e 100644 --- a/lib/OrdinaryDiffEqQPRK/src/qprk_caches.jl +++ b/lib/OrdinaryDiffEqQPRK/src/qprk_caches.jl @@ -35,7 +35,7 @@ get_fsalfirstlast(cache::QPRK98Cache, u) = (cache.fsalfirst, cache.k) function alg_cache(alg::QPRK98, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -65,6 +65,6 @@ end function alg_cache(::QPRK98, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} QPRK98ConstantCache() end diff --git a/lib/OrdinaryDiffEqRKN/src/rkn_caches.jl b/lib/OrdinaryDiffEqRKN/src/rkn_caches.jl index e259a1e6ed..e243ef97e9 100644 --- a/lib/OrdinaryDiffEqRKN/src/rkn_caches.jl +++ b/lib/OrdinaryDiffEqRKN/src/rkn_caches.jl @@ -17,7 +17,7 @@ end function alg_cache(alg::Nystrom4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) k₂ = zero(reduced_rate_prototype) @@ -33,7 +33,7 @@ struct Nystrom4ConstantCache <: NystromConstantCache end function alg_cache(alg::Nystrom4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Nystrom4ConstantCache() end @@ -58,7 +58,7 @@ end function alg_cache(alg::FineRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = FineRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -77,7 +77,7 @@ end function alg_cache(alg::FineRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FineRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -102,7 +102,7 @@ end function alg_cache(alg::FineRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = FineRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -123,7 +123,7 @@ end function alg_cache(alg::FineRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} FineRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -141,7 +141,7 @@ end function alg_cache(alg::Nystrom4VelocityIndependent, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) k₂ = zero(reduced_rate_prototype) @@ -156,7 +156,7 @@ struct Nystrom4VelocityIndependentConstantCache <: NystromConstantCache end function alg_cache(alg::Nystrom4VelocityIndependent, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Nystrom4VelocityIndependentConstantCache() end @@ -176,7 +176,7 @@ end function alg_cache(alg::IRKN3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -191,7 +191,7 @@ end function alg_cache(alg::IRKN3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} IRKN3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -212,7 +212,7 @@ end function alg_cache(alg::IRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -228,7 +228,7 @@ end function alg_cache(alg::IRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} IRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -248,7 +248,7 @@ end function alg_cache(alg::Nystrom5VelocityIndependent, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) k₂ = zero(reduced_rate_prototype) @@ -264,7 +264,7 @@ end function alg_cache(alg::Nystrom5VelocityIndependent, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Nystrom5VelocityIndependentConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -287,7 +287,7 @@ end function alg_cache(alg::DPRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -305,7 +305,7 @@ end function alg_cache(alg::DPRKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -329,7 +329,7 @@ end function alg_cache(alg::DPRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -349,7 +349,7 @@ end function alg_cache(alg::DPRKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -373,7 +373,7 @@ end function alg_cache(alg::DPRKN6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -393,7 +393,7 @@ end function alg_cache(alg::DPRKN6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -417,7 +417,7 @@ end function alg_cache(alg::DPRKN6FM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN6FMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -437,7 +437,7 @@ end function alg_cache(alg::DPRKN6FM, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN6FMConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -464,7 +464,7 @@ end function alg_cache(alg::DPRKN8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -487,7 +487,7 @@ end function alg_cache(alg::DPRKN8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -522,7 +522,7 @@ end function alg_cache(alg::DPRKN12, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = DPRKN12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -555,7 +555,7 @@ end function alg_cache(alg::DPRKN12, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} DPRKN12ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -577,7 +577,7 @@ end function alg_cache(alg::ERKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = ERKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -595,7 +595,7 @@ end function alg_cache(alg::ERKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ERKN4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -617,7 +617,7 @@ end function alg_cache(alg::ERKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = ERKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -635,7 +635,7 @@ end function alg_cache(alg::ERKN5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ERKN5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -660,7 +660,7 @@ end function alg_cache(alg::ERKN7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] tab = ERKN7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) @@ -681,7 +681,7 @@ end function alg_cache(alg::ERKN7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ERKN7ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -698,7 +698,7 @@ end function alg_cache(alg::RKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} reduced_rate_prototype = rate_prototype.x[2] k₁ = zero(rate_prototype) k₂ = zero(reduced_rate_prototype) @@ -713,6 +713,6 @@ struct RKN4ConstantCache <: NystromConstantCache end function alg_cache(alg::RKN4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKN4ConstantCache() end diff --git a/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl b/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl index b9d3606df5..cece9f0a3a 100644 --- a/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl +++ b/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl @@ -131,7 +131,7 @@ end function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -181,7 +181,7 @@ end function alg_cache(alg::Rosenbrock32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) k₃ = zero(rate_prototype) @@ -247,7 +247,7 @@ end function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -277,7 +277,7 @@ end function alg_cache(alg::Rosenbrock32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -337,7 +337,7 @@ end function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} du = zero(rate_prototype) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -382,7 +382,7 @@ end function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -427,7 +427,7 @@ end function alg_cache(alg::Rodas3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} du = zero(rate_prototype) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -484,7 +484,7 @@ end function alg_cache(alg::Rodas3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -622,7 +622,7 @@ end function alg_cache(alg::Rodas23W, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) dense3 = zero(rate_prototype) @@ -672,7 +672,7 @@ end function alg_cache(alg::Rodas3P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dense1 = zero(rate_prototype) dense2 = zero(rate_prototype) dense3 = zero(rate_prototype) @@ -722,7 +722,7 @@ end function alg_cache(alg::Rodas23W, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -737,7 +737,7 @@ end function alg_cache(alg::Rodas3P, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -766,7 +766,7 @@ function alg_cache( u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tf = TimeDerivativeWrapper(f, u, p) uf = UDerivativeWrapper(f, t, p) J, W = build_J_W(alg, u, uprev, p, t, dt, f, nothing, uEltypeNoUnits, Val(false)) @@ -783,7 +783,7 @@ function alg_cache( u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = tabtype(alg)(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) # Initialize vectors dense = [zero(rate_prototype) for _ in 1:size(tab.H, 1)] diff --git a/lib/OrdinaryDiffEqSDIRK/src/kencarp_kvaerno_caches.jl b/lib/OrdinaryDiffEqSDIRK/src/kencarp_kvaerno_caches.jl index 4a09a83fed..c37dcea549 100644 --- a/lib/OrdinaryDiffEqSDIRK/src/kencarp_kvaerno_caches.jl +++ b/lib/OrdinaryDiffEqSDIRK/src/kencarp_kvaerno_caches.jl @@ -6,7 +6,7 @@ end function alg_cache(alg::Kvaerno3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Kvaerno3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, 2tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -32,7 +32,7 @@ end function alg_cache(alg::Kvaerno3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Kvaerno3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, 2tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -58,7 +58,7 @@ end function alg_cache(alg::KenCarp3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -90,7 +90,7 @@ end function alg_cache(alg::KenCarp3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -129,7 +129,7 @@ end function alg_cache(alg::CFNLIRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = CFNLIRK3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -159,7 +159,7 @@ end function alg_cache(alg::CFNLIRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = CFNLIRK3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -189,7 +189,7 @@ end function alg_cache(alg::Kvaerno4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Kvaerno4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -216,7 +216,7 @@ end function alg_cache(alg::Kvaerno4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Kvaerno4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -243,7 +243,7 @@ end function alg_cache(alg::KenCarp4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -280,7 +280,7 @@ end function alg_cache(alg::KenCarp4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -326,7 +326,7 @@ end function alg_cache(alg::Kvaerno5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Kvaerno5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -356,7 +356,7 @@ end function alg_cache(alg::Kvaerno5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Kvaerno5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -385,7 +385,7 @@ end function alg_cache(alg::KenCarp5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -425,7 +425,7 @@ end function alg_cache(alg::KenCarp5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -475,7 +475,7 @@ end function alg_cache(alg::KenCarp47, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp47Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -512,7 +512,7 @@ end function alg_cache(alg::KenCarp47, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp47Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -559,7 +559,7 @@ end function alg_cache(alg::KenCarp58, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp58Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -599,7 +599,7 @@ end function alg_cache(alg::KenCarp58, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = KenCarp58Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, diff --git a/lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl b/lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl index 75a6453fcf..e0da193ff0 100644 --- a/lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl +++ b/lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl @@ -20,7 +20,7 @@ end function alg_cache(alg::ImplicitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) @@ -43,7 +43,7 @@ end function alg_cache(alg::ImplicitEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -57,7 +57,7 @@ end function alg_cache(alg::ImplicitMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 // 2 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -76,7 +76,7 @@ end function alg_cache(alg::ImplicitMidpoint, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 // 2 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) @@ -93,7 +93,7 @@ end function alg_cache(alg::Trapezoid, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -121,7 +121,7 @@ end function alg_cache(alg::Trapezoid, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) @@ -144,7 +144,7 @@ end function alg_cache(alg::TRBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = TRBDF2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.d, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -168,7 +168,7 @@ end function alg_cache(alg::TRBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = TRBDF2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.d, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -190,7 +190,7 @@ end function alg_cache(alg::SDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -212,7 +212,7 @@ end function alg_cache(alg::SDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) @@ -236,7 +236,7 @@ end function alg_cache(alg::SDIRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{tTypeNoUnits}, ::Type{uBottomEltypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SDIRK22Tableau(constvalue(uBottomEltypeNoUnits)) uprev3 = u tprev2 = t @@ -266,7 +266,7 @@ end function alg_cache(alg::SDIRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SDIRK22Tableau(constvalue(uBottomEltypeNoUnits)) γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -289,7 +289,7 @@ end function alg_cache(alg::SSPSDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 4, 1 // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -308,7 +308,7 @@ end function alg_cache(alg::SSPSDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 4, 1 // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) @@ -330,7 +330,7 @@ end function alg_cache(alg::Cash4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Cash4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -355,7 +355,7 @@ end function alg_cache(alg::Cash4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Cash4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -381,7 +381,7 @@ end function alg_cache(alg::SFSDIRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -407,7 +407,7 @@ end function alg_cache(alg::SFSDIRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -433,7 +433,7 @@ end function alg_cache(alg::SFSDIRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -460,7 +460,7 @@ end function alg_cache(alg::SFSDIRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -487,7 +487,7 @@ end function alg_cache(alg::SFSDIRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -514,7 +514,7 @@ end function alg_cache(alg::SFSDIRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -541,7 +541,7 @@ end function alg_cache(alg::SFSDIRK7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK7Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -569,7 +569,7 @@ end function alg_cache(alg::SFSDIRK7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK7Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -597,7 +597,7 @@ end function alg_cache(alg::SFSDIRK8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -626,7 +626,7 @@ end function alg_cache(alg::SFSDIRK8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = SFSDIRK8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -656,7 +656,7 @@ function alg_cache( alg::Union{Hairer4, Hairer42}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if alg isa Hairer4 tab = Hairer4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) else @@ -687,7 +687,7 @@ function alg_cache( alg::Union{Hairer4, Hairer42}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if alg isa Hairer4 tab = Hairer4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) else # Hairer42 @@ -730,7 +730,7 @@ end function alg_cache(alg::ESDIRK54I8L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK54I8L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -761,7 +761,7 @@ end function alg_cache(alg::ESDIRK54I8L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK54I8L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -788,7 +788,7 @@ end function alg_cache(alg::ESDIRK436L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK436L2SA2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -816,7 +816,7 @@ end function alg_cache(alg::ESDIRK436L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK436L2SA2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -844,7 +844,7 @@ end function alg_cache(alg::ESDIRK437L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK437L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -873,7 +873,7 @@ end function alg_cache(alg::ESDIRK437L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK437L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -901,7 +901,7 @@ end function alg_cache(alg::ESDIRK547L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK547L2SA2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -930,7 +930,7 @@ end function alg_cache(alg::ESDIRK547L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK547L2SA2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -961,7 +961,7 @@ function alg_cache(alg::ESDIRK659L2SA, u, rate_prototype, ::Type{uEltypeNoUnits} ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK659L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, @@ -992,7 +992,7 @@ end function alg_cache(alg::ESDIRK659L2SA, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = ESDIRK659L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ diff --git a/lib/OrdinaryDiffEqSIMDRK/src/caches.jl b/lib/OrdinaryDiffEqSIMDRK/src/caches.jl index 82eb59633d..ef47143727 100644 --- a/lib/OrdinaryDiffEqSIMDRK/src/caches.jl +++ b/lib/OrdinaryDiffEqSIMDRK/src/caches.jl @@ -249,7 +249,7 @@ end function alg_cache(alg::MER5v2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MER5v2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -535,7 +535,7 @@ end function alg_cache(alg::MER6v2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} MER6v2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1074,6 +1074,6 @@ end function alg_cache(alg::RK6v4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RK6v4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqSSPRK/src/ssprk_caches.jl b/lib/OrdinaryDiffEqSSPRK/src/ssprk_caches.jl index e38f302891..be7b34521b 100644 --- a/lib/OrdinaryDiffEqSSPRK/src/ssprk_caches.jl +++ b/lib/OrdinaryDiffEqSSPRK/src/ssprk_caches.jl @@ -18,7 +18,7 @@ struct SSPRK22ConstantCache <: SSPRKConstantCache end function alg_cache(alg::SSPRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -31,7 +31,7 @@ end function alg_cache(alg::SSPRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK22ConstantCache() end @@ -51,7 +51,7 @@ struct SSPRK33ConstantCache <: SSPRKConstantCache end function alg_cache(alg::SSPRK33, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -64,7 +64,7 @@ end function alg_cache(alg::SSPRK33, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK33ConstantCache() end @@ -128,7 +128,7 @@ end function alg_cache(alg::KYKSSPRK42, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -142,7 +142,7 @@ end function alg_cache(alg::KYKSSPRK42, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KYKSSPRK42ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -200,7 +200,7 @@ end function alg_cache(alg::SSPRK53, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -216,7 +216,7 @@ end function alg_cache(alg::SSPRK53, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -271,7 +271,7 @@ end function alg_cache(alg::SSPRK53_2N1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -287,7 +287,7 @@ end function alg_cache(alg::SSPRK53_2N1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53_2N1ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -346,7 +346,7 @@ end function alg_cache(alg::SSPRK53_2N2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -362,7 +362,7 @@ end function alg_cache(alg::SSPRK53_2N2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53_2N2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -418,7 +418,7 @@ end function alg_cache(alg::SSPRK53_H, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -434,7 +434,7 @@ end function alg_cache(alg::SSPRK53_H, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK53_HConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -496,7 +496,7 @@ end function alg_cache(alg::SSPRK63, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) u₂ = zero(u) k = zero(rate_prototype) @@ -513,7 +513,7 @@ end function alg_cache(alg::SSPRK63, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK63ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -584,7 +584,7 @@ end function alg_cache(alg::SSPRK73, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) u₁ = zero(u) k = zero(rate_prototype) @@ -601,7 +601,7 @@ end function alg_cache(alg::SSPRK73, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK73ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -678,7 +678,7 @@ end function alg_cache(alg::SSPRK83, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) u₂ = zero(u) u₃ = zero(u) @@ -696,7 +696,7 @@ end function alg_cache(alg::SSPRK83, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK83ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -733,7 +733,7 @@ end function alg_cache(alg::SSPRK43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -751,7 +751,7 @@ end function alg_cache(alg::SSPRK43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK43ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -779,7 +779,7 @@ struct SSPRK432ConstantCache <: SSPRKConstantCache end function alg_cache(alg::SSPRK432, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -796,7 +796,7 @@ end function alg_cache(alg::SSPRK432, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK432ConstantCache() end @@ -833,7 +833,7 @@ end function alg_cache(alg::SSPRKMSVS32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) dts = fill(zero(dt), 3) dtf = fill(zero(dt), 2) @@ -849,7 +849,7 @@ end function alg_cache(alg::SSPRKMSVS32, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} dts = fill(zero(dt), 3) dtf = fill(zero(dt), 2) μ = zero(dt) @@ -896,7 +896,7 @@ end function alg_cache(alg::SSPRKMSVS43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} fsalfirst = zero(rate_prototype) u_3 = zero(u) u_2 = zero(u) @@ -913,7 +913,7 @@ end function alg_cache(alg::SSPRKMSVS43, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u_3 = u u_2 = u u_1 = u @@ -947,7 +947,7 @@ struct SSPRK932ConstantCache <: SSPRKConstantCache end function alg_cache(alg::SSPRK932, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k = zero(rate_prototype) if calck fsalfirst = zero(k) @@ -964,7 +964,7 @@ end function alg_cache(alg::SSPRK932, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK932ConstantCache() end @@ -1034,7 +1034,7 @@ end function alg_cache(alg::SSPRK54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u₂ = zero(u) u₃ = zero(u) tmp = zero(u) @@ -1053,7 +1053,7 @@ end function alg_cache(alg::SSPRK54, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK54ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -1075,7 +1075,7 @@ struct SSPRK104ConstantCache <: SSPRKConstantCache end function alg_cache(alg::SSPRK104, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) if calck @@ -1091,7 +1091,7 @@ end function alg_cache(alg::SSPRK104, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SSPRK104ConstantCache() end @@ -1151,7 +1151,7 @@ end function alg_cache(alg::KYK2014DGSSPRK_3S2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} u_1 = zero(u) u_2 = zero(u) kk_1 = zero(rate_prototype) @@ -1167,7 +1167,7 @@ end function alg_cache(alg::KYK2014DGSSPRK_3S2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KYK2014DGSSPRK_3S2_ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqStabilizedIRK/src/irkc_caches.jl b/lib/OrdinaryDiffEqStabilizedIRK/src/irkc_caches.jl index 60239258c9..6b4297138e 100644 --- a/lib/OrdinaryDiffEqStabilizedIRK/src/irkc_caches.jl +++ b/lib/OrdinaryDiffEqStabilizedIRK/src/irkc_caches.jl @@ -30,7 +30,7 @@ end function alg_cache(alg::IRKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) @@ -43,7 +43,7 @@ end function alg_cache(alg::IRKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) diff --git a/lib/OrdinaryDiffEqStabilizedRK/src/rkc_caches.jl b/lib/OrdinaryDiffEqStabilizedRK/src/rkc_caches.jl index e598d1243c..5df64ad08d 100644 --- a/lib/OrdinaryDiffEqStabilizedRK/src/rkc_caches.jl +++ b/lib/OrdinaryDiffEqStabilizedRK/src/rkc_caches.jl @@ -29,7 +29,7 @@ end function alg_cache(alg::ROCK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ROCK2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits), u) @@ -46,7 +46,7 @@ end function alg_cache(alg::ROCK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ROCK2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits), u) end @@ -81,7 +81,7 @@ end function alg_cache(alg::ROCK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ROCK4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits), u) @@ -99,7 +99,7 @@ end function alg_cache(alg::ROCK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ROCK4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits), u) end @@ -123,7 +123,7 @@ end function alg_cache(alg::RKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = RKCConstantCache(u) gprev = zero(u) gprev2 = zero(u) @@ -138,7 +138,7 @@ end function alg_cache(alg::RKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} RKCConstantCache(u) end @@ -171,7 +171,7 @@ end function alg_cache(alg::ESERK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ESERK4ConstantCache(u) uᵢ = zero(u) uᵢ₋₁ = zero(u) @@ -188,7 +188,7 @@ end function alg_cache(alg::ESERK4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ESERK4ConstantCache(u) end @@ -221,7 +221,7 @@ end function alg_cache(alg::ESERK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = ESERK5ConstantCache(u) uᵢ = zero(u) uᵢ₋₁ = zero(u) @@ -238,7 +238,7 @@ end function alg_cache(alg::ESERK5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ESERK5ConstantCache(u) end @@ -268,7 +268,7 @@ end function alg_cache(alg::SERK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} constantcache = SERK2ConstantCache(u) uᵢ₋₁ = zero(u) uᵢ₋₂ = zero(u) @@ -284,6 +284,6 @@ end function alg_cache(alg::SERK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SERK2ConstantCache(u) end diff --git a/lib/OrdinaryDiffEqSymplecticRK/src/symplectic_caches.jl b/lib/OrdinaryDiffEqSymplecticRK/src/symplectic_caches.jl index e9b0ca838c..7bbb44c2df 100644 --- a/lib/OrdinaryDiffEqSymplecticRK/src/symplectic_caches.jl +++ b/lib/OrdinaryDiffEqSymplecticRK/src/symplectic_caches.jl @@ -12,7 +12,7 @@ end function alg_cache(alg::SymplecticEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SymplecticEulerCache(u, uprev, zero(u), zero(rate_prototype), zero(rate_prototype)) end @@ -21,7 +21,7 @@ struct SymplecticEulerConstantCache <: HamiltonConstantCache end function alg_cache(alg::SymplecticEuler, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SymplecticEulerConstantCache() end @@ -42,7 +42,7 @@ end function alg_cache(alg::VelocityVerlet, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(rate_prototype) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -53,7 +53,7 @@ end function alg_cache(alg::VelocityVerlet, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} VelocityVerletConstantCache(uEltypeNoUnits(1 // 2)) end @@ -74,7 +74,7 @@ end function alg_cache(alg::LeapfrogDriftKickDrift, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(rate_prototype) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -85,7 +85,7 @@ end function alg_cache(alg::LeapfrogDriftKickDrift, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} LeapfrogDriftKickDriftConstantCache(uEltypeNoUnits(1 // 2)) end @@ -106,7 +106,7 @@ end function alg_cache(alg::VerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -117,7 +117,7 @@ end function alg_cache(alg::VerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} VerletLeapfrogConstantCache(uEltypeNoUnits(1 // 2)) end @@ -133,7 +133,7 @@ end function alg_cache(alg::PseudoVerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -145,7 +145,7 @@ end function alg_cache(alg::PseudoVerletLeapfrog, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} PseudoVerletLeapfrogConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -153,7 +153,7 @@ end function alg_cache(alg::McAte2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -164,7 +164,7 @@ end function alg_cache(alg::McAte2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte2ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -180,7 +180,7 @@ end function alg_cache(alg::Ruth3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -191,14 +191,14 @@ end function alg_cache(alg::Ruth3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Ruth3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::McAte3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -209,7 +209,7 @@ end function alg_cache(alg::McAte3, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte3ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -225,7 +225,7 @@ end function alg_cache(alg::McAte4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -236,14 +236,14 @@ end function alg_cache(alg::McAte4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::CandyRoz4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -254,7 +254,7 @@ end function alg_cache(alg::CandyRoz4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -270,7 +270,7 @@ end function alg_cache(alg::CalvoSanz4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -282,14 +282,14 @@ end function alg_cache(alg::CalvoSanz4, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} CalvoSanz4ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end function alg_cache(alg::McAte42, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -300,7 +300,7 @@ end function alg_cache(alg::McAte42, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte42ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -316,7 +316,7 @@ end function alg_cache(alg::McAte5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -327,7 +327,7 @@ end function alg_cache(alg::McAte5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte5ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -343,7 +343,7 @@ end function alg_cache(alg::Yoshida6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -354,7 +354,7 @@ end function alg_cache(alg::Yoshida6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Yoshida6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -370,7 +370,7 @@ end function alg_cache(alg::KahanLi6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -381,7 +381,7 @@ end function alg_cache(alg::KahanLi6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KahanLi6ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -397,7 +397,7 @@ end function alg_cache(alg::McAte8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -408,7 +408,7 @@ end function alg_cache(alg::McAte8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} McAte8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -424,7 +424,7 @@ end function alg_cache(alg::KahanLi8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -435,7 +435,7 @@ end function alg_cache(alg::KahanLi8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} KahanLi8ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end @@ -451,7 +451,7 @@ end function alg_cache(alg::SofSpa10, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tmp = zero(u) k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -462,7 +462,7 @@ end function alg_cache(alg::SofSpa10, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} SofSpa10ConstantCache(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) end diff --git a/lib/OrdinaryDiffEqTaylorSeries/src/TaylorSeries_caches.jl b/lib/OrdinaryDiffEqTaylorSeries/src/TaylorSeries_caches.jl index b07e9e912d..0c15439e57 100644 --- a/lib/OrdinaryDiffEqTaylorSeries/src/TaylorSeries_caches.jl +++ b/lib/OrdinaryDiffEqTaylorSeries/src/TaylorSeries_caches.jl @@ -17,7 +17,7 @@ end function alg_cache(alg::ExplicitTaylor2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -32,7 +32,7 @@ struct ExplicitTaylor2ConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::ExplicitTaylor2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} ExplicitTaylor2ConstantCache() end # FSAL currently not used, providing dummy implementation to satisfy the interface @@ -57,7 +57,7 @@ end function alg_cache(alg::ExplicitTaylor{P}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {P, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {P, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} _, jet_iip = build_jet(f, p, Val(P), length(u)) utaylor = TaylorDiff.make_seed(u, zero(u), Val(P)) utilde = zero(u) @@ -75,7 +75,7 @@ end function alg_cache(::ExplicitTaylor{P}, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {P, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {P, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} if u isa AbstractArray jet, _ = build_jet(f, p, Val(P), length(u)) else diff --git a/lib/OrdinaryDiffEqTsit5/src/tsit_caches.jl b/lib/OrdinaryDiffEqTsit5/src/tsit_caches.jl index 040f9a9869..5f4dd9d25c 100644 --- a/lib/OrdinaryDiffEqTsit5/src/tsit_caches.jl +++ b/lib/OrdinaryDiffEqTsit5/src/tsit_caches.jl @@ -20,7 +20,7 @@ end function alg_cache(alg::Tsit5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = zero(rate_prototype) @@ -41,6 +41,6 @@ get_fsalfirstlast(cache::Tsit5Cache, u) = (cache.k1, cache.k7) function alg_cache(alg::Tsit5, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Tsit5ConstantCache() end diff --git a/lib/OrdinaryDiffEqVerner/src/verner_caches.jl b/lib/OrdinaryDiffEqVerner/src/verner_caches.jl index 5734464a31..8251949b57 100644 --- a/lib/OrdinaryDiffEqVerner/src/verner_caches.jl +++ b/lib/OrdinaryDiffEqVerner/src/verner_caches.jl @@ -28,7 +28,7 @@ get_fsalfirstlast(cache::Vern6Cache, u) = (cache.k1, cache.k9) function alg_cache(alg::Vern6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -56,7 +56,7 @@ end function alg_cache(alg::Vern6, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) Vern6ConstantCache(tab, alg.lazy) end @@ -92,7 +92,7 @@ get_fsalfirstlast(cache::Vern7Cache, u) = (nothing, nothing) function alg_cache(alg::Vern7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = k2 @@ -119,7 +119,7 @@ end function alg_cache(alg::Vern7, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Vern7ConstantCache(alg.lazy) end @@ -158,7 +158,7 @@ get_fsalfirstlast(cache::Vern8Cache, u) = (nothing, nothing) function alg_cache(alg::Vern8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -190,7 +190,7 @@ end function alg_cache(alg::Vern8, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = Vern8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) Vern8ConstantCache(tab, alg.lazy) end @@ -232,7 +232,7 @@ get_fsalfirstlast(cache::Vern9Cache, u) = (nothing, nothing) function alg_cache(alg::Vern9, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} k1 = zero(rate_prototype) k2 = zero(rate_prototype) k3 = k2 @@ -266,7 +266,7 @@ end function alg_cache(alg::Vern9, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} Vern9ConstantCache(alg.lazy) end @@ -302,7 +302,7 @@ get_fsalfirstlast(cache::RKV76IIaCache, u) = (nothing, nothing) function alg_cache(alg::RKV76IIa, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = RKV76IIaTableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) k1 = zero(rate_prototype) k2 = zero(rate_prototype) @@ -331,7 +331,7 @@ end function alg_cache(alg::RKV76IIa, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} tab = RKV76IIaTableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) RKV76IIaConstantCache(tab, alg.lazy) end From 0ea31188985561efd63a5dda4d35f298dd7d78e2 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 10:28:44 -0500 Subject: [PATCH 33/74] thread verbose in to build_nlsolver --- lib/OrdinaryDiffEqBDF/src/bdf_caches.jl | 28 +++---- lib/OrdinaryDiffEqBDF/src/dae_caches.jl | 12 +-- .../src/extrapolation_caches.jl | 16 ++-- lib/OrdinaryDiffEqFIRK/src/firk_caches.jl | 16 ++-- .../src/imex_multistep_caches.jl | 8 +- .../src/initialize_dae.jl | 2 +- lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl | 18 ++--- lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl | 12 +-- .../src/generic_rosenbrock.jl | 2 +- .../src/rosenbrock_caches.jl | 14 ++-- .../src/kencarp_kvaerno_caches.jl | 36 ++++----- lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl | 76 +++++++++---------- .../src/irkc_caches.jl | 4 +- 13 files changed, 122 insertions(+), 122 deletions(-) diff --git a/lib/OrdinaryDiffEqBDF/src/bdf_caches.jl b/lib/OrdinaryDiffEqBDF/src/bdf_caches.jl index 6a6c786965..a0e6066f28 100644 --- a/lib/OrdinaryDiffEqBDF/src/bdf_caches.jl +++ b/lib/OrdinaryDiffEqBDF/src/bdf_caches.jl @@ -17,7 +17,7 @@ function alg_cache(alg::ABDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(2) // 3, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) eulercache = ImplicitEulerConstantCache(nlsolver) dtₙ₋₁ = one(dt) @@ -47,7 +47,7 @@ function alg_cache(alg::ABDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(2) // 3, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true),verbose) fsalfirst = zero(rate_prototype) fsalfirstprev = zero(rate_prototype) @@ -106,7 +106,7 @@ function alg_cache(alg::SBDF, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(1) // 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) k2 = rate_prototype k₁ = rate_prototype @@ -129,7 +129,7 @@ function alg_cache(alg::SBDF, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = Int64(1) // 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) order = alg.order @@ -189,7 +189,7 @@ function alg_cache(alg::QNDF1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = zero(inv((1 - alg.kappa))), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) uprev2 = u dtₙ₋₁ = zero(t) @@ -210,7 +210,7 @@ function alg_cache(alg::QNDF1, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = zero(inv((1 - alg.kappa))), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) D = Array{typeof(u)}(undef, 1, 1) @@ -279,7 +279,7 @@ function alg_cache(alg::QNDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = zero(inv((1 - alg.kappa))), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) uprev2 = u uprev3 = u @@ -302,7 +302,7 @@ function alg_cache(alg::QNDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = zero(inv((1 - alg.kappa))), 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) D = Array{typeof(u)}(undef, 1, 2) @@ -362,7 +362,7 @@ function alg_cache(alg::QNDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, max_order = MO γ, c = Int64(1)//1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) dtprev = one(dt) D = Matrix{uEltypeNoUnits}(undef, length(u), max_order + 2) recursivefill!(D, zero(uEltypeNoUnits)) @@ -428,7 +428,7 @@ function alg_cache(alg::QNDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, max_order = MO γ, c = Int64(1)//1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) dd = zero(u) utilde = zero(u) @@ -485,7 +485,7 @@ function alg_cache(alg::MEBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -508,7 +508,7 @@ function alg_cache(alg::MEBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) MEBDF2ConstantCache(nlsolver) end @@ -544,7 +544,7 @@ function alg_cache(alg::FBDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, γ, c = Int64(1)//1, 1 max_order = MO nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) bdf_coeffs = SA[1 -1 0 0 0 0; Int64(3)//2 -2 Int64(1)//2 0 0 0; Int64(11)//6 -3 Int64(3)//2 -Int64(1)//3 0 0; @@ -620,7 +620,7 @@ function alg_cache(alg::FBDF{MO}, u, rate_prototype, ::Type{uEltypeNoUnits}, fsalfirst = zero(rate_prototype) max_order = MO nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) bdf_coeffs = SA[1 -1 0 0 0 0; Int64(3)//2 -2 Int64(1)//2 0 0 0; Int64(11)//6 -3 Int64(3)//2 -Int64(1)//3 0 0; diff --git a/lib/OrdinaryDiffEqBDF/src/dae_caches.jl b/lib/OrdinaryDiffEqBDF/src/dae_caches.jl index 346af26d9d..e0e6e8242f 100644 --- a/lib/OrdinaryDiffEqBDF/src/dae_caches.jl +++ b/lib/OrdinaryDiffEqBDF/src/dae_caches.jl @@ -28,7 +28,7 @@ function alg_cache(alg::DImplicitEuler, du, u, res_prototype, rate_prototype, γ, c = 1, 1 α = 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(false), verbose) DImplicitEulerConstantCache(nlsolver) end @@ -42,7 +42,7 @@ function alg_cache(alg::DImplicitEuler, du, u, res_prototype, rate_prototype, k₁ = zero(rate_prototype) k₂ = zero(rate_prototype) nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(true), verbose) atmp = similar(u, uEltypeNoUnits) recursivefill!(atmp, false) @@ -66,7 +66,7 @@ function alg_cache(alg::DABDF2, du, u, res_prototype, rate_prototype, γ, c = Int64(1) // 1, 1 α = Int64(1) // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(false), verbose) eulercache = DImplicitEulerConstantCache(nlsolver) dtₙ₋₁ = one(dt) @@ -95,7 +95,7 @@ function alg_cache(alg::DABDF2, du, u, res_prototype, rate_prototype, γ, c = Int64(1) // 1, 1 α = Int64(1) // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, res_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, Val(true), verbose) fsalfirst = zero(rate_prototype) fsalfirstprev = zero(rate_prototype) @@ -144,7 +144,7 @@ function alg_cache(alg::DFBDF{MO}, du, u, res_prototype, rate_prototype, uEltype γ, c = 1.0, 1.0 max_order = MO nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) bdf_coeffs = SA[1 -1 0 0 0 0; Int64(2)//3 -Int64(4)//3 Int64(1)//3 0 0 0; Int64(6)//11 -Int64(18)//11 Int64(9)//11 -Int64(2)//11 0 0; @@ -216,7 +216,7 @@ function alg_cache(alg::DFBDF{MO}, du, u, res_prototype, rate_prototype, uEltype fsalfirst = zero(rate_prototype) max_order = MO nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) #=bdf_coeffs = SA[1 -1 0 0 0 0 ; 3//2 -2 1//2 0 0 0 ; 11//6 -3 3//2 -1//3 0 0 ; diff --git a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl index 7dd6f3671b..727a750916 100644 --- a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl +++ b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl @@ -271,7 +271,7 @@ function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) linsolve1 = init( - linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) + linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -280,7 +280,7 @@ function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, for i in 2:get_thread_count(alg) linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) linsolve[i] = init(linprob, alg.linsolve, - alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) + alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end @@ -1160,7 +1160,7 @@ function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) linsolve1 = init( - linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) + linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -1169,7 +1169,7 @@ function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, for i in 2:get_thread_count(alg) linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) linsolve[i] = init(linprob, alg.linsolve, - alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) + alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end @@ -1490,7 +1490,7 @@ function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) linsolve1 = init( - linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) + linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -1499,7 +1499,7 @@ function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, for i in 2:get_thread_count(alg) linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) linsolve[i] = init(linprob, alg.linsolve, - alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) + alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end @@ -1688,7 +1688,7 @@ function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype linprob = LinearProblem(W[1], _vec(linsolve_tmps[1]); u0 = _vec(k_tmps[1])) linsolve1 = init( - linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) + linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -1697,7 +1697,7 @@ function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype for i in 2:get_thread_count(alg) linprob = LinearProblem(W[i], _vec(linsolve_tmps[i]); u0 = _vec(k_tmps[i])) linsolve[i] = init(linprob, alg.linsolve, - alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = Minimal()) + alias = LinearAliasSpecifier(alias_A = true, alias_b = true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) end diff --git a/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl b/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl index dd88415a36..53876cb4f6 100644 --- a/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl +++ b/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl @@ -105,7 +105,7 @@ function alg_cache(alg::RadauIIA3, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W1, _vec(cubuff); u0 = _vec(dw12)) linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -245,13 +245,13 @@ function alg_cache(alg::RadauIIA5, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W1, _vec(ubuff); u0 = _vec(dw1)) linsolve1 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) linprob = LinearProblem(W2, _vec(cubuff); u0 = _vec(dw23)) linsolve2 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -437,19 +437,19 @@ function alg_cache(alg::RadauIIA9, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W1, _vec(ubuff); u0 = _vec(dw1)) linsolve1 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) linprob = LinearProblem(W2, _vec(cubuff1); u0 = _vec(dw23)) linsolve2 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) linprob = LinearProblem(W3, _vec(cubuff2); u0 = _vec(dw45)) linsolve3 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -644,12 +644,12 @@ function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits} linprob = LinearProblem(W1, _vec(ubuff); u0 = _vec(dw1)) linsolve1 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) linsolve2 = [init(LinearProblem(W2[i], _vec(cubuff[i]); u0 = _vec(dw2[i])), alg.linsolve, alias = LinearAliasSpecifier( alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true), verbose = Minimal()) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) for i in 1:((max_stages - 1) ÷ 2)] rtol = reltol isa Number ? reltol : zero(reltol) diff --git a/lib/OrdinaryDiffEqIMEXMultistep/src/imex_multistep_caches.jl b/lib/OrdinaryDiffEqIMEXMultistep/src/imex_multistep_caches.jl index 36cbd93ba3..dcb5e9aa34 100644 --- a/lib/OrdinaryDiffEqIMEXMultistep/src/imex_multistep_caches.jl +++ b/lib/OrdinaryDiffEqIMEXMultistep/src/imex_multistep_caches.jl @@ -33,7 +33,7 @@ function alg_cache(alg::CNAB2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) k2 = rate_prototype uprev3 = u @@ -48,7 +48,7 @@ function alg_cache(alg::CNAB2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) k1 = zero(rate_prototype) @@ -90,7 +90,7 @@ function alg_cache(alg::CNLF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) k2 = rate_prototype uprev2 = u @@ -106,7 +106,7 @@ function alg_cache(alg::CNLF2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) k1 = zero(rate_prototype) diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl index 807238ddc6..92676e3245 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl @@ -152,7 +152,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD nlprob = NonlinearProblem(nlfunc, integrator.u, p) nlsolve = default_nlsolve(alg.nlsolve, isinplace, u0, nlprob, isAD) nlsol = solve(nlprob, nlsolve; abstol = integrator.opts.abstol, - reltol = integrator.opts.reltol, verbose = Minimal()) + reltol = integrator.opts.reltol, verbose = verbose.nonlinear_verbosity) integrator.u .= nlsol.u failed = nlsol.retcode != ReturnCode.Success end diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl index 635675c2c6..0ca0ecd99a 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl @@ -138,19 +138,19 @@ function build_nlsolver(alg, u, uprev, p, t, dt, f::F, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, γ, c, - iip) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + iip, verbose) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, γ, c, 1, iip) + tTypeNoUnits, γ, c, 1, iip, verbose) end function build_nlsolver(alg, u, uprev, p, t, dt, f::F, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, γ, c, α, - iip) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + iip, verbose) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} build_nlsolver(alg, alg.nlsolve, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, iip) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, α, iip, verbose) end function daenlf(ztmp, z, p) @@ -170,7 +170,7 @@ function build_nlsolver( f::F, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, γ, c, α, - ::Val{true}) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, + ::Val{true}, verbose) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} #TODO #nlalg = SciMLBase.handle_defaults(alg, nlalg) @@ -220,7 +220,7 @@ function build_nlsolver( alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(true), - verbose = Minimal()) + verbose = verbose.linear_verbosity) tType = typeof(t) invγdt = inv(oneunit(t) * one(uTolType)) @@ -239,7 +239,7 @@ function build_nlsolver( end NonlinearProblem(NonlinearFunction{true}(nlf), ztmp, nlp_params) end - cache = init(prob, nlalg.alg) + cache = init(prob, nlalg.alg, verbose = verbose.nonlinear_verbosity) nlcache = NonlinearSolveCache(ustep, tstep, k, atmp, invγdt, prob, cache) else nlcache = NLNewtonCache(ustep, tstep, k, atmp, dz, J, W, true, @@ -288,7 +288,7 @@ function build_nlsolver( f::F, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, γ, c, α, - ::Val{false}) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, + ::Val{false}, verbose) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} #TODO #nlalg = SciMLBase.handle_defaults(alg, nlalg) @@ -326,7 +326,7 @@ function build_nlsolver( (tmp, γ, α, tstep, invγdt, DIRK, p, dt, f) end prob = NonlinearProblem(NonlinearFunction{false}(nlf), copy(ztmp), nlp_params) - cache = init(prob, nlalg.alg, verbose = Minimal()) + cache = init(prob, nlalg.alg, verbose = verbose.nonlinear_verbosity) nlcache = NonlinearSolveCache( nothing, tstep, nothing, nothing, invγdt, prob, cache) else diff --git a/lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl b/lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl index 2df80a956b..66fe8b2552 100644 --- a/lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl +++ b/lib/OrdinaryDiffEqPDIRK/src/pdirk_caches.jl @@ -56,15 +56,15 @@ function alg_cache(alg::PDIRK44, u, rate_prototype, ::Type{uEltypeNoUnits}, if alg.threading nlsolver1 = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, - Val(true)) + Val(true), verbose) nlsolver2 = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, - Val(true)) + Val(true), verbose) nlsolver = [nlsolver1, nlsolver2] else _nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, - Val(true)) + Val(true), verbose) nlsolver = [_nlsolver] end tab = PDIRK44Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) @@ -81,15 +81,15 @@ function alg_cache(alg::PDIRK44, u, rate_prototype, ::Type{uEltypeNoUnits}, if alg.threading nlsolver1 = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, - Val(false)) + Val(false), verbose) nlsolver2 = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, - Val(false)) + Val(false), verbose) nlsolver = [nlsolver1, nlsolver2] else _nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, γ, c, - Val(false)) + Val(false), verbose) nlsolver = [_nlsolver] end tab = PDIRK44Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) diff --git a/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl b/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl index 702889c49b..dd011a1861 100644 --- a/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl +++ b/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl @@ -255,7 +255,7 @@ function gen_algcache(cacheexpr::Expr,constcachename::Symbol,algname::Symbol,tab linsolve = init(linprob,alg.linsolve,alias = LinearAliasSpecifier(alias_A=true,alias_b=true), Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), Pr = Diagonal(_vec(weight)), - verbose = Minimal()) + verbose = verbose.linear_verbosity) $cachename($(valsyms...)) end end diff --git a/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl b/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl index cece9f0a3a..7e8df53232 100644 --- a/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl +++ b/lib/OrdinaryDiffEqRosenbrock/src/rosenbrock_caches.jl @@ -165,7 +165,7 @@ function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(true), - verbose = Minimal()) + verbose = verbose.linear_verbosity) algebraic_vars = f.mass_matrix === I ? nothing : @@ -217,7 +217,7 @@ function alg_cache(alg::Rosenbrock32, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(true), - verbose = Minimal()) + verbose = verbose.linear_verbosity) algebraic_vars = f.mass_matrix === I ? nothing : [all(iszero, x) for x in eachcol(f.mass_matrix)] @@ -370,7 +370,7 @@ function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(true), - verbose = Minimal()) + verbose = verbose.linear_verbosity) Rosenbrock33Cache(u, uprev, du, du1, du2, k1, k2, k3, k4, fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, @@ -462,7 +462,7 @@ function alg_cache(alg::Rodas3, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(true), - verbose = Minimal()) + verbose = verbose.linear_verbosity) Rosenbrock34Cache(u, uprev, du, du1, du2, k1, k2, k3, k4, fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, @@ -661,7 +661,7 @@ function alg_cache(alg::Rodas23W, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(true), - verbose = Minimal()) + verbose = verbose.linear_verbosity) Rodas23WCache(u, uprev, dense1, dense2, dense3, du, du1, du2, k1, k2, k3, k4, k5, fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, linsolve_tmp, @@ -711,7 +711,7 @@ function alg_cache(alg::Rodas3P, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), Pl = Pl, Pr = Pr, assumptions = LinearSolve.OperatorAssumptions(true), - verbose = Minimal()) + verbose = verbose.linear_verbosity) Rodas3PCache(u, uprev, dense1, dense2, dense3, du, du1, du2, k1, k2, k3, k4, k5, fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, linsolve_tmp, @@ -827,7 +827,7 @@ function alg_cache( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A=true, alias_b=true), Pl=Pl, Pr=Pr, assumptions=LinearSolve.OperatorAssumptions(true), - verbose = Minimal()) + verbose = verbose.linear_verbosity) # Return the cache struct with vectors diff --git a/lib/OrdinaryDiffEqSDIRK/src/kencarp_kvaerno_caches.jl b/lib/OrdinaryDiffEqSDIRK/src/kencarp_kvaerno_caches.jl index c37dcea549..c884ebc243 100644 --- a/lib/OrdinaryDiffEqSDIRK/src/kencarp_kvaerno_caches.jl +++ b/lib/OrdinaryDiffEqSDIRK/src/kencarp_kvaerno_caches.jl @@ -10,7 +10,7 @@ function alg_cache(alg::Kvaerno3, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = Kvaerno3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, 2tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) Kvaerno3ConstantCache(nlsolver, tab) end @@ -36,7 +36,7 @@ function alg_cache(alg::Kvaerno3, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = Kvaerno3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, 2tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -62,7 +62,7 @@ function alg_cache(alg::KenCarp3, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = KenCarp3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) KenCarp3ConstantCache(nlsolver, tab) end @@ -94,7 +94,7 @@ function alg_cache(alg::KenCarp3, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = KenCarp3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) if f isa SplitFunction @@ -133,7 +133,7 @@ function alg_cache(alg::CFNLIRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = CFNLIRK3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) CFNLIRK3ConstantCache(nlsolver, tab) end @@ -163,7 +163,7 @@ function alg_cache(alg::CFNLIRK3, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = CFNLIRK3Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) k1 = zero(u) @@ -193,7 +193,7 @@ function alg_cache(alg::Kvaerno4, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = Kvaerno4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) Kvaerno4ConstantCache(nlsolver, tab) end @@ -220,7 +220,7 @@ function alg_cache(alg::Kvaerno4, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = Kvaerno4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -247,7 +247,7 @@ function alg_cache(alg::KenCarp4, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = KenCarp4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) KenCarp4ConstantCache(nlsolver, tab) end @@ -284,7 +284,7 @@ function alg_cache(alg::KenCarp4, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = KenCarp4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) if f isa SplitFunction @@ -330,7 +330,7 @@ function alg_cache(alg::Kvaerno5, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = Kvaerno5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) Kvaerno5ConstantCache(nlsolver, tab) end @@ -360,7 +360,7 @@ function alg_cache(alg::Kvaerno5, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = Kvaerno5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -389,7 +389,7 @@ function alg_cache(alg::KenCarp5, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = KenCarp5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) KenCarp5ConstantCache(nlsolver, tab) end @@ -429,7 +429,7 @@ function alg_cache(alg::KenCarp5, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = KenCarp5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) if f isa SplitFunction @@ -479,7 +479,7 @@ function alg_cache(alg::KenCarp47, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = KenCarp47Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) KenCarp47ConstantCache(nlsolver, tab) end @@ -516,7 +516,7 @@ function alg_cache(alg::KenCarp47, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = KenCarp47Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) if f isa SplitFunction @@ -563,7 +563,7 @@ function alg_cache(alg::KenCarp58, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = KenCarp58Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) KenCarp58ConstantCache(nlsolver, tab) end @@ -603,7 +603,7 @@ function alg_cache(alg::KenCarp58, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = KenCarp58Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.c3 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) if f isa SplitFunction diff --git a/lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl b/lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl index e0da193ff0..60dbd97f77 100644 --- a/lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl +++ b/lib/OrdinaryDiffEqSDIRK/src/sdirk_caches.jl @@ -23,7 +23,7 @@ function alg_cache(alg::ImplicitEuler, u, rate_prototype, ::Type{uEltypeNoUnits} ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) atmp = similar(u, uEltypeNoUnits) @@ -46,7 +46,7 @@ function alg_cache(alg::ImplicitEuler, u, rate_prototype, ::Type{uEltypeNoUnits} ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ImplicitEulerConstantCache(nlsolver) end @@ -60,7 +60,7 @@ function alg_cache(alg::ImplicitMidpoint, u, rate_prototype, ::Type{uEltypeNoUni ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 // 2 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ImplicitMidpointConstantCache(nlsolver) end @@ -79,7 +79,7 @@ function alg_cache(alg::ImplicitMidpoint, u, rate_prototype, ::Type{uEltypeNoUni ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 // 2 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) ImplicitMidpointCache(u, uprev, fsalfirst, nlsolver, alg.step_limiter!) end @@ -96,7 +96,7 @@ function alg_cache(alg::Trapezoid, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) uprev3 = u tprev2 = t @@ -124,7 +124,7 @@ function alg_cache(alg::Trapezoid, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 2, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) uprev3 = zero(u) @@ -148,7 +148,7 @@ function alg_cache(alg::TRBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = TRBDF2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.d, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) TRBDF2ConstantCache(nlsolver, tab) end @@ -172,7 +172,7 @@ function alg_cache(alg::TRBDF2, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = TRBDF2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.d, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) atmp = similar(u, uEltypeNoUnits) @@ -193,7 +193,7 @@ function alg_cache(alg::SDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SDIRK2ConstantCache(nlsolver) end @@ -215,7 +215,7 @@ function alg_cache(alg::SDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -243,7 +243,7 @@ function alg_cache(alg::SDIRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SDIRK22ConstantCache(uprev3, tprev2, nlsolver) end @@ -270,7 +270,7 @@ function alg_cache(alg::SDIRK22, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = SDIRK22Tableau(constvalue(uBottomEltypeNoUnits)) γ, c = 1, 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) uprev3 = zero(u) @@ -292,7 +292,7 @@ function alg_cache(alg::SSPSDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 4, 1 // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SSPSDIRK2ConstantCache(nlsolver) end @@ -311,7 +311,7 @@ function alg_cache(alg::SSPSDIRK2, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1 // 4, 1 // 1 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -334,7 +334,7 @@ function alg_cache(alg::Cash4, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = Cash4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) Cash4ConstantCache(nlsolver, tab) end @@ -359,7 +359,7 @@ function alg_cache(alg::Cash4, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = Cash4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -385,7 +385,7 @@ function alg_cache(alg::SFSDIRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = SFSDIRK4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SFSDIRK4ConstantCache(nlsolver, tab) end @@ -411,7 +411,7 @@ function alg_cache(alg::SFSDIRK4, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = SFSDIRK4Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -437,7 +437,7 @@ function alg_cache(alg::SFSDIRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = SFSDIRK5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SFSDIRK5ConstantCache(nlsolver, tab) end @@ -464,7 +464,7 @@ function alg_cache(alg::SFSDIRK5, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = SFSDIRK5Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -491,7 +491,7 @@ function alg_cache(alg::SFSDIRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = SFSDIRK6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SFSDIRK6ConstantCache(nlsolver, tab) end @@ -518,7 +518,7 @@ function alg_cache(alg::SFSDIRK6, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = SFSDIRK6Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -545,7 +545,7 @@ function alg_cache(alg::SFSDIRK7, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = SFSDIRK7Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SFSDIRK7ConstantCache(nlsolver, tab) end @@ -573,7 +573,7 @@ function alg_cache(alg::SFSDIRK7, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = SFSDIRK7Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -601,7 +601,7 @@ function alg_cache(alg::SFSDIRK8, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = SFSDIRK8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) SFSDIRK8ConstantCache(nlsolver, tab) end @@ -630,7 +630,7 @@ function alg_cache(alg::SFSDIRK8, u, rate_prototype, ::Type{uEltypeNoUnits}, tab = SFSDIRK8Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -664,7 +664,7 @@ function alg_cache( end γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) Hairer4ConstantCache(nlsolver, tab) end @@ -695,7 +695,7 @@ function alg_cache( end γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -734,7 +734,7 @@ function alg_cache(alg::ESDIRK54I8L2SA, u, rate_prototype, ::Type{uEltypeNoUnits tab = ESDIRK54I8L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -765,7 +765,7 @@ function alg_cache(alg::ESDIRK54I8L2SA, u, rate_prototype, ::Type{uEltypeNoUnits tab = ESDIRK54I8L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ESDIRK54I8L2SAConstantCache(nlsolver, tab) end @@ -792,7 +792,7 @@ function alg_cache(alg::ESDIRK436L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits tab = ESDIRK436L2SA2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -820,7 +820,7 @@ function alg_cache(alg::ESDIRK436L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits tab = ESDIRK436L2SA2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ESDIRK436L2SA2ConstantCache(nlsolver, tab) end @@ -848,7 +848,7 @@ function alg_cache(alg::ESDIRK437L2SA, u, rate_prototype, ::Type{uEltypeNoUnits} tab = ESDIRK437L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -877,7 +877,7 @@ function alg_cache(alg::ESDIRK437L2SA, u, rate_prototype, ::Type{uEltypeNoUnits} tab = ESDIRK437L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ESDIRK437L2SAConstantCache(nlsolver, tab) end @@ -905,7 +905,7 @@ function alg_cache(alg::ESDIRK547L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits tab = ESDIRK547L2SA2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -934,7 +934,7 @@ function alg_cache(alg::ESDIRK547L2SA2, u, rate_prototype, ::Type{uEltypeNoUnits tab = ESDIRK547L2SA2Tableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ESDIRK547L2SA2ConstantCache(nlsolver, tab) end @@ -965,7 +965,7 @@ function alg_cache(alg::ESDIRK659L2SA, u, rate_prototype, ::Type{uEltypeNoUnits} tab = ESDIRK659L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) fsalfirst = zero(rate_prototype) z₁ = zero(u) @@ -997,6 +997,6 @@ function alg_cache(alg::ESDIRK659L2SA, u, rate_prototype, ::Type{uEltypeNoUnits} tab = ESDIRK659L2SATableau(constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)) γ, c = tab.γ, tab.γ nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) ESDIRK659L2SAConstantCache(nlsolver, tab) end diff --git a/lib/OrdinaryDiffEqStabilizedIRK/src/irkc_caches.jl b/lib/OrdinaryDiffEqStabilizedIRK/src/irkc_caches.jl index 6b4297138e..bd6264fa31 100644 --- a/lib/OrdinaryDiffEqStabilizedIRK/src/irkc_caches.jl +++ b/lib/OrdinaryDiffEqStabilizedIRK/src/irkc_caches.jl @@ -33,7 +33,7 @@ function alg_cache(alg::IRKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{false}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(false), verbose) zprev = u du₁ = rate_prototype du₂ = rate_prototype @@ -46,7 +46,7 @@ function alg_cache(alg::IRKC, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{true}, verbose) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} γ, c = 1.0, 1.0 nlsolver = build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true)) + uBottomEltypeNoUnits, tTypeNoUnits, γ, c, Val(true), verbose) gprev = zero(u) gprev2 = zero(u) From ac633a37b87120cf7858058d9b767beb17dfd795 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 10:59:51 -0500 Subject: [PATCH 34/74] fix verbose for default caches --- .../src/caches/basic_caches.jl | 8 ++++---- lib/OrdinaryDiffEqCore/src/solve.jl | 20 ++++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl index 12ccd639a3..d6c2b16116 100644 --- a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl +++ b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl @@ -61,7 +61,7 @@ function alg_cache(alg::CompositeAlgorithm, u, rate_prototype, ::Type{uEltypeNoU dt, reltol, p, calck, ::Val{V}, verbose) where {V, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} caches = __alg_cache(alg.algs, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(V)) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(V), verbose) CompositeCache(caches, alg.choice_function, 1) end @@ -72,7 +72,7 @@ function alg_cache(alg::CompositeAlgorithm{CS, Tuple{A1, A2, A3, A4, A5, A6}}, u CS, V, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, A1, A2, A3, A4, A5, A6} args = (u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, - reltol, p, calck, Val(V)) + reltol, p, calck, Val(V), verbose) # Core.Typeof to turn uEltypeNoUnits into Type{uEltypeNoUnits} rather than DataType argT = map(Core.Typeof, args) T1 = Base.promote_op(alg_cache, A1, argT...) @@ -110,13 +110,13 @@ end @generated function __alg_cache(algs::T, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, dt, reltol, p, calck, - ::Val{V}) where {T <: Tuple, V, uEltypeNoUnits, + ::Val{V}, verbose) where {T <: Tuple, V, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} return Expr(:tuple, map(1:length(T.types)) do i :(alg_cache(algs[$i], u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, - reltol, p, calck, Val($V))) + reltol, p, calck, Val($V), verbose)) end...) end diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index 0db3b7b7c1..d9f19f2f47 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -98,12 +98,14 @@ function SciMLBase.__init( if verbose isa Bool if verbose - verbose = ODEVerbosity() + verbose_spec = ODEVerbosity() else - verbose = ODEVerbosity(None()) + verbose_spec = ODEVerbosity(None()) end elseif verbose isa AbstractVerbosityPreset - verbose = ODEVerbosity(verbose) + verbose_spec = ODEVerbosity(verbose) + else + verbose_spec = verbose end if alg isa OrdinaryDiffEqRosenbrockAdaptiveAlgorithm && @@ -114,7 +116,7 @@ function SciMLBase.__init( # technically this should also warn for zero operators but those are hard to check for if (dense || !isempty(saveat)) @SciMLMessage("Rosenbrock methods on equations without differential states do not bound the error on interpolations.", - verbose, :rosenbrock_no_differential_states) + verbose_spec, :rosenbrock_no_differential_states) end end @@ -126,7 +128,7 @@ function SciMLBase.__init( if !isempty(saveat) && dense @SciMLMessage("Dense output is incompatible with saveat. Please use the SavingCallback from the Callback Library to mix the two behaviors.", - verbose, :dense_output_saveat) + verbose_spec, :dense_output_saveat) end progress && @logmsg(LogLevel(-1), progress_name, _id=progress_id, progress=0) @@ -417,11 +419,11 @@ function SciMLBase.__init( if prob isa DAEProblem cache = alg_cache(_alg, du, u, res_prototype, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, - reltol_internal, p, calck, Val(isinplace(prob))) + reltol_internal, p, calck, Val(isinplace(prob)), verbose_spec) else cache = alg_cache(_alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, reltol_internal, p, calck, - Val(isinplace(prob))) + Val(isinplace(prob)), verbose_spec) end # Setting up the step size controller @@ -455,7 +457,7 @@ function SciMLBase.__init( typeof(d_discontinuities_internal), typeof(userdata), typeof(save_idxs), typeof(maxiters), typeof(tstops), - typeof(saveat), typeof(d_discontinuities), typeof(verbose)}(maxiters, save_everystep, + typeof(saveat), typeof(d_discontinuities), typeof(verbose_spec)}(maxiters, save_everystep, adaptive, abstol_internal, reltol_internal, QT(gamma), QT(qmax), @@ -485,7 +487,7 @@ function SciMLBase.__init( callbacks_internal, isoutofdomain, unstable_check, - verbose, calck, force_dtmin, + verbose_spec, calck, force_dtmin, advance_to_tstop, stop_at_next_tstop) From d899605adcad14f4db358e5419f5c519da7d4a49 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 12:04:20 -0500 Subject: [PATCH 35/74] fix up some verbosity and linear verbosity --- lib/OrdinaryDiffEqBDF/test/inference_tests.jl | 7 ++++--- .../src/extrapolation_caches.jl | 12 ++++++------ lib/OrdinaryDiffEqFIRK/src/firk_caches.jl | 4 ++-- .../src/initialize_dae.jl | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/OrdinaryDiffEqBDF/test/inference_tests.jl b/lib/OrdinaryDiffEqBDF/test/inference_tests.jl index 58ac2bba75..8f103982fd 100644 --- a/lib/OrdinaryDiffEqBDF/test/inference_tests.jl +++ b/lib/OrdinaryDiffEqBDF/test/inference_tests.jl @@ -1,5 +1,6 @@ using OrdinaryDiffEqBDF, ADTypes, Test using NonlinearSolve: TrustRegion +using SciMLLogging: Standard prob = ODEProblem((du, u, p, t) -> du .= u, zeros(1), (0.0, 1.0)) nlalg = FBDF(autodiff = false, @@ -9,10 +10,10 @@ basicalgad = FBDF() nlsolver = @inferred OrdinaryDiffEqBDF.build_nlsolver( basicalg, prob.u0, prob.u0, prob.p, 0.0, 0.0, prob.f, prob.u0, Float64, - Float64, Float64, 0.0, 0.0, Val(true)) + Float64, Float64, 0.0, 0.0, Val(true), Standard()) nlsolver = @inferred OrdinaryDiffEqBDF.build_nlsolver( nlalg, prob.u0, prob.u0, prob.p, 0.0, 0.0, prob.f, prob.u0, Float64, - Float64, Float64, 0.0, 0.0, Val(true)) + Float64, Float64, 0.0, 0.0, Val(true), Standard()) nlsolver = @test_throws Any @inferred OrdinaryDiffEqBDF.build_nlsolver( basicalgad, prob.u0, prob.u0, prob.p, 0.0, 0.0, prob.f, prob.u0, Float64, - Float64, Float64, 0.0, 0.0, Val(true)) + Float64, Float64, 0.0, 0.0, Val(true), Standard()) diff --git a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl index 727a750916..b6dde5e0ce 100644 --- a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl +++ b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_caches.jl @@ -290,7 +290,7 @@ function alg_cache(alg::ImplicitEulerExtrapolation, u, rate_prototype, jac_config = build_jac_config(alg, f, uf, du1, uprev, u, du1, du2) sequence = generate_sequence(constvalue(uBottomEltypeNoUnits), alg) cc = alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false)) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false), verbose) diff1 = Array{typeof(u), 1}(undef, get_thread_count(alg)) diff2 = Array{typeof(u), 1}(undef, get_thread_count(alg)) for i in 1:get_thread_count(alg) @@ -988,7 +988,7 @@ function alg_cache(alg::ExtrapolationMidpointDeuflhard, u, rate_prototype, cc = alg_cache(alg::ExtrapolationMidpointDeuflhard, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, - calck, Val(false)) + calck, Val(false), verbose) # Initialize cache ExtrapolationMidpointDeuflhardCache(utilde, u_temp1, u_temp2, u_temp3, u_temp4, tmp, T, res, fsalfirst, k, k_tmps, cc.Q, cc.n_curr, @@ -1127,7 +1127,7 @@ function alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, cc = alg_cache(alg::ImplicitDeuflhardExtrapolation, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, - calck, Val(false)) + calck, Val(false), verbose) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -1299,7 +1299,7 @@ function alg_cache(alg::ExtrapolationMidpointHairerWanner, u, rate_prototype, end cc = alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false)) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false), verbose) # Initialize the cache ExtrapolationMidpointHairerWannerCache(utilde, u_temp1, u_temp2, u_temp3, u_temp4, tmp, @@ -1456,7 +1456,7 @@ function alg_cache(alg::ImplicitHairerWannerExtrapolation, u, rate_prototype, end cc = alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false)) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false), verbose) du1 = zero(rate_prototype) du2 = zero(rate_prototype) @@ -1654,7 +1654,7 @@ function alg_cache(alg::ImplicitEulerBarycentricExtrapolation, u, rate_prototype end cc = alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false)) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false), verbose) du1 = zero(rate_prototype) du2 = zero(rate_prototype) diff --git a/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl b/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl index 53876cb4f6..56684a0b2c 100644 --- a/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl +++ b/lib/OrdinaryDiffEqFIRK/src/firk_caches.jl @@ -105,7 +105,7 @@ function alg_cache(alg::RadauIIA3, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W1, _vec(cubuff); u0 = _vec(dw12)) linsolve = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) @@ -251,7 +251,7 @@ function alg_cache(alg::RadauIIA5, u, rate_prototype, ::Type{uEltypeNoUnits}, linprob = LinearProblem(W2, _vec(cubuff); u0 = _vec(dw23)) linsolve2 = init( linprob, alg.linsolve, alias = LinearAliasSpecifier(alias_A = true, alias_b = true), - assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) + assumptions = LinearSolve.OperatorAssumptions(true), verbose = verbose.linear_verbosity) #Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight))), #Pr = Diagonal(_vec(weight))) diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl index 92676e3245..e9e243834b 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl @@ -152,7 +152,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD nlprob = NonlinearProblem(nlfunc, integrator.u, p) nlsolve = default_nlsolve(alg.nlsolve, isinplace, u0, nlprob, isAD) nlsol = solve(nlprob, nlsolve; abstol = integrator.opts.abstol, - reltol = integrator.opts.reltol, verbose = verbose.nonlinear_verbosity) + reltol = integrator.opts.reltol, verbose = integrator.opts.verbose.nonlinear_verbosity) integrator.u .= nlsol.u failed = nlsol.retcode != ReturnCode.Success end From b1858ac045997353aff6eefb96f930f1f7b871ed Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 12:26:36 -0500 Subject: [PATCH 36/74] add test for nonlinearsolve verbosity passthrough --- test/interface/verbosity.jl | 278 ++++++++++++++++++++++++++++-------- 1 file changed, 216 insertions(+), 62 deletions(-) diff --git a/test/interface/verbosity.jl b/test/interface/verbosity.jl index 8c3ae0a815..2949d9df74 100644 --- a/test/interface/verbosity.jl +++ b/test/interface/verbosity.jl @@ -1,8 +1,16 @@ using OrdinaryDiffEqCore using OrdinaryDiffEqCore: ODEVerbosity, option_group, group_options +using OrdinaryDiffEqBDF +using OrdinaryDiffEqExtrapolation +using OrdinaryDiffEqFIRK +using OrdinaryDiffEqRosenbrock +using OrdinaryDiffEqSDIRK +using OrdinaryDiffEqNonlinearSolve: NonlinearSolveAlg using ODEProblemLibrary: prob_ode_vanderpol_stiff -using SciMLLogging using Test +import OrdinaryDiffEqCore.SciMLLogging as SciMLLogging +using LinearSolve: LinearVerbosity +using NonlinearSolve: NonlinearVerbosity @testset "ODEVerbosity Tests" begin @testset "Default constructor" begin @@ -32,8 +40,8 @@ using Test @test v_none.alg_switch isa SciMLLogging.Silent @test v_none.rosenbrock_no_differential_states isa SciMLLogging.Silent - @test v_minimal.dt_NaN isa SciMLLogging.ErrorLevel - @test v_minimal.init_NaN isa SciMLLogging.ErrorLevel + @test v_minimal.dt_NaN isa SciMLLogging.WarnLevel + @test v_minimal.init_NaN isa SciMLLogging.WarnLevel @test v_minimal.alg_switch isa SciMLLogging.Silent @test v_minimal.dense_output_saveat isa SciMLLogging.Silent @@ -51,26 +59,26 @@ using Test end @testset "Group-level keyword constructors" begin - v_error = ODEVerbosity(error_control = ErrorLevel()) + v_error = ODEVerbosity(error_control = SciMLLogging.ErrorLevel()) @test v_error.dt_NaN isa SciMLLogging.ErrorLevel @test v_error.init_NaN isa SciMLLogging.ErrorLevel @test v_error.dense_output_saveat isa SciMLLogging.ErrorLevel - v_numerical = ODEVerbosity(numerical = Silent()) + v_numerical = ODEVerbosity(numerical = SciMLLogging.Silent()) @test v_numerical.rosenbrock_no_differential_states isa SciMLLogging.Silent @test v_numerical.shampine_dt isa SciMLLogging.Silent @test v_numerical.unlimited_dt isa SciMLLogging.Silent - v_performance = ODEVerbosity(performance = InfoLevel()) + v_performance = ODEVerbosity(performance = SciMLLogging.InfoLevel()) @test v_performance.alg_switch isa SciMLLogging.InfoLevel @test v_performance.mismatched_input_output_type isa SciMLLogging.InfoLevel end @testset "Mixed group and individual settings" begin v_mixed = ODEVerbosity( - numerical = Silent(), - shampine_dt = WarnLevel(), - performance = InfoLevel() + numerical = SciMLLogging.Silent(), + shampine_dt = SciMLLogging.WarnLevel(), + performance = SciMLLogging.InfoLevel() ) # Individual override should take precedence @test v_mixed.shampine_dt isa SciMLLogging.WarnLevel @@ -84,9 +92,9 @@ using Test @testset "Individual keyword arguments" begin v_individual = ODEVerbosity( - dt_NaN = ErrorLevel(), - alg_switch = InfoLevel(), - shampine_dt = Silent() + dt_NaN = SciMLLogging.ErrorLevel(), + alg_switch = SciMLLogging.InfoLevel(), + shampine_dt = SciMLLogging.Silent() ) @test v_individual.dt_NaN isa SciMLLogging.ErrorLevel @test v_individual.alg_switch isa SciMLLogging.InfoLevel @@ -127,7 +135,7 @@ using Test end @testset "Group options function" begin - v = ODEVerbosity(numerical = WarnLevel()) + v = ODEVerbosity(numerical = SciMLLogging.WarnLevel()) numerical_opts = group_options(v, :numerical) @test numerical_opts isa NamedTuple @test :rosenbrock_no_differential_states in keys(numerical_opts) @@ -150,54 +158,6 @@ using Test @test_throws ErrorException group_options(v, :unknown_group) end - @testset "Group getproperty access" begin - v = ODEVerbosity() - - # Test getting groups returns NamedTuples - error_group = v.error_control - performance_group = v.performance - numerical_group = v.numerical - - @test error_group isa NamedTuple - @test performance_group isa NamedTuple - @test numerical_group isa NamedTuple - - # Test correct keys are present - @test :dt_NaN in keys(error_group) - @test :init_NaN in keys(error_group) - @test :dense_output_saveat in keys(error_group) - - @test :alg_switch in keys(performance_group) - @test :mismatched_input_output_type in keys(performance_group) - - @test :rosenbrock_no_differential_states in keys(numerical_group) - @test :shampine_dt in keys(numerical_group) - @test :unlimited_dt in keys(numerical_group) - - # Test values are AbstractMessageLevel types - @test error_group.dt_NaN isa SciMLLogging.AbstractMessageLevel - @test performance_group.alg_switch isa SciMLLogging.AbstractMessageLevel - @test numerical_group.shampine_dt isa SciMLLogging.AbstractMessageLevel - - # Individual field access should still work - @test v.dt_NaN isa SciMLLogging.WarnLevel - @test v.alg_switch isa SciMLLogging.WarnLevel - @test v.shampine_dt isa SciMLLogging.WarnLevel - end - - @testset "Argument validation" begin - # Test invalid error_control type - @test_throws ArgumentError ODEVerbosity(error_control = "invalid") - @test_throws ArgumentError ODEVerbosity(performance = 123) - @test_throws ArgumentError ODEVerbosity(numerical = :symbol) - - # Test unknown keyword argument - @test_throws ArgumentError ODEVerbosity(unknown_field = WarnLevel()) - - # Test invalid value for individual field - @test_throws ArgumentError ODEVerbosity(dt_NaN = "not_a_level") - end - @testset "All error control fields" begin v = ODEVerbosity(error_control = InfoLevel()) @test v.dt_NaN isa SciMLLogging.InfoLevel @@ -254,7 +214,201 @@ using Test @testset "Stiff Switching Message" begin verb = ODEVerbosity(performance = ODEPerformanceVerbosity(alg_switch = Verbosity.Info())) solve(prob_ode_vanderpol_stiff, AutoTsit5(Rodas5()), verbose = verb) - end + end + + @testset "Linear Verbosity Passthrough to Caches" begin + # Define a simple stiff test problem + function rober(du, u, p, t) + y₁, y₂, y₃ = u + k₁, k₂, k₃ = p + du[1] = -k₁ * y₁ + k₃ * y₂ * y₃ + du[2] = k₁ * y₁ - k₃ * y₂ * y₃ - k₂ * y₂^2 + du[3] = y₁ + y₂ + y₃ - 1 + nothing + end + u0 = [1.0, 0.0, 0.0] + tspan = (0.0, 1e-1) + p = [0.04, 3e7, 1e4] + prob = ODEProblem(rober, u0, tspan, p) + + @testset "Rosenbrock Solvers" begin + @testset "Rosenbrock23 with Detailed LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Detailed()) + integrator = init(prob, Rosenbrock23(), verbose = verbose, dt = 1e-3) + + # Check that the cache has a linsolve field + @test hasproperty(integrator.cache, :linsolve) + + # Check that the linear solver cache has verbose field + @test hasproperty(integrator.cache.linsolve, :verbose) + + # Verify the verbosity was passed through correctly + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Detailed()) + end + + @testset "Rosenbrock23 with Minimal LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Minimal()) + integrator = init(prob, Rosenbrock23(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Minimal()) + end + + @testset "Rosenbrock23 with None LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.None()) + integrator = init(prob, Rosenbrock23(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.None()) + end + + @testset "Rosenbrock32 with Detailed LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Detailed()) + integrator = init(prob, Rosenbrock32(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Detailed()) + end + + @testset "Rodas4 with All LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.All()) + integrator = init(prob, Rodas4(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.All()) + end + end + + @testset "FIRK Solvers (Radau Methods)" begin + @testset "RadauIIA3 with Detailed LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Detailed()) + integrator = init(prob, RadauIIA3(), verbose = verbose, dt = 1e-3) + + # RadauIIA3 has a linsolve field + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Detailed()) + end + + @testset "RadauIIA3 with Minimal LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Minimal()) + integrator = init(prob, RadauIIA3(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Minimal()) + end + + @testset "RadauIIA5 with Detailed LinearVerbosity (two linear solvers)" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Detailed()) + integrator = init(prob, RadauIIA5(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve1.verbose == LinearVerbosity(SciMLLogging.Detailed()) + @test integrator.cache.linsolve2.verbose == LinearVerbosity(SciMLLogging.Detailed()) + end + + @testset "RadauIIA5 with None LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.None()) + integrator = init(prob, RadauIIA5(), verbose = verbose, dt = 1e-3) + + @test integrator.cache.linsolve1.verbose == LinearVerbosity(SciMLLogging.None()) + @test integrator.cache.linsolve2.verbose == LinearVerbosity(SciMLLogging.None()) + end + + @testset "RadauIIA9 with All LinearVerbosity (three linear solvers)" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.All()) + integrator = init(prob, RadauIIA9(), verbose = verbose, dt = 1e-3) + + # Check all three linear solvers have the correct verbosity + @test integrator.cache.linsolve1.verbose == LinearVerbosity(SciMLLogging.All()) + @test integrator.cache.linsolve2.verbose == + LinearVerbosity(SciMLLogging.All()) + @test integrator.cache.linsolve3.verbose == + LinearVerbosity(SciMLLogging.All()) + end + end + + @testset "Extrapolation Solvers" begin + @testset "ImplicitEulerExtrapolation with Detailed LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Detailed()) + integrator = init(prob, ImplicitEulerExtrapolation(), verbose = verbose, dt = 1e-3) + + # Check that all linear solvers in the array have the correct verbosity + for ls in integrator.cache.linsolve + @test ls.verbose == LinearVerbosity(SciMLLogging.Detailed()) + end + end + + @testset "ImplicitEulerExtrapolation with Minimal LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.Minimal()) + integrator = init(prob, ImplicitEulerExtrapolation(), verbose = verbose, dt = 1e-3) + + for ls in integrator.cache.linsolve + @test ls.verbose == LinearVerbosity(SciMLLogging.Minimal()) + end + end + + @testset "ImplicitDeuflhardExtrapolation with None LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.None()) + integrator = init(prob, ImplicitDeuflhardExtrapolation(), verbose = verbose, dt = 1e-3) + + for ls in integrator.cache.linsolve + @test ls.cacheval.verbose isa SciMLLogging.None + end + end + + @testset "ImplicitHairerWannerExtrapolation with All LinearVerbosity" begin + verbose = ODEVerbosity(linear_verbosity = SciMLLogging.All()) + integrator = init(prob, ImplicitHairerWannerExtrapolation(), verbose = verbose, dt = 1e-3) + + for ls in integrator.cache.linsolve + @test ls.verbose == LinearVerbosity(SciMLLogging.All()) + end + end + end + + @testset "Preset Verbosity Levels" begin + @testset "Rosenbrock23 with Standard() preset (default linear_verbosity = Minimal)" begin + verbose = ODEVerbosity(SciMLLogging.Standard()) + integrator = init(prob, Rosenbrock23(), verbose = verbose, dt = 1e-3) + + # Standard() uses Minimal() for linear_verbosity + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Minimal()) + end + + @testset "RadauIIA3 with Detailed() preset" begin + verbose = ODEVerbosity(SciMLLogging.Detailed()) + integrator = init(prob, RadauIIA3(), verbose = verbose, dt = 1e-3) + + # Detailed() uses Detailed() for linear_verbosity + @test integrator.cache.linsolve.verbose == LinearVerbosity(SciMLLogging.Detailed()) + end + + end + end + + @testset "Nonlinear Verbosity Passthrough to Caches" begin + # Define a simple stiff test problem + function rober(du, u, p, t) + y₁, y₂, y₃ = u + k₁, k₂, k₃ = p + du[1] = -k₁ * y₁ + k₃ * y₂ * y₃ + du[2] = k₁ * y₁ - k₃ * y₂ * y₃ - k₂ * y₂^2 + du[3] = y₁ + y₂ + y₃ - 1 + nothing + end + u0 = [1.0, 0.0, 0.0] + tspan = (0.0, 1e-1) + p = [0.04, 3e7, 1e4] + prob = ODEProblem(rober, u0, tspan, p) + + @testset "ImplicitEuler with Detailed NonlinearVerbosity" begin + verbose = ODEVerbosity(nonlinear_verbosity = SciMLLogging.Detailed()) + integrator = init(prob, ImplicitEuler(nlsolve = NonlinearSolveAlg()), verbose = verbose, dt = 1e-3) + + # Check that the cache has an nlsolver field + @test hasproperty(integrator.cache, :nlsolver) + + # Check that the nlsolver has a cache field + @test hasproperty(integrator.cache.nlsolver, :cache) + + # Verify the verbosity was passed through correctly + @test integrator.cache.nlsolver.cache.cache.verbose == NonlinearVerbosity(SciMLLogging.Detailed()) + end + + end end From d3f14dc79f956d566dd6376dea09179e31004ac1 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 15:11:34 -0500 Subject: [PATCH 37/74] fix check_error test --- test/integrators/check_error.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integrators/check_error.jl b/test/integrators/check_error.jl index 61ab159544..89d06c9bdd 100644 --- a/test/integrators/check_error.jl +++ b/test/integrators/check_error.jl @@ -4,7 +4,7 @@ f_ec(u, p, t) = exp(u) u0 = 0.0 # explosion time is 1.0 tspan = (0.0, 10.0) prob = ODEProblem(f_ec, u0, tspan) -options = [:reltol => 1e-8, :abstol => 1e-8, :verbose => false] +options = [:reltol => 1e-8, :abstol => 1e-8] desired_codes = (ReturnCode.MaxIters, ReturnCode.Unstable) # Test that sol.retcode is set to the correct value by various ways to From dbec897daf2bd8d67ca30e067fc3c1bf4eb072a9 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 15:16:34 -0500 Subject: [PATCH 38/74] fix FBDF dae tests --- lib/OrdinaryDiffEqBDF/test/dae_ad_tests.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/OrdinaryDiffEqBDF/test/dae_ad_tests.jl b/lib/OrdinaryDiffEqBDF/test/dae_ad_tests.jl index cdb037f45e..ddf39d655b 100644 --- a/lib/OrdinaryDiffEqBDF/test/dae_ad_tests.jl +++ b/lib/OrdinaryDiffEqBDF/test/dae_ad_tests.jl @@ -36,11 +36,11 @@ f_mm = ODEFunction{true}(f_ode, mass_matrix = M) prob_mm = ODEProblem(f_mm, u₀, tspan, p) f_mm_oop = ODEFunction{false}(f_ode, mass_matrix = M) prob_mm_oop = ODEProblem(f_mm_oop, u₀, tspan, p) -@test_broken sol1 = @inferred solve( +sol1 = @inferred solve( prob, DFBDF(autodiff = afd_cs3), dt = 1e-5, abstol = 1e-8, reltol = 1e-8) -@test_broken sol2 = @inferred solve( +sol2 = @inferred solve( prob_oop, DFBDF(autodiff = afd_cs3), dt = 1e-5, abstol = 1e-8, reltol = 1e-8) -@test_broken sol3 = @inferred solve( +sol3 = @inferred solve( prob_mm, FBDF(autodiff = afd_cs3), dt = 1e-5, abstol = 1e-8, reltol = 1e-8) # These tests flex differentiation of the solver and through the initialization From e9b11ffb175a4dc6833566028ca34119bbb9584b Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 15:25:24 -0500 Subject: [PATCH 39/74] fix sources for ExponentialRK Tsit5 --- lib/OrdinaryDiffEqExponentialRK/Project.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/OrdinaryDiffEqExponentialRK/Project.toml b/lib/OrdinaryDiffEqExponentialRK/Project.toml index cb2f73d009..bc7bdc3746 100644 --- a/lib/OrdinaryDiffEqExponentialRK/Project.toml +++ b/lib/OrdinaryDiffEqExponentialRK/Project.toml @@ -70,3 +70,6 @@ path = "../OrdinaryDiffEqCore" [sources.OrdinaryDiffEqVerner] path = "../OrdinaryDiffEqVerner" + +[sources.OrdinaryDiffEqTsit5] +path = "../OrdinaryDiffEqTsit5" From 5b2906bea3bf68af5793929f7f41f25e969c227c Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 15:27:11 -0500 Subject: [PATCH 40/74] fix test source for OrdinaryDiffEqRosenbrock for ODELinear --- lib/OrdinaryDiffEqLinear/Project.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/OrdinaryDiffEqLinear/Project.toml b/lib/OrdinaryDiffEqLinear/Project.toml index e7ff169003..c7892ca516 100644 --- a/lib/OrdinaryDiffEqLinear/Project.toml +++ b/lib/OrdinaryDiffEqLinear/Project.toml @@ -57,3 +57,6 @@ path = "../OrdinaryDiffEqCore" [sources.OrdinaryDiffEqVerner] path = "../OrdinaryDiffEqVerner" + +[sources.OrdinaryDiffEqRosenbrock] +path = "../OrdinaryDiffEqRosenbrock" From a84745c9e2a45747a9eb27e9375b01af792adcd2 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 15:29:06 -0500 Subject: [PATCH 41/74] fix source of OrdinaryDiffEqSDIRK for OrdinaryDiffEqNonlinearSolve --- lib/OrdinaryDiffEqNonlinearSolve/Project.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/OrdinaryDiffEqNonlinearSolve/Project.toml b/lib/OrdinaryDiffEqNonlinearSolve/Project.toml index efd97fa154..2d45ed5c44 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/Project.toml +++ b/lib/OrdinaryDiffEqNonlinearSolve/Project.toml @@ -76,3 +76,6 @@ path = "../OrdinaryDiffEqDifferentiation" [sources.OrdinaryDiffEqCore] path = "../OrdinaryDiffEqCore" + +[sources.OrdinaryDiffEqSDIRK] +path = "../OrdinaryDiffEqSDIRK" From 5163b431ff5d4c4f017b6a8351c41f22cf1a5b44 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 15:34:16 -0500 Subject: [PATCH 42/74] fix source of OrdinaryDiffEqTsit5 for OrdinaryDiffEqSymplecticRK --- lib/OrdinaryDiffEqSymplecticRK/Project.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/OrdinaryDiffEqSymplecticRK/Project.toml b/lib/OrdinaryDiffEqSymplecticRK/Project.toml index ca9128eec9..560c1d8d54 100644 --- a/lib/OrdinaryDiffEqSymplecticRK/Project.toml +++ b/lib/OrdinaryDiffEqSymplecticRK/Project.toml @@ -53,3 +53,6 @@ test = ["DiffEqDevTools", "Random", "SafeTestsets", "Test", "Statistics", "Linea [sources.OrdinaryDiffEqCore] path = "../OrdinaryDiffEqCore" + +[sources.OrdinaryDiffEqTsit5] +path = "../OrdinaryDiffEqTsit5" From 5b5bae4c90127119ee0550432c53872ac8f437ed Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 15:38:33 -0500 Subject: [PATCH 43/74] fix source of SDIRK for ImplicitDiscreteSolve --- lib/ImplicitDiscreteSolve/Project.toml | 3 +++ .../src/SimpleImplicitDiscreteSolve.jl | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ImplicitDiscreteSolve/Project.toml b/lib/ImplicitDiscreteSolve/Project.toml index 8d2cae8c4f..2d6a578e6d 100644 --- a/lib/ImplicitDiscreteSolve/Project.toml +++ b/lib/ImplicitDiscreteSolve/Project.toml @@ -39,3 +39,6 @@ test = ["OrdinaryDiffEqSDIRK", "Test", "JET", "Aqua", "AllocCheck"] [sources.OrdinaryDiffEqCore] path = "../OrdinaryDiffEqCore" + +[sources.OrdinaryDiffEqSDIRK] +path = "../OrdinaryDiffEqSDIRK" diff --git a/lib/SimpleImplicitDiscreteSolve/src/SimpleImplicitDiscreteSolve.jl b/lib/SimpleImplicitDiscreteSolve/src/SimpleImplicitDiscreteSolve.jl index b575961ee3..3334800fa8 100644 --- a/lib/SimpleImplicitDiscreteSolve/src/SimpleImplicitDiscreteSolve.jl +++ b/lib/SimpleImplicitDiscreteSolve/src/SimpleImplicitDiscreteSolve.jl @@ -3,6 +3,7 @@ module SimpleImplicitDiscreteSolve using SciMLBase using SimpleNonlinearSolve using Reexport + @reexport using SciMLBase """ @@ -65,7 +66,7 @@ function SciMLBase.solve(prob::ImplicitDiscreteProblem, alg::SimpleIDSolve; nlf = isinplace(f) ? (out, u, p) -> f(out, u, uprev, p, t) : (u, p) -> f(u, uprev, p, t) nlprob = NonlinearProblem{isinplace(f)}(nlf, uprev, p) - nlsol = solve(nlprob, SimpleNewtonRaphson(), verbose = Minimal()) + nlsol = solve(nlprob, SimpleNewtonRaphson()) u = nlsol.u save_everystep && (us[i] = u) convfail = (nlsol.retcode != ReturnCode.Success) From e89034979374d0e6b54039efcf54fe122a595a8f Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 16:00:39 -0500 Subject: [PATCH 44/74] remove unused @SciMLMessage in OrdinaryDiffEqBDF --- lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl b/lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl index 864ec2243d..fb7ab3d305 100644 --- a/lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl +++ b/lib/OrdinaryDiffEqBDF/src/OrdinaryDiffEqBDF.jl @@ -21,7 +21,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, step_reject_controller!, post_newton_controller!, u_modified!, DAEAlgorithm, _unwrap_val, DummyController, get_fsalfirstlast, generic_solver_docstring, _bool_to_ADType, - _process_AD_choice, @SciMLMessage + _process_AD_choice using OrdinaryDiffEqSDIRK: ImplicitEulerConstantCache, ImplicitEulerCache using TruncatedStacktraces: @truncate_stacktrace From cfa5c5b3193e93e36ea8047f44101b388a53eb5f Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 16:16:18 -0500 Subject: [PATCH 45/74] fix source of OrdinaryDiffEqRKN for OrdinaryDiffEqBDF --- lib/OrdinaryDiffEqSymplecticRK/Project.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/OrdinaryDiffEqSymplecticRK/Project.toml b/lib/OrdinaryDiffEqSymplecticRK/Project.toml index 560c1d8d54..ff43963b83 100644 --- a/lib/OrdinaryDiffEqSymplecticRK/Project.toml +++ b/lib/OrdinaryDiffEqSymplecticRK/Project.toml @@ -56,3 +56,6 @@ path = "../OrdinaryDiffEqCore" [sources.OrdinaryDiffEqTsit5] path = "../OrdinaryDiffEqTsit5" + +[sources.OrdinaryDiffEqRKN] +path = "../OrdinaryDiffEqRKN" From 723757bcba108bb156363c8ad650eeebf6934069 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 16:51:29 -0500 Subject: [PATCH 46/74] add several verbosity toggles --- lib/OrdinaryDiffEqCore/src/verbosity.jl | 76 ++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 7 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index 3af61677e5..e9f76df3c3 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -14,16 +14,25 @@ diagnostic messages, warnings, and errors during ODE solution. - `dt_min_unstable`: Messages when time step becomes too small/unstable - `instability`: Messages when numerical instability is detected - `newton_convergence`: Messages when Newton iteration fails to converge +- `step_rejected`: Messages when adaptive steps are rejected +- `step_accepted`: Messages when adaptive steps are accepted +- `convergence_limit`: Messages when convergence at floating point precision limit ## Performance Group - `alg_switch`: Messages when algorithm switching occurs - `mismatched_input_output_type`: Messages when input/output types don't match +- `jacobian_update`: Messages when Jacobian matrix is computed/updated +- `w_factorization`: Messages when W matrix is factorized +- `newton_iterations`: Messages about Newton iteration progress ## Numerical Group - `rosenbrock_no_differential_states`: Messages when Rosenbrock has no differential states - `shampine_dt`: Messages about Shampine time step selection - `unlimited_dt`: Messages when time step is unlimited - `dt_epsilon`: Messages when timestep goes below floating point epsilon +- `order_change`: Messages when extrapolation order changes +- `stability_check`: Messages about stability checks in extrapolation methods +- `near_singular`: Messages when Jacobian/mass matrix appears near-singular ## Solver Verbosity Groups - `linear_verbosity`: Verbosity configuration for linear solvers @@ -81,20 +90,29 @@ verbose = ODEVerbosity( dt_min_unstable instability newton_convergence + step_rejected + step_accepted + convergence_limit # Performance alg_switch mismatched_input_output_type + jacobian_update + w_factorization + newton_iterations # Numerical rosenbrock_no_differential_states shampine_dt unlimited_dt dt_epsilon + order_change + stability_check + near_singular end # Group classifications -const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat, :max_iters, :dt_min_unstable, :instability, :newton_convergence) -const performance_options = (:alg_switch, :mismatched_input_output_type) -const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt, :dt_epsilon) +const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat, :max_iters, :dt_min_unstable, :instability, :newton_convergence, :step_rejected, :step_accepted, :convergence_limit) +const performance_options = (:alg_switch, :mismatched_input_output_type, :jacobian_update, :w_factorization, :newton_iterations) +const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt, :dt_epsilon, :order_change, :stability_check, :near_singular) function option_group(option::Symbol) if option in error_control_options @@ -161,12 +179,21 @@ function ODEVerbosity(; dt_min_unstable = WarnLevel(), instability = WarnLevel(), newton_convergence = WarnLevel(), + step_rejected = Silent(), + step_accepted = Silent(), + convergence_limit = Silent(), alg_switch = WarnLevel(), mismatched_input_output_type = WarnLevel(), + jacobian_update = Silent(), + w_factorization = Silent(), + newton_iterations = Silent(), rosenbrock_no_differential_states = WarnLevel(), shampine_dt = WarnLevel(), unlimited_dt = WarnLevel(), - dt_epsilon = WarnLevel() + dt_epsilon = WarnLevel(), + order_change = Silent(), + stability_check = Silent(), + near_singular = Silent() ) # Apply group-level settings @@ -205,12 +232,21 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) dt_min_unstable = WarnLevel(), instability = WarnLevel(), newton_convergence = WarnLevel(), + step_rejected = Silent(), + step_accepted = Silent(), + convergence_limit = Silent(), alg_switch = Silent(), mismatched_input_output_type = Silent(), + jacobian_update = Silent(), + w_factorization = Silent(), + newton_iterations = Silent(), rosenbrock_no_differential_states = WarnLevel(), shampine_dt = Silent(), unlimited_dt = WarnLevel(), - dt_epsilon = Silent() + dt_epsilon = Silent(), + order_change = Silent(), + stability_check = Silent(), + near_singular = WarnLevel() ) elseif verbose isa Standard # Standard: Everything from Minimal + non-fatal warnings @@ -227,12 +263,21 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) dt_min_unstable = WarnLevel(), instability = WarnLevel(), newton_convergence = WarnLevel(), + step_rejected = InfoLevel(), + step_accepted = Silent(), + convergence_limit = InfoLevel(), alg_switch = InfoLevel(), mismatched_input_output_type = WarnLevel(), + jacobian_update = InfoLevel(), + w_factorization = InfoLevel(), + newton_iterations = InfoLevel(), rosenbrock_no_differential_states = WarnLevel(), shampine_dt = InfoLevel(), unlimited_dt = WarnLevel(), - dt_epsilon = InfoLevel() + dt_epsilon = InfoLevel(), + order_change = InfoLevel(), + stability_check = InfoLevel(), + near_singular = WarnLevel() ) elseif verbose isa All # All: Maximum verbosity - every possible logging message at InfoLevel @@ -246,12 +291,21 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) dt_min_unstable = WarnLevel(), instability = WarnLevel(), newton_convergence = WarnLevel(), + step_rejected = InfoLevel(), + step_accepted = InfoLevel(), + convergence_limit = InfoLevel(), alg_switch = InfoLevel(), mismatched_input_output_type = InfoLevel(), + jacobian_update = InfoLevel(), + w_factorization = InfoLevel(), + newton_iterations = InfoLevel(), rosenbrock_no_differential_states = WarnLevel(), shampine_dt = InfoLevel(), unlimited_dt = WarnLevel(), - dt_epsilon = InfoLevel() + dt_epsilon = InfoLevel(), + order_change = InfoLevel(), + stability_check = InfoLevel(), + near_singular = WarnLevel() ) end end @@ -272,6 +326,14 @@ end Silent(), Silent(), Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), + Silent(), Silent() ) end From 067835c1284c5191eef39a263b49ea0200d84df1 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 17:35:28 -0500 Subject: [PATCH 47/74] add several verbosity toggles --- lib/OrdinaryDiffEqCore/src/composite_algs.jl | 9 ++++++ lib/OrdinaryDiffEqCore/src/initdt.jl | 15 ++++++++-- .../src/integrators/integrator_utils.jl | 4 +++ lib/OrdinaryDiffEqCore/src/verbosity.jl | 28 +++++-------------- .../src/derivative_utils.jl | 23 ++++++++++++++- .../src/extrapolation_perform_step.jl | 7 +++-- .../src/nlsolve.jl | 10 +++++++ 7 files changed, 69 insertions(+), 27 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/composite_algs.jl b/lib/OrdinaryDiffEqCore/src/composite_algs.jl index 6beec535d5..6f86c10a6f 100644 --- a/lib/OrdinaryDiffEqCore/src/composite_algs.jl +++ b/lib/OrdinaryDiffEqCore/src/composite_algs.jl @@ -17,6 +17,11 @@ function is_stiff(integrator, alg, ntol, stol, is_stiffalg) os = oneunit(stiffness) bool = !(stiffness <= os * tol) + if bool + @SciMLMessage("Stiffness detected: |eigen_est·dt/stability_size| = $(stiffness) > $(os * tol)", + integrator.opts.verbose, :alg_switch) + end + if !bool integrator.alg.choice_function.successive_switches += 1 else @@ -50,9 +55,13 @@ function (AS::AutoSwitchCache)(integrator) AS.count < 0 ? 1 : AS.count + 1 : AS.count > 0 ? -1 : AS.count - 1 if (!AS.is_stiffalg && AS.count > AS.maxstiffstep) + @SciMLMessage("Switching from $(AS.nonstiffalg) to $(AS.stiffalg) (stiff count: $(AS.count))", + integrator.opts.verbose, :alg_switch) integrator.dt = dt * AS.dtfac AS.is_stiffalg = true elseif (AS.is_stiffalg && AS.count < -AS.maxnonstiffstep) + @SciMLMessage("Switching from $(AS.stiffalg) to $(AS.nonstiffalg) (nonstiff count: $(abs(AS.count))), dt adjusted by factor $(1/AS.dtfac)", + integrator.opts.verbose, :alg_switch) integrator.dt = dt / AS.dtfac AS.is_stiffalg = false end diff --git a/lib/OrdinaryDiffEqCore/src/initdt.jl b/lib/OrdinaryDiffEqCore/src/initdt.jl index 615b806e3d..528be3eb59 100644 --- a/lib/OrdinaryDiffEqCore/src/initdt.jl +++ b/lib/OrdinaryDiffEqCore/src/initdt.jl @@ -12,7 +12,10 @@ smalldt = max(dtmin, convert(_tType, oneunit_tType * 1 // 10^(6))) if integrator.isdae - return tdir * max(smalldt, dtmin) + result_dt = tdir * max(smalldt, dtmin) + @SciMLMessage("Using default small timestep for DAE: dt = $(result_dt)", + integrator.opts.verbose, :shampine_dt) + return result_dt end if eltype(u0) <: Number && !(integrator.alg isa CompositeAlgorithm) @@ -110,7 +113,10 @@ integrator.alg.linsolve(ftmp, copy(prob.f.mass_matrix), f₀, true) copyto!(f₀, ftmp) catch - return tdir * max(smalldt, dtmin) + result_dt = tdir * max(smalldt, dtmin) + @SciMLMessage("Mass matrix appears singular, using default small timestep: dt = $(result_dt)", + integrator.opts.verbose, :near_singular) + return result_dt end end @@ -148,7 +154,10 @@ if typeof(one(_tType)) <: AbstractFloat && dt₀ < 10eps(_tType) * oneunit(_tType) # This catches Andreas' non-singular example # should act like it's singular - return tdir * max(smalldt, dtmin) + result_dt = tdir * max(smalldt, dtmin) + @SciMLMessage("Initial timestep too small (near machine epsilon), using default: dt = $(result_dt)", + integrator.opts.verbose, :dt_epsilon) + return result_dt end dt₀_tdir = tdir * dt₀ diff --git a/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl b/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl index c46f5d8c52..477ec8d69a 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl @@ -10,12 +10,16 @@ function loopheader!(integrator) if integrator.iter > 0 if (integrator.opts.adaptive && !integrator.accept_step) || integrator.force_stepfail + @SciMLMessage("Step rejected: EEst = $(integrator.EEst), adjusting dt: $(integrator.tprev + integrator.dtpropose) → $(integrator.t + integrator.dt)", + integrator.opts.verbose, :step_rejected) if integrator.isout integrator.dt = integrator.dt * integrator.opts.qmin elseif !integrator.force_stepfail step_reject_controller!(integrator, integrator.alg) end else + @SciMLMessage("Step accepted: t = $(integrator.t), dt = $(integrator.dt), EEst = $(integrator.EEst)", + integrator.opts.verbose, :step_accepted) integrator.success_iter += 1 apply_step!(integrator) end diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index e9f76df3c3..539e4ba9b9 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -12,7 +12,6 @@ diagnostic messages, warnings, and errors during ODE solution. - `dense_output_saveat`: Messages about dense output with saveat - `max_iters`: Messages when maximum iterations are reached - `dt_min_unstable`: Messages when time step becomes too small/unstable -- `instability`: Messages when numerical instability is detected - `newton_convergence`: Messages when Newton iteration fails to converge - `step_rejected`: Messages when adaptive steps are rejected - `step_accepted`: Messages when adaptive steps are accepted @@ -30,7 +29,6 @@ diagnostic messages, warnings, and errors during ODE solution. - `shampine_dt`: Messages about Shampine time step selection - `unlimited_dt`: Messages when time step is unlimited - `dt_epsilon`: Messages when timestep goes below floating point epsilon -- `order_change`: Messages when extrapolation order changes - `stability_check`: Messages about stability checks in extrapolation methods - `near_singular`: Messages when Jacobian/mass matrix appears near-singular @@ -88,7 +86,6 @@ verbose = ODEVerbosity( dense_output_saveat max_iters dt_min_unstable - instability newton_convergence step_rejected step_accepted @@ -104,15 +101,14 @@ verbose = ODEVerbosity( shampine_dt unlimited_dt dt_epsilon - order_change stability_check near_singular end # Group classifications -const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat, :max_iters, :dt_min_unstable, :instability, :newton_convergence, :step_rejected, :step_accepted, :convergence_limit) +const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat, :max_iters, :dt_min_unstable, :newton_convergence, :step_rejected, :step_accepted, :convergence_limit) const performance_options = (:alg_switch, :mismatched_input_output_type, :jacobian_update, :w_factorization, :newton_iterations) -const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt, :dt_epsilon, :order_change, :stability_check, :near_singular) +const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt, :dt_epsilon, :stability_check, :near_singular) function option_group(option::Symbol) if option in error_control_options @@ -177,21 +173,19 @@ function ODEVerbosity(; dense_output_saveat = WarnLevel(), max_iters = WarnLevel(), dt_min_unstable = WarnLevel(), - instability = WarnLevel(), - newton_convergence = WarnLevel(), + newton_convergence = Silent(), step_rejected = Silent(), step_accepted = Silent(), convergence_limit = Silent(), - alg_switch = WarnLevel(), + alg_switch = Silent(), mismatched_input_output_type = WarnLevel(), jacobian_update = Silent(), w_factorization = Silent(), newton_iterations = Silent(), rosenbrock_no_differential_states = WarnLevel(), - shampine_dt = WarnLevel(), + shampine_dt = Silent(), unlimited_dt = WarnLevel(), - dt_epsilon = WarnLevel(), - order_change = Silent(), + dt_epsilon = Silent(), stability_check = Silent(), near_singular = Silent() ) @@ -230,7 +224,6 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) dense_output_saveat = Silent(), max_iters = WarnLevel(), dt_min_unstable = WarnLevel(), - instability = WarnLevel(), newton_convergence = WarnLevel(), step_rejected = Silent(), step_accepted = Silent(), @@ -244,7 +237,6 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) shampine_dt = Silent(), unlimited_dt = WarnLevel(), dt_epsilon = Silent(), - order_change = Silent(), stability_check = Silent(), near_singular = WarnLevel() ) @@ -261,9 +253,8 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) dense_output_saveat = InfoLevel(), max_iters = WarnLevel(), dt_min_unstable = WarnLevel(), - instability = WarnLevel(), newton_convergence = WarnLevel(), - step_rejected = InfoLevel(), + step_rejected = Silent(), step_accepted = Silent(), convergence_limit = InfoLevel(), alg_switch = InfoLevel(), @@ -275,7 +266,6 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) shampine_dt = InfoLevel(), unlimited_dt = WarnLevel(), dt_epsilon = InfoLevel(), - order_change = InfoLevel(), stability_check = InfoLevel(), near_singular = WarnLevel() ) @@ -289,7 +279,6 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) dense_output_saveat = InfoLevel(), max_iters = WarnLevel(), dt_min_unstable = WarnLevel(), - instability = WarnLevel(), newton_convergence = WarnLevel(), step_rejected = InfoLevel(), step_accepted = InfoLevel(), @@ -303,7 +292,6 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) shampine_dt = InfoLevel(), unlimited_dt = WarnLevel(), dt_epsilon = InfoLevel(), - order_change = InfoLevel(), stability_check = InfoLevel(), near_singular = WarnLevel() ) @@ -332,8 +320,6 @@ end Silent(), Silent(), Silent(), - Silent(), - Silent(), Silent() ) end diff --git a/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl b/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl index 86a3671174..6df7e5c93d 100644 --- a/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl +++ b/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl @@ -122,6 +122,19 @@ function calc_J(integrator, cache, next_step::Bool = false) uprev = integrator.u end + method = if SciMLBase.has_jac(f) + "user-provided" + else + if hasproperty(cache, :jac_config) && cache.jac_config !== nothing + "autodiff" + else + "finite-diff" + end + end + + @SciMLMessage("Computing Jacobian at t = $(t) using $(method)", + integrator.opts.verbose, :jacobian_update) + if alg isa DAEAlgorithm if SciMLBase.has_jac(f) duprev = integrator.duprev @@ -726,8 +739,12 @@ function update_W!(nlsolver::AbstractNLSolver, integrator::SciMLBase.DEIntegrator{<:Any, true}, cache, dtgamma, repeat_step::Bool, newJW = nothing) if isnewton(nlsolver) - calc_W!(get_W(nlsolver), integrator, nlsolver, cache, dtgamma, repeat_step, + new_jac, new_W = calc_W!(get_W(nlsolver), integrator, nlsolver, cache, dtgamma, repeat_step, newJW) + if new_W + @SciMLMessage("W matrix factorized: dtgamma = $(dtgamma), new_jac = $(new_jac)", + integrator.opts.verbose, :w_factorization) + end end nothing end @@ -754,6 +771,10 @@ function update_W!(nlsolver::AbstractNLSolver, elseif new_W && !isdae set_W_γdt!(nlsolver, dtgamma) end + if new_W + @SciMLMessage("W matrix factorized: dtgamma = $(dtgamma), new_jac = $(new_jac)", + integrator.opts.verbose, :w_factorization) + end end nothing end diff --git a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_perform_step.jl b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_perform_step.jl index f4858d5fc2..84538f8fbe 100644 --- a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_perform_step.jl +++ b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_perform_step.jl @@ -316,9 +316,12 @@ function perform_step!(integrator, cache::ImplicitEulerExtrapolationCache, # Deuflhard Stability check for initial two sequences @.. broadcast=false diff2[1]=u_tmps[1]-u_tmps2[1] @.. broadcast=false diff2[1]=0.5*(diff2[1]-diff1[1]) - if integrator.opts.internalnorm(diff1[1], t) < - integrator.opts.internalnorm(diff2[1], t) + norm_diff1 = integrator.opts.internalnorm(diff1[1], t) + norm_diff2 = integrator.opts.internalnorm(diff2[1], t) + if norm_diff1 < norm_diff2 # Divergence of iteration, overflow is possible. Force fail and start with smaller step + @SciMLMessage("Deuflhard stability check failed: ||diff1|| = $(norm_diff1) < ||diff2|| = $(norm_diff2), divergence detected", + integrator.opts.verbose, :stability_check) integrator.force_stepfail = true return end diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl index 3e389d4270..80fdddf5ac 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl @@ -54,6 +54,8 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, ndz = compute_step!(nlsolver, integrator) end if !isfinite(ndz) + @SciMLMessage("Newton iteration diverged: residual norm is not finite (ndz = $(ndz))", + integrator.opts.verbose, :newton_convergence) nlsolver.status = Divergence nlsolver.nfails += 1 break @@ -71,6 +73,8 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, # it convergence/divergence according to `ndz` directly. if abs(θ - one(θ)) <= eps_around_one(θ) if ndz <= one(ndz) + @SciMLMessage("Newton iteration converged at floating point limit: θ ≈ 1.0, ndz = $(ndz)", + integrator.opts.verbose, :convergence_limit) nlsolver.status = Convergence nlsolver.nfails = 0 break @@ -83,6 +87,8 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, # divergence if check_div′ && θ > 2 + @SciMLMessage("Newton iteration diverging: θ = $(θ) > 2, ndz = $(ndz), ndzprev = $(ndzprev)", + integrator.opts.verbose, :newton_convergence) nlsolver.status = Divergence nlsolver.nfails += 1 break @@ -108,6 +114,8 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, (isnewton(nlsolver) && isadaptive(integrator.alg))) if (iter == 1 && ndz < 1e-5) || (check_η_convergence && η >= zero(η) && η * ndz < κ) + @SciMLMessage("Newton iteration converged in $(iter) iterations: η = $(η), ndz = $(ndz)", + integrator.opts.verbose, :newton_iterations) nlsolver.status = Convergence nlsolver.nfails = 0 break @@ -116,6 +124,8 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, if isnewton(nlsolver) && nlsolver.status == Divergence && !isJcurrent(nlsolver, integrator) + @SciMLMessage("Newton iteration failed with stale Jacobian, retrying with fresh Jacobian", + integrator.opts.verbose, :newton_convergence) nlsolver.status = TryAgain nlsolver.nfails += 1 always_new || @goto REDO From 454727140fae74b1cd827c9cc8253434127dbb52 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 18:25:15 -0500 Subject: [PATCH 48/74] fix the None constructor --- lib/OrdinaryDiffEqCore/src/verbosity.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index 539e4ba9b9..ddf6cc73f8 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -320,6 +320,7 @@ end Silent(), Silent(), Silent(), + Silent(), Silent() ) end From 6206adedc912bc988dceeabeae473e54455c1ea4 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 19:02:05 -0500 Subject: [PATCH 49/74] add stiff detection toggle --- lib/OrdinaryDiffEqCore/src/composite_algs.jl | 8 ++++---- lib/OrdinaryDiffEqCore/src/verbosity.jl | 13 ++++++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/composite_algs.jl b/lib/OrdinaryDiffEqCore/src/composite_algs.jl index 6f86c10a6f..218ec44b78 100644 --- a/lib/OrdinaryDiffEqCore/src/composite_algs.jl +++ b/lib/OrdinaryDiffEqCore/src/composite_algs.jl @@ -18,8 +18,8 @@ function is_stiff(integrator, alg, ntol, stol, is_stiffalg) bool = !(stiffness <= os * tol) if bool - @SciMLMessage("Stiffness detected: |eigen_est·dt/stability_size| = $(stiffness) > $(os * tol)", - integrator.opts.verbose, :alg_switch) + @SciMLMessage("Stiffness detected at t = $(integrator.t)", + integrator.opts.verbose, :stiff_detection) end if !bool @@ -55,12 +55,12 @@ function (AS::AutoSwitchCache)(integrator) AS.count < 0 ? 1 : AS.count + 1 : AS.count > 0 ? -1 : AS.count - 1 if (!AS.is_stiffalg && AS.count > AS.maxstiffstep) - @SciMLMessage("Switching from $(AS.nonstiffalg) to $(AS.stiffalg) (stiff count: $(AS.count))", + @SciMLMessage("Switching from $(nameof(typeof(AS.nonstiffalg))) to $(nameof(typeof(AS.stiffalg))) at t = $(integrator.t)", integrator.opts.verbose, :alg_switch) integrator.dt = dt * AS.dtfac AS.is_stiffalg = true elseif (AS.is_stiffalg && AS.count < -AS.maxnonstiffstep) - @SciMLMessage("Switching from $(AS.stiffalg) to $(AS.nonstiffalg) (nonstiff count: $(abs(AS.count))), dt adjusted by factor $(1/AS.dtfac)", + @SciMLMessage("Switching from $(nameof(typeof(AS.stiffalg))) to $(nameof(typeof(AS.nonstiffalg))) at t = $(integrator.t)", integrator.opts.verbose, :alg_switch) integrator.dt = dt / AS.dtfac AS.is_stiffalg = false diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index ddf6cc73f8..a6a61e4c67 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -19,6 +19,7 @@ diagnostic messages, warnings, and errors during ODE solution. ## Performance Group - `alg_switch`: Messages when algorithm switching occurs +- `stiff_detection`: Messages when stiffness is detected - `mismatched_input_output_type`: Messages when input/output types don't match - `jacobian_update`: Messages when Jacobian matrix is computed/updated - `w_factorization`: Messages when W matrix is factorized @@ -92,6 +93,7 @@ verbose = ODEVerbosity( convergence_limit # Performance alg_switch + stiff_detection mismatched_input_output_type jacobian_update w_factorization @@ -107,7 +109,7 @@ end # Group classifications const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat, :max_iters, :dt_min_unstable, :newton_convergence, :step_rejected, :step_accepted, :convergence_limit) -const performance_options = (:alg_switch, :mismatched_input_output_type, :jacobian_update, :w_factorization, :newton_iterations) +const performance_options = (:alg_switch, :stiff_detection, :mismatched_input_output_type, :jacobian_update, :w_factorization, :newton_iterations) const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt, :dt_epsilon, :stability_check, :near_singular) function option_group(option::Symbol) @@ -178,6 +180,7 @@ function ODEVerbosity(; step_accepted = Silent(), convergence_limit = Silent(), alg_switch = Silent(), + stiff_detection = Silent(), mismatched_input_output_type = WarnLevel(), jacobian_update = Silent(), w_factorization = Silent(), @@ -229,6 +232,7 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) step_accepted = Silent(), convergence_limit = Silent(), alg_switch = Silent(), + stiff_detection = Silent(), mismatched_input_output_type = Silent(), jacobian_update = Silent(), w_factorization = Silent(), @@ -258,16 +262,17 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) step_accepted = Silent(), convergence_limit = InfoLevel(), alg_switch = InfoLevel(), + stiff_detection = Silent(), mismatched_input_output_type = WarnLevel(), jacobian_update = InfoLevel(), w_factorization = InfoLevel(), newton_iterations = InfoLevel(), rosenbrock_no_differential_states = WarnLevel(), - shampine_dt = InfoLevel(), + shampine_dt = Silent(), unlimited_dt = WarnLevel(), dt_epsilon = InfoLevel(), stability_check = InfoLevel(), - near_singular = WarnLevel() + near_singular = Silent() ) elseif verbose isa All # All: Maximum verbosity - every possible logging message at InfoLevel @@ -284,6 +289,7 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) step_accepted = InfoLevel(), convergence_limit = InfoLevel(), alg_switch = InfoLevel(), + stiff_detection = InfoLevel(), mismatched_input_output_type = InfoLevel(), jacobian_update = InfoLevel(), w_factorization = InfoLevel(), @@ -321,6 +327,7 @@ end Silent(), Silent(), Silent(), + Silent(), Silent() ) end From 627fe0df8d49cd1e29b3c5dba230a0fd2a0faadd Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 19:45:24 -0500 Subject: [PATCH 50/74] add instability toggle back for SciMLBase --- lib/OrdinaryDiffEqCore/src/verbosity.jl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index a6a61e4c67..dcf528d75f 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -12,6 +12,7 @@ diagnostic messages, warnings, and errors during ODE solution. - `dense_output_saveat`: Messages about dense output with saveat - `max_iters`: Messages when maximum iterations are reached - `dt_min_unstable`: Messages when time step becomes too small/unstable +- `instability`: Messages when numerical instability is detected - `newton_convergence`: Messages when Newton iteration fails to converge - `step_rejected`: Messages when adaptive steps are rejected - `step_accepted`: Messages when adaptive steps are accepted @@ -87,6 +88,7 @@ verbose = ODEVerbosity( dense_output_saveat max_iters dt_min_unstable + instability newton_convergence step_rejected step_accepted @@ -108,7 +110,7 @@ verbose = ODEVerbosity( end # Group classifications -const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat, :max_iters, :dt_min_unstable, :newton_convergence, :step_rejected, :step_accepted, :convergence_limit) +const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat, :max_iters, :dt_min_unstable, :instability, :newton_convergence, :step_rejected, :step_accepted, :convergence_limit) const performance_options = (:alg_switch, :stiff_detection, :mismatched_input_output_type, :jacobian_update, :w_factorization, :newton_iterations) const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt, :dt_epsilon, :stability_check, :near_singular) @@ -175,6 +177,7 @@ function ODEVerbosity(; dense_output_saveat = WarnLevel(), max_iters = WarnLevel(), dt_min_unstable = WarnLevel(), + instability = WarnLevel(), newton_convergence = Silent(), step_rejected = Silent(), step_accepted = Silent(), @@ -227,6 +230,7 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) dense_output_saveat = Silent(), max_iters = WarnLevel(), dt_min_unstable = WarnLevel(), + instability = WarnLevel(), newton_convergence = WarnLevel(), step_rejected = Silent(), step_accepted = Silent(), @@ -257,6 +261,7 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) dense_output_saveat = InfoLevel(), max_iters = WarnLevel(), dt_min_unstable = WarnLevel(), + instability = WarnLevel(), newton_convergence = WarnLevel(), step_rejected = Silent(), step_accepted = Silent(), @@ -268,11 +273,11 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) w_factorization = InfoLevel(), newton_iterations = InfoLevel(), rosenbrock_no_differential_states = WarnLevel(), - shampine_dt = Silent(), + shampine_dt = InfoLevel(), unlimited_dt = WarnLevel(), dt_epsilon = InfoLevel(), stability_check = InfoLevel(), - near_singular = Silent() + near_singular = WarnLevel() ) elseif verbose isa All # All: Maximum verbosity - every possible logging message at InfoLevel @@ -284,6 +289,7 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) dense_output_saveat = InfoLevel(), max_iters = WarnLevel(), dt_min_unstable = WarnLevel(), + instability = WarnLevel(), newton_convergence = WarnLevel(), step_rejected = InfoLevel(), step_accepted = InfoLevel(), @@ -328,6 +334,7 @@ end Silent(), Silent(), Silent(), + Silent(), Silent() ) end From d8d14472aa2974d3648ed630ffd685259bbe0039 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 20:09:00 -0500 Subject: [PATCH 51/74] use lazy strings for interpolation --- lib/OrdinaryDiffEqCore/src/composite_algs.jl | 6 +++--- lib/OrdinaryDiffEqCore/src/initdt.jl | 6 +++--- .../src/integrators/integrator_utils.jl | 4 ++-- .../src/derivative_utils.jl | 6 +++--- .../src/extrapolation_perform_step.jl | 2 +- lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl | 8 ++++---- lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl | 10 +++++----- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/composite_algs.jl b/lib/OrdinaryDiffEqCore/src/composite_algs.jl index 218ec44b78..598412dc0c 100644 --- a/lib/OrdinaryDiffEqCore/src/composite_algs.jl +++ b/lib/OrdinaryDiffEqCore/src/composite_algs.jl @@ -18,7 +18,7 @@ function is_stiff(integrator, alg, ntol, stol, is_stiffalg) bool = !(stiffness <= os * tol) if bool - @SciMLMessage("Stiffness detected at t = $(integrator.t)", + @SciMLMessage(lazy"Stiffness detected at t = $(integrator.t)", integrator.opts.verbose, :stiff_detection) end @@ -55,12 +55,12 @@ function (AS::AutoSwitchCache)(integrator) AS.count < 0 ? 1 : AS.count + 1 : AS.count > 0 ? -1 : AS.count - 1 if (!AS.is_stiffalg && AS.count > AS.maxstiffstep) - @SciMLMessage("Switching from $(nameof(typeof(AS.nonstiffalg))) to $(nameof(typeof(AS.stiffalg))) at t = $(integrator.t)", + @SciMLMessage(lazy"Switching from $(nameof(typeof(AS.nonstiffalg))) to $(nameof(typeof(AS.stiffalg))) at t = $(integrator.t)", integrator.opts.verbose, :alg_switch) integrator.dt = dt * AS.dtfac AS.is_stiffalg = true elseif (AS.is_stiffalg && AS.count < -AS.maxnonstiffstep) - @SciMLMessage("Switching from $(nameof(typeof(AS.stiffalg))) to $(nameof(typeof(AS.nonstiffalg))) at t = $(integrator.t)", + @SciMLMessage(lazy"Switching from $(nameof(typeof(AS.stiffalg))) to $(nameof(typeof(AS.nonstiffalg))) at t = $(integrator.t)", integrator.opts.verbose, :alg_switch) integrator.dt = dt / AS.dtfac AS.is_stiffalg = false diff --git a/lib/OrdinaryDiffEqCore/src/initdt.jl b/lib/OrdinaryDiffEqCore/src/initdt.jl index 528be3eb59..6455f5b037 100644 --- a/lib/OrdinaryDiffEqCore/src/initdt.jl +++ b/lib/OrdinaryDiffEqCore/src/initdt.jl @@ -13,7 +13,7 @@ if integrator.isdae result_dt = tdir * max(smalldt, dtmin) - @SciMLMessage("Using default small timestep for DAE: dt = $(result_dt)", + @SciMLMessage(lazy"Using default small timestep for DAE: dt = $(result_dt)", integrator.opts.verbose, :shampine_dt) return result_dt end @@ -114,7 +114,7 @@ copyto!(f₀, ftmp) catch result_dt = tdir * max(smalldt, dtmin) - @SciMLMessage("Mass matrix appears singular, using default small timestep: dt = $(result_dt)", + @SciMLMessage(lazy"Mass matrix appears singular, using default small timestep: dt = $(result_dt)", integrator.opts.verbose, :near_singular) return result_dt end @@ -155,7 +155,7 @@ # This catches Andreas' non-singular example # should act like it's singular result_dt = tdir * max(smalldt, dtmin) - @SciMLMessage("Initial timestep too small (near machine epsilon), using default: dt = $(result_dt)", + @SciMLMessage(lazy"Initial timestep too small (near machine epsilon), using default: dt = $(result_dt)", integrator.opts.verbose, :dt_epsilon) return result_dt end diff --git a/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl b/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl index 477ec8d69a..a011036fef 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl @@ -10,7 +10,7 @@ function loopheader!(integrator) if integrator.iter > 0 if (integrator.opts.adaptive && !integrator.accept_step) || integrator.force_stepfail - @SciMLMessage("Step rejected: EEst = $(integrator.EEst), adjusting dt: $(integrator.tprev + integrator.dtpropose) → $(integrator.t + integrator.dt)", + @SciMLMessage(lazy"Step rejected: EEst = $(integrator.EEst), adjusting dt: $(integrator.tprev + integrator.dtpropose) → $(integrator.t + integrator.dt)", integrator.opts.verbose, :step_rejected) if integrator.isout integrator.dt = integrator.dt * integrator.opts.qmin @@ -18,7 +18,7 @@ function loopheader!(integrator) step_reject_controller!(integrator, integrator.alg) end else - @SciMLMessage("Step accepted: t = $(integrator.t), dt = $(integrator.dt), EEst = $(integrator.EEst)", + @SciMLMessage(lazy"Step accepted: t = $(integrator.t), dt = $(integrator.dt), EEst = $(integrator.EEst)", integrator.opts.verbose, :step_accepted) integrator.success_iter += 1 apply_step!(integrator) diff --git a/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl b/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl index 6df7e5c93d..7c81dad2e8 100644 --- a/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl +++ b/lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl @@ -132,7 +132,7 @@ function calc_J(integrator, cache, next_step::Bool = false) end end - @SciMLMessage("Computing Jacobian at t = $(t) using $(method)", + @SciMLMessage(lazy"Computing Jacobian at t = $(t) using $(method)", integrator.opts.verbose, :jacobian_update) if alg isa DAEAlgorithm @@ -742,7 +742,7 @@ function update_W!(nlsolver::AbstractNLSolver, new_jac, new_W = calc_W!(get_W(nlsolver), integrator, nlsolver, cache, dtgamma, repeat_step, newJW) if new_W - @SciMLMessage("W matrix factorized: dtgamma = $(dtgamma), new_jac = $(new_jac)", + @SciMLMessage(lazy"W matrix factorized: dtgamma = $(dtgamma), new_jac = $(new_jac)", integrator.opts.verbose, :w_factorization) end end @@ -772,7 +772,7 @@ function update_W!(nlsolver::AbstractNLSolver, set_W_γdt!(nlsolver, dtgamma) end if new_W - @SciMLMessage("W matrix factorized: dtgamma = $(dtgamma), new_jac = $(new_jac)", + @SciMLMessage(lazy"W matrix factorized: dtgamma = $(dtgamma), new_jac = $(new_jac)", integrator.opts.verbose, :w_factorization) end end diff --git a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_perform_step.jl b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_perform_step.jl index 84538f8fbe..09e5ea9815 100644 --- a/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_perform_step.jl +++ b/lib/OrdinaryDiffEqExtrapolation/src/extrapolation_perform_step.jl @@ -320,7 +320,7 @@ function perform_step!(integrator, cache::ImplicitEulerExtrapolationCache, norm_diff2 = integrator.opts.internalnorm(diff2[1], t) if norm_diff1 < norm_diff2 # Divergence of iteration, overflow is possible. Force fail and start with smaller step - @SciMLMessage("Deuflhard stability check failed: ||diff1|| = $(norm_diff1) < ||diff2|| = $(norm_diff2), divergence detected", + @SciMLMessage(lazy"Deuflhard stability check failed: ||diff1|| = $(norm_diff1) < ||diff2|| = $(norm_diff2), divergence detected", integrator.opts.verbose, :stability_check) integrator.force_stepfail = true return diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl index e9e243834b..e89fe6c0a3 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl @@ -162,7 +162,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD end if failed - @SciMLMessage("ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", + @SciMLMessage(lazy"ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", integrator.opts.verbose, :shampine_dt) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) @@ -242,7 +242,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD end if failed - @SciMLMessage("ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", + @SciMLMessage(lazy"ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", integrator.opts.verbose, :shampine_dt) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) @@ -320,7 +320,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA recursivecopy!(integrator.uprev2, integrator.uprev) end if nlsol.retcode != ReturnCode.Success - @SciMLMessage("ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", + @SciMLMessage(lazy"ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", integrator.opts.verbose, :shampine_dt) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) @@ -369,7 +369,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA integrator.uprev2 = copy(integrator.uprev) end if nlsol.retcode != ReturnCode.Success - @SciMLMessage("ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", + @SciMLMessage(lazy"ShampineCollocationInit DAE initialization algorithm failed with dt=$dt. Try to adjust initdt like `ShampineCollocationInit(initdt)`.", integrator.opts.verbose, :shampine_dt) integrator.sol = SciMLBase.solution_new_retcode(integrator.sol, ReturnCode.InitialFailure) diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl index 80fdddf5ac..2ebbf95bfb 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/nlsolve.jl @@ -54,7 +54,7 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, ndz = compute_step!(nlsolver, integrator) end if !isfinite(ndz) - @SciMLMessage("Newton iteration diverged: residual norm is not finite (ndz = $(ndz))", + @SciMLMessage(lazy"Newton iteration diverged: residual norm is not finite (ndz = $(ndz))", integrator.opts.verbose, :newton_convergence) nlsolver.status = Divergence nlsolver.nfails += 1 @@ -73,7 +73,7 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, # it convergence/divergence according to `ndz` directly. if abs(θ - one(θ)) <= eps_around_one(θ) if ndz <= one(ndz) - @SciMLMessage("Newton iteration converged at floating point limit: θ ≈ 1.0, ndz = $(ndz)", + @SciMLMessage(lazy"Newton iteration converged at floating point limit: θ ≈ 1.0, ndz = $(ndz)", integrator.opts.verbose, :convergence_limit) nlsolver.status = Convergence nlsolver.nfails = 0 @@ -87,7 +87,7 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, # divergence if check_div′ && θ > 2 - @SciMLMessage("Newton iteration diverging: θ = $(θ) > 2, ndz = $(ndz), ndzprev = $(ndzprev)", + @SciMLMessage(lazy"Newton iteration diverging: θ = $(θ) > 2, ndz = $(ndz), ndzprev = $(ndzprev)", integrator.opts.verbose, :newton_convergence) nlsolver.status = Divergence nlsolver.nfails += 1 @@ -114,7 +114,7 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, (isnewton(nlsolver) && isadaptive(integrator.alg))) if (iter == 1 && ndz < 1e-5) || (check_η_convergence && η >= zero(η) && η * ndz < κ) - @SciMLMessage("Newton iteration converged in $(iter) iterations: η = $(η), ndz = $(ndz)", + @SciMLMessage(lazy"Newton iteration converged in $(iter) iterations: η = $(η), ndz = $(ndz)", integrator.opts.verbose, :newton_iterations) nlsolver.status = Convergence nlsolver.nfails = 0 @@ -124,7 +124,7 @@ function nlsolve!(nlsolver::NL, integrator::SciMLBase.DEIntegrator, if isnewton(nlsolver) && nlsolver.status == Divergence && !isJcurrent(nlsolver, integrator) - @SciMLMessage("Newton iteration failed with stale Jacobian, retrying with fresh Jacobian", + @SciMLMessage(lazy"Newton iteration failed with stale Jacobian, retrying with fresh Jacobian", integrator.opts.verbose, :newton_convergence) nlsolver.status = TryAgain nlsolver.nfails += 1 From a818ea416d46245c5e3b6752af388f8287d6360c Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 20:37:47 -0500 Subject: [PATCH 52/74] fix step rejected message --- lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl b/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl index a011036fef..c4e596aae4 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl @@ -10,7 +10,7 @@ function loopheader!(integrator) if integrator.iter > 0 if (integrator.opts.adaptive && !integrator.accept_step) || integrator.force_stepfail - @SciMLMessage(lazy"Step rejected: EEst = $(integrator.EEst), adjusting dt: $(integrator.tprev + integrator.dtpropose) → $(integrator.t + integrator.dt)", + @SciMLMessage(lazy"Step rejected: t = $(integrator.t), EEst = $(integrator.EEst)", integrator.opts.verbose, :step_rejected) if integrator.isout integrator.dt = integrator.dt * integrator.opts.qmin From f0542e1206d9df542fb5e6fe7b1b4263e2705c61 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 21:38:50 -0500 Subject: [PATCH 53/74] bump all library minor versions --- lib/ImplicitDiscreteSolve/Project.toml | 2 +- lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml | 2 +- lib/OrdinaryDiffEqBDF/Project.toml | 2 +- lib/OrdinaryDiffEqDefault/Project.toml | 2 +- lib/OrdinaryDiffEqDifferentiation/Project.toml | 2 +- lib/OrdinaryDiffEqExplicitRK/Project.toml | 2 +- lib/OrdinaryDiffEqExponentialRK/Project.toml | 2 +- lib/OrdinaryDiffEqExtrapolation/Project.toml | 2 +- lib/OrdinaryDiffEqFIRK/Project.toml | 2 +- lib/OrdinaryDiffEqFeagin/Project.toml | 2 +- lib/OrdinaryDiffEqFunctionMap/Project.toml | 2 +- lib/OrdinaryDiffEqHighOrderRK/Project.toml | 2 +- lib/OrdinaryDiffEqIMEXMultistep/Project.toml | 2 +- lib/OrdinaryDiffEqLinear/Project.toml | 2 +- lib/OrdinaryDiffEqLowOrderRK/Project.toml | 2 +- lib/OrdinaryDiffEqLowStorageRK/Project.toml | 2 +- lib/OrdinaryDiffEqNonlinearSolve/Project.toml | 2 +- lib/OrdinaryDiffEqNordsieck/Project.toml | 2 +- lib/OrdinaryDiffEqPDIRK/Project.toml | 2 +- lib/OrdinaryDiffEqPRK/Project.toml | 2 +- lib/OrdinaryDiffEqQPRK/Project.toml | 2 +- lib/OrdinaryDiffEqRKN/Project.toml | 2 +- lib/OrdinaryDiffEqRosenbrock/Project.toml | 2 +- lib/OrdinaryDiffEqSDIRK/Project.toml | 2 +- lib/OrdinaryDiffEqSIMDRK/Project.toml | 2 +- lib/OrdinaryDiffEqSSPRK/Project.toml | 2 +- lib/OrdinaryDiffEqStabilizedIRK/Project.toml | 2 +- lib/OrdinaryDiffEqStabilizedRK/Project.toml | 2 +- lib/OrdinaryDiffEqSymplecticRK/Project.toml | 2 +- lib/OrdinaryDiffEqTaylorSeries/Project.toml | 2 +- lib/OrdinaryDiffEqTsit5/Project.toml | 2 +- lib/OrdinaryDiffEqVerner/Project.toml | 2 +- lib/SimpleImplicitDiscreteSolve/Project.toml | 2 +- 33 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lib/ImplicitDiscreteSolve/Project.toml b/lib/ImplicitDiscreteSolve/Project.toml index 2d6a578e6d..8060c6e131 100644 --- a/lib/ImplicitDiscreteSolve/Project.toml +++ b/lib/ImplicitDiscreteSolve/Project.toml @@ -1,7 +1,7 @@ name = "ImplicitDiscreteSolve" uuid = "3263718b-31ed-49cf-8a0f-35a466e8af96" authors = ["vyudu "] -version = "1.2.0" +version = "1.3.0" [deps] SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7" diff --git a/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml b/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml index bf326f71d5..5bd93e2c59 100644 --- a/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml +++ b/lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqAdamsBashforthMoulton" uuid = "89bda076-bce5-4f1c-845f-551c83cdda9a" authors = ["ParamThakkar123 "] -version = "1.5.0" +version = "1.6.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" diff --git a/lib/OrdinaryDiffEqBDF/Project.toml b/lib/OrdinaryDiffEqBDF/Project.toml index e0f300b4d3..9ebb29e564 100644 --- a/lib/OrdinaryDiffEqBDF/Project.toml +++ b/lib/OrdinaryDiffEqBDF/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqBDF" uuid = "6ad6398a-0878-4a85-9266-38940aa047c8" authors = ["ParamThakkar123 "] -version = "1.10.0" +version = "1.11.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" diff --git a/lib/OrdinaryDiffEqDefault/Project.toml b/lib/OrdinaryDiffEqDefault/Project.toml index c1719218a0..a25e7ab833 100644 --- a/lib/OrdinaryDiffEqDefault/Project.toml +++ b/lib/OrdinaryDiffEqDefault/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqDefault" uuid = "50262376-6c5a-4cf5-baba-aaf4f84d72d7" authors = ["ParamThakkar123 "] -version = "1.8.0" +version = "1.9.0" [deps] OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" diff --git a/lib/OrdinaryDiffEqDifferentiation/Project.toml b/lib/OrdinaryDiffEqDifferentiation/Project.toml index 36868f04c1..6ae8c6dcf4 100644 --- a/lib/OrdinaryDiffEqDifferentiation/Project.toml +++ b/lib/OrdinaryDiffEqDifferentiation/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqDifferentiation" uuid = "4302a76b-040a-498a-8c04-15b101fed76b" authors = ["Chris Rackauckas ", "Yingbo Ma "] -version = "1.16.1" +version = "1.17.0" [deps] ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" diff --git a/lib/OrdinaryDiffEqExplicitRK/Project.toml b/lib/OrdinaryDiffEqExplicitRK/Project.toml index af6de05f8e..7622b1f3a8 100644 --- a/lib/OrdinaryDiffEqExplicitRK/Project.toml +++ b/lib/OrdinaryDiffEqExplicitRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqExplicitRK" uuid = "9286f039-9fbf-40e8-bf65-aa933bdc4db0" authors = ["ParamThakkar123 "] -version = "1.4.0" +version = "1.5.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" diff --git a/lib/OrdinaryDiffEqExponentialRK/Project.toml b/lib/OrdinaryDiffEqExponentialRK/Project.toml index bc7bdc3746..11151cba98 100644 --- a/lib/OrdinaryDiffEqExponentialRK/Project.toml +++ b/lib/OrdinaryDiffEqExponentialRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqExponentialRK" uuid = "e0540318-69ee-4070-8777-9e2de6de23de" authors = ["ParamThakkar123 "] -version = "1.8.0" +version = "1.9.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" diff --git a/lib/OrdinaryDiffEqExtrapolation/Project.toml b/lib/OrdinaryDiffEqExtrapolation/Project.toml index b986db5db5..99c0912ec1 100644 --- a/lib/OrdinaryDiffEqExtrapolation/Project.toml +++ b/lib/OrdinaryDiffEqExtrapolation/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqExtrapolation" uuid = "becaefa8-8ca2-5cf9-886d-c06f3d2bd2c4" authors = ["Chris Rackauckas ", "Yingbo Ma "] -version = "1.9.0" +version = "1.10.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" diff --git a/lib/OrdinaryDiffEqFIRK/Project.toml b/lib/OrdinaryDiffEqFIRK/Project.toml index 7c0315a7e4..02a115da00 100644 --- a/lib/OrdinaryDiffEqFIRK/Project.toml +++ b/lib/OrdinaryDiffEqFIRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqFIRK" uuid = "5960d6e9-dd7a-4743-88e7-cf307b64f125" authors = ["ParamThakkar123 "] -version = "1.16.0" +version = "1.17.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" diff --git a/lib/OrdinaryDiffEqFeagin/Project.toml b/lib/OrdinaryDiffEqFeagin/Project.toml index d8c03faa0e..839849bda0 100644 --- a/lib/OrdinaryDiffEqFeagin/Project.toml +++ b/lib/OrdinaryDiffEqFeagin/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqFeagin" uuid = "101fe9f7-ebb6-4678-b671-3a81e7194747" authors = ["ParamThakkar123 "] -version = "1.4.0" +version = "1.5.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" diff --git a/lib/OrdinaryDiffEqFunctionMap/Project.toml b/lib/OrdinaryDiffEqFunctionMap/Project.toml index 57753c7aa1..186eebf463 100644 --- a/lib/OrdinaryDiffEqFunctionMap/Project.toml +++ b/lib/OrdinaryDiffEqFunctionMap/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqFunctionMap" uuid = "d3585ca7-f5d3-4ba6-8057-292ed1abd90f" authors = ["ParamThakkar123 "] -version = "1.5.0" +version = "1.6.0" [deps] DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" diff --git a/lib/OrdinaryDiffEqHighOrderRK/Project.toml b/lib/OrdinaryDiffEqHighOrderRK/Project.toml index 49e70c7ad1..a196ae88ca 100644 --- a/lib/OrdinaryDiffEqHighOrderRK/Project.toml +++ b/lib/OrdinaryDiffEqHighOrderRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqHighOrderRK" uuid = "d28bc4f8-55e1-4f49-af69-84c1a99f0f58" authors = ["ParamThakkar123 "] -version = "1.5.0" +version = "1.6.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" diff --git a/lib/OrdinaryDiffEqIMEXMultistep/Project.toml b/lib/OrdinaryDiffEqIMEXMultistep/Project.toml index 8aef7af1af..8bbf1fd0d4 100644 --- a/lib/OrdinaryDiffEqIMEXMultistep/Project.toml +++ b/lib/OrdinaryDiffEqIMEXMultistep/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqIMEXMultistep" uuid = "9f002381-b378-40b7-97a6-27a27c83f129" authors = ["ParamThakkar123 "] -version = "1.7.0" +version = "1.8.0" [deps] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" diff --git a/lib/OrdinaryDiffEqLinear/Project.toml b/lib/OrdinaryDiffEqLinear/Project.toml index c7892ca516..387d52d7e8 100644 --- a/lib/OrdinaryDiffEqLinear/Project.toml +++ b/lib/OrdinaryDiffEqLinear/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqLinear" uuid = "521117fe-8c41-49f8-b3b6-30780b3f0fb5" authors = ["ParamThakkar123 "] -version = "1.6.0" +version = "1.7.0" [deps] SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" diff --git a/lib/OrdinaryDiffEqLowOrderRK/Project.toml b/lib/OrdinaryDiffEqLowOrderRK/Project.toml index 0324240aa7..dc8d9bfb68 100644 --- a/lib/OrdinaryDiffEqLowOrderRK/Project.toml +++ b/lib/OrdinaryDiffEqLowOrderRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqLowOrderRK" uuid = "1344f307-1e59-4825-a18e-ace9aa3fa4c6" authors = ["ParamThakkar123 "] -version = "1.6.0" +version = "1.7.0" [deps] DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" diff --git a/lib/OrdinaryDiffEqLowStorageRK/Project.toml b/lib/OrdinaryDiffEqLowStorageRK/Project.toml index 3eaac2166b..e80da0189e 100644 --- a/lib/OrdinaryDiffEqLowStorageRK/Project.toml +++ b/lib/OrdinaryDiffEqLowStorageRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqLowStorageRK" uuid = "b0944070-b475-4768-8dec-fb6eb410534d" authors = ["ParamThakkar123 "] -version = "1.7.0" +version = "1.8.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" diff --git a/lib/OrdinaryDiffEqNonlinearSolve/Project.toml b/lib/OrdinaryDiffEqNonlinearSolve/Project.toml index 2d45ed5c44..449a72778d 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/Project.toml +++ b/lib/OrdinaryDiffEqNonlinearSolve/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqNonlinearSolve" uuid = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" authors = ["Chris Rackauckas ", "Yingbo Ma "] -version = "1.15.0" +version = "1.16.0" [deps] NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" diff --git a/lib/OrdinaryDiffEqNordsieck/Project.toml b/lib/OrdinaryDiffEqNordsieck/Project.toml index 25cc0ca558..f5c898eac5 100644 --- a/lib/OrdinaryDiffEqNordsieck/Project.toml +++ b/lib/OrdinaryDiffEqNordsieck/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqNordsieck" uuid = "c9986a66-5c92-4813-8696-a7ec84c806c8" authors = ["ParamThakkar123 "] -version = "1.4.0" +version = "1.5.0" [deps] OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" diff --git a/lib/OrdinaryDiffEqPDIRK/Project.toml b/lib/OrdinaryDiffEqPDIRK/Project.toml index b0f45f4ac2..c0848a2ea3 100644 --- a/lib/OrdinaryDiffEqPDIRK/Project.toml +++ b/lib/OrdinaryDiffEqPDIRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqPDIRK" uuid = "5dd0a6cf-3d4b-4314-aa06-06d4e299bc89" authors = ["ParamThakkar123 "] -version = "1.6.0" +version = "1.7.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" diff --git a/lib/OrdinaryDiffEqPRK/Project.toml b/lib/OrdinaryDiffEqPRK/Project.toml index 82cfae38f9..d53ee0f615 100644 --- a/lib/OrdinaryDiffEqPRK/Project.toml +++ b/lib/OrdinaryDiffEqPRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqPRK" uuid = "5b33eab2-c0f1-4480-b2c3-94bc1e80bda1" authors = ["ParamThakkar123 "] -version = "1.4.0" +version = "1.5.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" diff --git a/lib/OrdinaryDiffEqQPRK/Project.toml b/lib/OrdinaryDiffEqQPRK/Project.toml index 61f3af39ff..b35713c956 100644 --- a/lib/OrdinaryDiffEqQPRK/Project.toml +++ b/lib/OrdinaryDiffEqQPRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqQPRK" uuid = "04162be5-8125-4266-98ed-640baecc6514" authors = ["ParamThakkar123 "] -version = "1.4.0" +version = "1.5.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" diff --git a/lib/OrdinaryDiffEqRKN/Project.toml b/lib/OrdinaryDiffEqRKN/Project.toml index ddfd3366a6..18f04a75dc 100644 --- a/lib/OrdinaryDiffEqRKN/Project.toml +++ b/lib/OrdinaryDiffEqRKN/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqRKN" uuid = "af6ede74-add8-4cfd-b1df-9a4dbb109d7a" authors = ["ParamThakkar123 "] -version = "1.5.0" +version = "1.6.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" diff --git a/lib/OrdinaryDiffEqRosenbrock/Project.toml b/lib/OrdinaryDiffEqRosenbrock/Project.toml index 0d310bbf5f..b2f296b437 100644 --- a/lib/OrdinaryDiffEqRosenbrock/Project.toml +++ b/lib/OrdinaryDiffEqRosenbrock/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqRosenbrock" uuid = "43230ef6-c299-4910-a778-202eb28ce4ce" authors = ["ParamThakkar123 "] -version = "1.18.1" +version = "1.19.0" [deps] ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" diff --git a/lib/OrdinaryDiffEqSDIRK/Project.toml b/lib/OrdinaryDiffEqSDIRK/Project.toml index 871eb65d8c..fcda163104 100644 --- a/lib/OrdinaryDiffEqSDIRK/Project.toml +++ b/lib/OrdinaryDiffEqSDIRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqSDIRK" uuid = "2d112036-d095-4a1e-ab9a-08536f3ecdbf" authors = ["ParamThakkar123 "] -version = "1.7.0" +version = "1.8.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" diff --git a/lib/OrdinaryDiffEqSIMDRK/Project.toml b/lib/OrdinaryDiffEqSIMDRK/Project.toml index 80fe71c568..babde95ef5 100644 --- a/lib/OrdinaryDiffEqSIMDRK/Project.toml +++ b/lib/OrdinaryDiffEqSIMDRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqSIMDRK" uuid = "dc97f408-7a72-40e4-9b0d-228a53b292f8" authors = ["Yingbo Ma ", "Chris Elrod "] -version = "1.1.0" +version = "1.2.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" diff --git a/lib/OrdinaryDiffEqSSPRK/Project.toml b/lib/OrdinaryDiffEqSSPRK/Project.toml index cfe6399404..9bd932b2ba 100644 --- a/lib/OrdinaryDiffEqSSPRK/Project.toml +++ b/lib/OrdinaryDiffEqSSPRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqSSPRK" uuid = "669c94d9-1f4b-4b64-b377-1aa079aa2388" authors = ["ParamThakkar123 "] -version = "1.7.0" +version = "1.8.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" diff --git a/lib/OrdinaryDiffEqStabilizedIRK/Project.toml b/lib/OrdinaryDiffEqStabilizedIRK/Project.toml index 734cac832c..62cd0a8220 100644 --- a/lib/OrdinaryDiffEqStabilizedIRK/Project.toml +++ b/lib/OrdinaryDiffEqStabilizedIRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqStabilizedIRK" uuid = "e3e12d00-db14-5390-b879-ac3dd2ef6296" authors = ["ParamThakkar123 "] -version = "1.6.0" +version = "1.7.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" diff --git a/lib/OrdinaryDiffEqStabilizedRK/Project.toml b/lib/OrdinaryDiffEqStabilizedRK/Project.toml index dc75eabafc..bff5ea1052 100644 --- a/lib/OrdinaryDiffEqStabilizedRK/Project.toml +++ b/lib/OrdinaryDiffEqStabilizedRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqStabilizedRK" uuid = "358294b1-0aab-51c3-aafe-ad5ab194a2ad" authors = ["ParamThakkar123 "] -version = "1.5.0" +version = "1.6.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" diff --git a/lib/OrdinaryDiffEqSymplecticRK/Project.toml b/lib/OrdinaryDiffEqSymplecticRK/Project.toml index ff43963b83..e38bd05a30 100644 --- a/lib/OrdinaryDiffEqSymplecticRK/Project.toml +++ b/lib/OrdinaryDiffEqSymplecticRK/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqSymplecticRK" uuid = "fa646aed-7ef9-47eb-84c4-9443fc8cbfa8" authors = ["ParamThakkar123 "] -version = "1.7.0" +version = "1.8.0" [deps] Reexport = "189a3867-3050-52da-a836-e630ba90ab69" diff --git a/lib/OrdinaryDiffEqTaylorSeries/Project.toml b/lib/OrdinaryDiffEqTaylorSeries/Project.toml index 12eb442ca6..72e1956621 100644 --- a/lib/OrdinaryDiffEqTaylorSeries/Project.toml +++ b/lib/OrdinaryDiffEqTaylorSeries/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqTaylorSeries" uuid = "9c7f1690-dd92-42a3-8318-297ee24d8d39" authors = ["ParamThakkar123 "] -version = "1.4.0" +version = "1.5.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" diff --git a/lib/OrdinaryDiffEqTsit5/Project.toml b/lib/OrdinaryDiffEqTsit5/Project.toml index 9c4fc2b10b..f466b9f993 100644 --- a/lib/OrdinaryDiffEqTsit5/Project.toml +++ b/lib/OrdinaryDiffEqTsit5/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqTsit5" uuid = "b1df2697-797e-41e3-8120-5422d3b24e4a" authors = ["ParamThakkar123 "] -version = "1.5.0" +version = "1.6.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" diff --git a/lib/OrdinaryDiffEqVerner/Project.toml b/lib/OrdinaryDiffEqVerner/Project.toml index e7b4be5881..278698408c 100644 --- a/lib/OrdinaryDiffEqVerner/Project.toml +++ b/lib/OrdinaryDiffEqVerner/Project.toml @@ -1,7 +1,7 @@ name = "OrdinaryDiffEqVerner" uuid = "79d7bb75-1356-48c1-b8c0-6832512096c2" authors = ["ParamThakkar123 "] -version = "1.6.0" +version = "1.7.0" [deps] FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898" diff --git a/lib/SimpleImplicitDiscreteSolve/Project.toml b/lib/SimpleImplicitDiscreteSolve/Project.toml index ebfe72ba31..071be36ab4 100644 --- a/lib/SimpleImplicitDiscreteSolve/Project.toml +++ b/lib/SimpleImplicitDiscreteSolve/Project.toml @@ -1,7 +1,7 @@ name = "SimpleImplicitDiscreteSolve" uuid = "8b67ef88-54bd-43ff-aca0-8be02588656a" authors = ["vyudu "] -version = "1.2.0" +version = "1.3.0" [deps] DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" From fe0afcd5fdc3e6a7fcf2a9388f4cef964f7985c6 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 21:53:18 -0500 Subject: [PATCH 54/74] remove unused SciMLMessages --- lib/OrdinaryDiffEqDefault/src/OrdinaryDiffEqDefault.jl | 2 +- lib/OrdinaryDiffEqExplicitRK/src/OrdinaryDiffEqExplicitRK.jl | 2 +- .../src/OrdinaryDiffEqExponentialRK.jl | 2 +- lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl | 2 +- lib/OrdinaryDiffEqFeagin/src/OrdinaryDiffEqFeagin.jl | 2 +- .../src/OrdinaryDiffEqFunctionMap.jl | 2 +- .../src/OrdinaryDiffEqHighOrderRK.jl | 2 +- .../src/OrdinaryDiffEqIMEXMultistep.jl | 2 +- lib/OrdinaryDiffEqLinear/src/OrdinaryDiffEqLinear.jl | 2 +- lib/OrdinaryDiffEqLowOrderRK/src/OrdinaryDiffEqLowOrderRK.jl | 2 +- .../src/OrdinaryDiffEqLowStorageRK.jl | 2 +- .../src/OrdinaryDiffEqNonlinearSolve.jl | 4 ++-- lib/OrdinaryDiffEqNordsieck/src/OrdinaryDiffEqNordsieck.jl | 2 +- lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl | 2 +- lib/OrdinaryDiffEqPRK/src/OrdinaryDiffEqPRK.jl | 2 +- lib/OrdinaryDiffEqQPRK/src/OrdinaryDiffEqQPRK.jl | 2 +- lib/OrdinaryDiffEqRKN/src/OrdinaryDiffEqRKN.jl | 2 +- lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl | 2 +- lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl | 2 +- lib/OrdinaryDiffEqSSPRK/src/OrdinaryDiffEqSSPRK.jl | 2 +- .../src/OrdinaryDiffEqStabilizedIRK.jl | 2 +- .../src/OrdinaryDiffEqStabilizedRK.jl | 2 +- .../src/OrdinaryDiffEqSymplecticRK.jl | 2 +- .../src/OrdinaryDiffEqTaylorSeries.jl | 2 +- lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl | 2 +- lib/OrdinaryDiffEqVerner/src/OrdinaryDiffEqVerner.jl | 2 +- 26 files changed, 27 insertions(+), 27 deletions(-) diff --git a/lib/OrdinaryDiffEqDefault/src/OrdinaryDiffEqDefault.jl b/lib/OrdinaryDiffEqDefault/src/OrdinaryDiffEqDefault.jl index 5873de2582..ea030b19ca 100644 --- a/lib/OrdinaryDiffEqDefault/src/OrdinaryDiffEqDefault.jl +++ b/lib/OrdinaryDiffEqDefault/src/OrdinaryDiffEqDefault.jl @@ -10,7 +10,7 @@ using OrdinaryDiffEqRosenbrock: Rosenbrock23, Rodas5P using OrdinaryDiffEqBDF: FBDF import OrdinaryDiffEqCore -import OrdinaryDiffEqCore: is_mass_matrix_alg, default_autoswitch, isdefaultalg, @SciMLMessage +import OrdinaryDiffEqCore: is_mass_matrix_alg, default_autoswitch, isdefaultalg import ADTypes: AutoFiniteDiff, AutoForwardDiff, AbstractADType import LinearSolve using LinearAlgebra: I, isdiag diff --git a/lib/OrdinaryDiffEqExplicitRK/src/OrdinaryDiffEqExplicitRK.jl b/lib/OrdinaryDiffEqExplicitRK/src/OrdinaryDiffEqExplicitRK.jl index a8491eac32..2c5d1d1758 100644 --- a/lib/OrdinaryDiffEqExplicitRK/src/OrdinaryDiffEqExplicitRK.jl +++ b/lib/OrdinaryDiffEqExplicitRK/src/OrdinaryDiffEqExplicitRK.jl @@ -6,7 +6,7 @@ import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, alg_stability_size, unwrap_alg, OrdinaryDiffEqMutableCache, initialize!, perform_step!, isfsal, CompositeAlgorithm, calculate_residuals!, calculate_residuals, - full_cache, get_fsalfirstlast, @SciMLMessage + full_cache, get_fsalfirstlast using TruncatedStacktraces: @truncate_stacktrace using RecursiveArrayTools, FastBroadcast, MuladdMacro, DiffEqBase import LinearAlgebra: norm diff --git a/lib/OrdinaryDiffEqExponentialRK/src/OrdinaryDiffEqExponentialRK.jl b/lib/OrdinaryDiffEqExponentialRK/src/OrdinaryDiffEqExponentialRK.jl index 70af626d91..ad51a34e39 100644 --- a/lib/OrdinaryDiffEqExponentialRK/src/OrdinaryDiffEqExponentialRK.jl +++ b/lib/OrdinaryDiffEqExponentialRK/src/OrdinaryDiffEqExponentialRK.jl @@ -9,7 +9,7 @@ import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, ismultistep, OrdinaryDiffEqAdaptiveExponentialAlgorithm, CompositeAlgorithm, ExponentialAlgorithm, fsal_typeof, isdtchangeable, calculate_residuals, calculate_residuals!, - full_cache, get_fsalfirstlast, @SciMLMessage, + full_cache, get_fsalfirstlast, generic_solver_docstring, _bool_to_ADType, _process_AD_choice import OrdinaryDiffEqCore using RecursiveArrayTools diff --git a/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl b/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl index b6e2ae1e9e..7ab3cffccf 100644 --- a/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl +++ b/lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl @@ -18,7 +18,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, fac_default_gamma, get_current_adaptive_order, get_fsalfirstlast, isfirk, generic_solver_docstring, _bool_to_ADType, - _process_AD_choice, LinearAliasSpecifier, @SciMLMessage, Minimal + _process_AD_choice, LinearAliasSpecifier using MuladdMacro, DiffEqBase, RecursiveArrayTools, Polyester isfirk, generic_solver_docstring using SciMLOperators: AbstractSciMLOperator diff --git a/lib/OrdinaryDiffEqFeagin/src/OrdinaryDiffEqFeagin.jl b/lib/OrdinaryDiffEqFeagin/src/OrdinaryDiffEqFeagin.jl index dc9b244dce..a796596133 100644 --- a/lib/OrdinaryDiffEqFeagin/src/OrdinaryDiffEqFeagin.jl +++ b/lib/OrdinaryDiffEqFeagin/src/OrdinaryDiffEqFeagin.jl @@ -9,7 +9,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, alg_cache, _vec, _reshape, @cache, isfsal, full_cache, constvalue, _unwrap_val, get_fsalfirstlast, generic_solver_docstring, trivial_limiter!, - _ode_interpolant!, _ode_addsteps!, @SciMLMessage + _ode_interpolant!, _ode_addsteps! using FastBroadcast, Polyester, MuladdMacro, RecursiveArrayTools using DiffEqBase: @def, @tight_loop_macros using Static: False diff --git a/lib/OrdinaryDiffEqFunctionMap/src/OrdinaryDiffEqFunctionMap.jl b/lib/OrdinaryDiffEqFunctionMap/src/OrdinaryDiffEqFunctionMap.jl index 7e917727da..7f35f5dc06 100644 --- a/lib/OrdinaryDiffEqFunctionMap/src/OrdinaryDiffEqFunctionMap.jl +++ b/lib/OrdinaryDiffEqFunctionMap/src/OrdinaryDiffEqFunctionMap.jl @@ -6,7 +6,7 @@ import OrdinaryDiffEqCore: isfsal, beta2_default, beta1_default, OrdinaryDiffEqA alg_cache, @cache, _ode_addsteps!, _ode_interpolant!, _ode_interpolant, get_fsalfirstlast, alg_order, OrdinaryDiffEqConstantCache, dt_required, - isdiscretecache, isdiscretealg, full_cache, @SciMLMessage + isdiscretecache, isdiscretealg, full_cache using DiffEqBase import RecursiveArrayTools: recursivecopy! import FastBroadcast: @.. diff --git a/lib/OrdinaryDiffEqHighOrderRK/src/OrdinaryDiffEqHighOrderRK.jl b/lib/OrdinaryDiffEqHighOrderRK/src/OrdinaryDiffEqHighOrderRK.jl index b021ab2fc8..db7e15ffe0 100644 --- a/lib/OrdinaryDiffEqHighOrderRK/src/OrdinaryDiffEqHighOrderRK.jl +++ b/lib/OrdinaryDiffEqHighOrderRK/src/OrdinaryDiffEqHighOrderRK.jl @@ -11,7 +11,7 @@ import OrdinaryDiffEqCore: alg_order, qmax_default, qmin_default, beta2_default, calculate_residuals!, calculate_residuals, CompiledFloats, copyat_or_push!, get_fsalfirstlast, unwrap_alg, _ode_interpolant, _ode_interpolant!, - DerivativeOrderNotPossibleError, full_cache, isdp8, @SciMLMessage + DerivativeOrderNotPossibleError, full_cache, isdp8 import Static: False import MuladdMacro: @muladd using DiffEqBase diff --git a/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl b/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl index 5fc328d6db..22cee71022 100644 --- a/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl +++ b/lib/OrdinaryDiffEqIMEXMultistep/src/OrdinaryDiffEqIMEXMultistep.jl @@ -4,7 +4,7 @@ import OrdinaryDiffEqCore: alg_order, issplit, OrdinaryDiffEqNewtonAlgorithm, _u DEFAULT_PRECS, OrdinaryDiffEqConstantCache, OrdinaryDiffEqMutableCache, @cache, alg_cache, initialize!, perform_step!, @unpack, - full_cache, get_fsalfirstlast, @SciMLMessage, + full_cache, get_fsalfirstlast, generic_solver_docstring, _bool_to_ADType, _process_AD_choice using FastBroadcast diff --git a/lib/OrdinaryDiffEqLinear/src/OrdinaryDiffEqLinear.jl b/lib/OrdinaryDiffEqLinear/src/OrdinaryDiffEqLinear.jl index 38cc7a0843..0fdb370b03 100644 --- a/lib/OrdinaryDiffEqLinear/src/OrdinaryDiffEqLinear.jl +++ b/lib/OrdinaryDiffEqLinear/src/OrdinaryDiffEqLinear.jl @@ -9,7 +9,7 @@ import OrdinaryDiffEqCore: alg_order, alg_extrapolates, dt_required, initialize!, perform_step!, @unpack, unwrap_alg, calculate_residuals!, get_fsalfirstlast, _vec, isdtchangeable, full_cache, - generic_solver_docstring, @SciMLMessage + generic_solver_docstring using LinearAlgebra: mul!, I using SciMLOperators: AbstractSciMLOperator using ExponentialUtilities diff --git a/lib/OrdinaryDiffEqLowOrderRK/src/OrdinaryDiffEqLowOrderRK.jl b/lib/OrdinaryDiffEqLowOrderRK/src/OrdinaryDiffEqLowOrderRK.jl index e826a9e10d..19d4c7ab50 100644 --- a/lib/OrdinaryDiffEqLowOrderRK/src/OrdinaryDiffEqLowOrderRK.jl +++ b/lib/OrdinaryDiffEqLowOrderRK/src/OrdinaryDiffEqLowOrderRK.jl @@ -16,7 +16,7 @@ import OrdinaryDiffEqCore: alg_order, isfsal, beta2_default, beta1_default, @cache, CompiledFloats, alg_cache, CompositeAlgorithm, AutoAlgSwitch, _ode_interpolant, _ode_interpolant!, full_cache, accept_step_controller, DerivativeOrderNotPossibleError, - du_cache, u_cache, get_fsalfirstlast, copyat_or_push!, @SciMLMessage + du_cache, u_cache, get_fsalfirstlast, copyat_or_push! using SciMLBase import MuladdMacro: @muladd import FastBroadcast: @.. diff --git a/lib/OrdinaryDiffEqLowStorageRK/src/OrdinaryDiffEqLowStorageRK.jl b/lib/OrdinaryDiffEqLowStorageRK/src/OrdinaryDiffEqLowStorageRK.jl index cf5c5a5e66..22596ff12b 100644 --- a/lib/OrdinaryDiffEqLowStorageRK/src/OrdinaryDiffEqLowStorageRK.jl +++ b/lib/OrdinaryDiffEqLowStorageRK/src/OrdinaryDiffEqLowStorageRK.jl @@ -11,7 +11,7 @@ import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, calculate_residuals!, alg_cache, _vec, _reshape, @cache, isfsal, full_cache, constvalue, _unwrap_val, trivial_limiter!, perform_step!, initialize!, - explicit_rk_docstring, get_fsalfirstlast, @SciMLMessage + explicit_rk_docstring, get_fsalfirstlast using FastBroadcast, Polyester, MuladdMacro, RecursiveArrayTools, Adapt import StaticArrays: SArray, MVector, SVector, @SVector, StaticArray, MMatrix, SA import Static: False diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl index ea9b98d586..73910a3ecb 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl @@ -29,7 +29,7 @@ import SciMLStructures: canonicalize, Tunable, isscimlstructure import OrdinaryDiffEqCore import SciMLOperators: islinear -import OrdinaryDiffEqCore: nlsolve_f, set_new_W!, set_W_γdt!, @SciMLMessage +import OrdinaryDiffEqCore: nlsolve_f, set_new_W!, set_W_γdt! @static if isdefined(OrdinaryDiffEqCore, :default_nlsolve) import OrdinaryDiffEqCore: default_nlsolve @@ -50,7 +50,7 @@ using OrdinaryDiffEqCore: resize_nlsolver!, _initialize_dae!, import OrdinaryDiffEqCore: _initialize_dae!, isnewton, get_W, isfirstcall, isfirststage, isJcurrent, get_new_W_γdt_cutoff, resize_nlsolver!, apply_step!, - postamble!, @SciMLMessage, Minimal + postamble!, @SciMLMessage import OrdinaryDiffEqDifferentiation: update_W!, is_always_new, build_uf, build_J_W, WOperator, StaticWOperator, wrapprecs, diff --git a/lib/OrdinaryDiffEqNordsieck/src/OrdinaryDiffEqNordsieck.jl b/lib/OrdinaryDiffEqNordsieck/src/OrdinaryDiffEqNordsieck.jl index 45a2a0370e..5db6344b12 100644 --- a/lib/OrdinaryDiffEqNordsieck/src/OrdinaryDiffEqNordsieck.jl +++ b/lib/OrdinaryDiffEqNordsieck/src/OrdinaryDiffEqNordsieck.jl @@ -11,7 +11,7 @@ import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, qsteady_max_default, calculate_residuals, calculate_residuals!, get_current_adaptive_order, get_fsalfirstlast, ode_interpolant, ode_interpolant!, trivial_limiter!, - generic_solver_docstring, @SciMLMessage + generic_solver_docstring using MuladdMacro, FastBroadcast, RecursiveArrayTools import LinearAlgebra: rmul! import Static: False diff --git a/lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl b/lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl index 0537f37589..f286f5631b 100644 --- a/lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl +++ b/lib/OrdinaryDiffEqPDIRK/src/OrdinaryDiffEqPDIRK.jl @@ -6,7 +6,7 @@ import OrdinaryDiffEqCore: isfsal, alg_order, _unwrap_val, uses_uprev, @unpack, unwrap_alg, @cache, DEFAULT_PRECS, @threaded, initialize!, perform_step!, isthreaded, full_cache, get_fsalfirstlast, differentiation_rk_docstring, - _bool_to_ADType, _process_AD_choice, @SciMLMessage + _bool_to_ADType, _process_AD_choice import StaticArrays: SVector import MuladdMacro: @muladd import FastBroadcast: @.. diff --git a/lib/OrdinaryDiffEqPRK/src/OrdinaryDiffEqPRK.jl b/lib/OrdinaryDiffEqPRK/src/OrdinaryDiffEqPRK.jl index 61d6a975f1..8e0f3fe0d8 100644 --- a/lib/OrdinaryDiffEqPRK/src/OrdinaryDiffEqPRK.jl +++ b/lib/OrdinaryDiffEqPRK/src/OrdinaryDiffEqPRK.jl @@ -4,7 +4,7 @@ import OrdinaryDiffEqCore: OrdinaryDiffEqAlgorithm, alg_order, OrdinaryDiffEqMut OrdinaryDiffEqConstantCache, constvalue, @unpack, @cache, alg_cache, get_fsalfirstlast, unwrap_alg, perform_step!, @threaded, initialize!, isthreaded, - full_cache, generic_solver_docstring, @SciMLMessage + full_cache, generic_solver_docstring import MuladdMacro: @muladd import FastBroadcast: @.. using Polyester diff --git a/lib/OrdinaryDiffEqQPRK/src/OrdinaryDiffEqQPRK.jl b/lib/OrdinaryDiffEqQPRK/src/OrdinaryDiffEqQPRK.jl index 905764d7c8..9e268acbe5 100644 --- a/lib/OrdinaryDiffEqQPRK/src/OrdinaryDiffEqQPRK.jl +++ b/lib/OrdinaryDiffEqQPRK/src/OrdinaryDiffEqQPRK.jl @@ -7,7 +7,7 @@ import OrdinaryDiffEqCore: OrdinaryDiffEqAdaptiveAlgorithm, OrdinaryDiffEqConsta trivial_limiter!, alg_cache, alg_order, initialize!, perform_step!, get_fsalfirstlast, constvalue, calculate_residuals!, calculate_residuals, - full_cache, @SciMLMessage + full_cache using Static: False using MuladdMacro, FastBroadcast using RecursiveArrayTools: recursive_unitless_bottom_eltype, recursivefill! diff --git a/lib/OrdinaryDiffEqRKN/src/OrdinaryDiffEqRKN.jl b/lib/OrdinaryDiffEqRKN/src/OrdinaryDiffEqRKN.jl index f48eb1e923..cf23486570 100644 --- a/lib/OrdinaryDiffEqRKN/src/OrdinaryDiffEqRKN.jl +++ b/lib/OrdinaryDiffEqRKN/src/OrdinaryDiffEqRKN.jl @@ -12,7 +12,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, constvalue, _unwrap_val, _ode_interpolant, get_fsalfirstlast, trivial_limiter!, _ode_interpolant!, _ode_addsteps!, - generic_solver_docstring, @SciMLMessage + generic_solver_docstring using FastBroadcast, Polyester, MuladdMacro, RecursiveArrayTools using DiffEqBase: @def, @tight_loop_macros import OrdinaryDiffEqCore diff --git a/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl b/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl index 1f3943e628..ed279f8d43 100644 --- a/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl +++ b/lib/OrdinaryDiffEqRosenbrock/src/OrdinaryDiffEqRosenbrock.jl @@ -13,7 +13,7 @@ import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, isWmethod, isfsal, _un calculate_residuals, has_stiff_interpolation, ODEIntegrator, resize_non_user_cache!, _ode_addsteps!, full_cache, DerivativeOrderNotPossibleError, _bool_to_ADType, - _process_AD_choice, LinearAliasSpecifier, @SciMLMessage, Minimal, copyat_or_push! + _process_AD_choice, LinearAliasSpecifier, copyat_or_push! using MuladdMacro, FastBroadcast, RecursiveArrayTools import MacroTools: namify using MacroTools: @capture diff --git a/lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl b/lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl index d0c41bd0f8..a72d1e0584 100644 --- a/lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl +++ b/lib/OrdinaryDiffEqSDIRK/src/OrdinaryDiffEqSDIRK.jl @@ -14,7 +14,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, trivial_limiter!, _ode_interpolant!, isesdirk, issplit, ssp_coefficient, get_fsalfirstlast, generic_solver_docstring, - _bool_to_ADType, _process_AD_choice, current_extrapolant!, @SciMLMessage + _bool_to_ADType, _process_AD_choice, current_extrapolant! using TruncatedStacktraces: @truncate_stacktrace using MuladdMacro, MacroTools, FastBroadcast, RecursiveArrayTools using SciMLBase: SplitFunction diff --git a/lib/OrdinaryDiffEqSSPRK/src/OrdinaryDiffEqSSPRK.jl b/lib/OrdinaryDiffEqSSPRK/src/OrdinaryDiffEqSSPRK.jl index 452556302d..911c3099ae 100644 --- a/lib/OrdinaryDiffEqSSPRK/src/OrdinaryDiffEqSSPRK.jl +++ b/lib/OrdinaryDiffEqSSPRK/src/OrdinaryDiffEqSSPRK.jl @@ -12,7 +12,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, constvalue, _unwrap_val, explicit_rk_docstring, trivial_limiter!, _ode_interpolant, _ode_interpolant!, - _ode_addsteps!, get_fsalfirstlast, @SciMLMessage, copyat_or_push! + _ode_addsteps!, get_fsalfirstlast, copyat_or_push! using FastBroadcast, Polyester, MuladdMacro, RecursiveArrayTools using DiffEqBase: @def using Static: False diff --git a/lib/OrdinaryDiffEqStabilizedIRK/src/OrdinaryDiffEqStabilizedIRK.jl b/lib/OrdinaryDiffEqStabilizedIRK/src/OrdinaryDiffEqStabilizedIRK.jl index c99731f919..2410c2a55b 100644 --- a/lib/OrdinaryDiffEqStabilizedIRK/src/OrdinaryDiffEqStabilizedIRK.jl +++ b/lib/OrdinaryDiffEqStabilizedIRK/src/OrdinaryDiffEqStabilizedIRK.jl @@ -7,7 +7,7 @@ import OrdinaryDiffEqCore: alg_order, alg_maximum_order, calculate_residuals, fac_default_gamma, OrdinaryDiffEqAlgorithm, OrdinaryDiffEqNewtonAdaptiveAlgorithm, OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCache, - OrdinaryDiffEqAdaptiveAlgorithm, @SciMLMessage, + OrdinaryDiffEqAdaptiveAlgorithm, OrdinaryDiffEqAdaptiveImplicitAlgorithm, alg_cache, _unwrap_val, DEFAULT_PRECS, @cache, _reshape, _vec, full_cache, get_fsalfirstlast, diff --git a/lib/OrdinaryDiffEqStabilizedRK/src/OrdinaryDiffEqStabilizedRK.jl b/lib/OrdinaryDiffEqStabilizedRK/src/OrdinaryDiffEqStabilizedRK.jl index 05025801b6..8ee60216d9 100644 --- a/lib/OrdinaryDiffEqStabilizedRK/src/OrdinaryDiffEqStabilizedRK.jl +++ b/lib/OrdinaryDiffEqStabilizedRK/src/OrdinaryDiffEqStabilizedRK.jl @@ -10,7 +10,7 @@ import OrdinaryDiffEqCore: alg_order, alg_adaptive_order, calculate_residuals!, OrdinaryDiffEqAdaptiveAlgorithm, calc_dt_propose!, alg_cache, _vec, _reshape, @cache, constvalue, _unwrap_val, full_cache, get_fsalfirstlast, - generic_solver_docstring, @SciMLMessage + generic_solver_docstring using FastBroadcast, MuladdMacro, RecursiveArrayTools import StaticArrays: SArray, MVector, SVector, @SVector, StaticArray, MMatrix, SA import OrdinaryDiffEqCore diff --git a/lib/OrdinaryDiffEqSymplecticRK/src/OrdinaryDiffEqSymplecticRK.jl b/lib/OrdinaryDiffEqSymplecticRK/src/OrdinaryDiffEqSymplecticRK.jl index f57ded2674..2e05b19997 100644 --- a/lib/OrdinaryDiffEqSymplecticRK/src/OrdinaryDiffEqSymplecticRK.jl +++ b/lib/OrdinaryDiffEqSymplecticRK/src/OrdinaryDiffEqSymplecticRK.jl @@ -9,7 +9,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, OrdinaryDiffEqPartitionedAlgorithm, CompiledFloats, uses_uprev, alg_cache, _vec, _reshape, @cache, isfsal, full_cache, - constvalue, _unwrap_val, @SciMLMessage, + constvalue, _unwrap_val, explicit_rk_docstring, trivial_limiter!, _ode_interpolant!, _ode_addsteps!, get_fsalfirstlast, generic_solver_docstring, default_linear_interpolation diff --git a/lib/OrdinaryDiffEqTaylorSeries/src/OrdinaryDiffEqTaylorSeries.jl b/lib/OrdinaryDiffEqTaylorSeries/src/OrdinaryDiffEqTaylorSeries.jl index afcc1527d2..a06dabaaf6 100644 --- a/lib/OrdinaryDiffEqTaylorSeries/src/OrdinaryDiffEqTaylorSeries.jl +++ b/lib/OrdinaryDiffEqTaylorSeries/src/OrdinaryDiffEqTaylorSeries.jl @@ -9,7 +9,7 @@ import OrdinaryDiffEqCore: alg_order, alg_stability_size, explicit_rk_docstring, CompiledFloats, @OnDemandTableauExtract, initialize!, perform_step!, OrdinaryDiffEqAlgorithm, CompositeAlgorithm, _ode_addsteps!, copyat_or_push!, - AutoAlgSwitch, get_fsalfirstlast, @SciMLMessage, + AutoAlgSwitch, get_fsalfirstlast, full_cache, DerivativeOrderNotPossibleError import Static: False import MuladdMacro: @muladd diff --git a/lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl b/lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl index 0cb4dfff5e..1bc8fe1cf0 100644 --- a/lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl +++ b/lib/OrdinaryDiffEqTsit5/src/OrdinaryDiffEqTsit5.jl @@ -7,7 +7,7 @@ import OrdinaryDiffEqCore: alg_order, alg_stability_size, explicit_rk_docstring, constvalue, @unpack, perform_step!, calculate_residuals, @cache, calculate_residuals!, _ode_interpolant, _ode_interpolant!, CompiledFloats, @OnDemandTableauExtract, initialize!, - perform_step!, @SciMLMessage, + perform_step!, CompositeAlgorithm, _ode_addsteps!, copyat_or_push!, AutoAlgSwitch, get_fsalfirstlast, full_cache, DerivativeOrderNotPossibleError diff --git a/lib/OrdinaryDiffEqVerner/src/OrdinaryDiffEqVerner.jl b/lib/OrdinaryDiffEqVerner/src/OrdinaryDiffEqVerner.jl index d9dba1e539..4fd7a60f84 100644 --- a/lib/OrdinaryDiffEqVerner/src/OrdinaryDiffEqVerner.jl +++ b/lib/OrdinaryDiffEqVerner/src/OrdinaryDiffEqVerner.jl @@ -8,7 +8,7 @@ import OrdinaryDiffEqCore: alg_order, calculate_residuals!, OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCache, OrdinaryDiffEqAdaptiveAlgorithm, CompiledFloats, uses_uprev, alg_cache, _vec, _reshape, @cache, isfsal, full_cache, - constvalue, _unwrap_val, @SciMLMessage, + constvalue, _unwrap_val, explicit_rk_docstring, trivial_limiter!, _ode_interpolant, _ode_interpolant!, _ode_addsteps!, @fold, @OnDemandTableauExtract, AutoAlgSwitch, From c6e8f89122f336eda9c6d57ec2501741b8f64496 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 22:27:47 -0500 Subject: [PATCH 55/74] fix generic rosenbrock caches --- lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl b/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl index dd011a1861..47f1e35ed3 100644 --- a/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl +++ b/lib/OrdinaryDiffEqRosenbrock/src/generic_rosenbrock.jl @@ -224,13 +224,13 @@ function gen_algcache(cacheexpr::Expr,constcachename::Symbol,algname::Symbol,tab end quote - function alg_cache(alg::$algname,u,rate_prototype,uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits,uprev,uprev2,f,t,dt,reltol,p,calck,::Val{false}) + function alg_cache(alg::$algname,u,rate_prototype,uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits,uprev,uprev2,f,t,dt,reltol,p,calck,::Val{false}, verbose) tf = TimeDerivativeWrapper(f,u,p) uf = UDerivativeWrapper(f,t,p) J,W = build_J_W(alg,u,uprev,p,t,dt,f, nothing, uEltypeNoUnits,Val(false)) $constcachename(tf,uf,$tabname(constvalue(uBottomEltypeNoUnits),constvalue(tTypeNoUnits)),J,W,nothing) end - function alg_cache(alg::$algname,u,rate_prototype,uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits,uprev,uprev2,f,t,dt,reltol,p,calck,::Val{true}) + function alg_cache(alg::$algname,u,rate_prototype,uEltypeNoUnits,uBottomEltypeNoUnits,tTypeNoUnits,uprev,uprev2,f,t,dt,reltol,p,calck,::Val{true}, verbose) du = zero(rate_prototype) du1 = zero(rate_prototype) du2 = zero(rate_prototype) From f105fc3bf1e29c48aaca8693a3bca48ecba6c4ab Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 22:34:15 -0500 Subject: [PATCH 56/74] back compat for DelayDiffEq --- lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl index d6c2b16116..51ca3be2cb 100644 --- a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl +++ b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl @@ -124,3 +124,13 @@ alg_cache(alg::OrdinaryDiffEqAlgorithm, prob, callback::F) where {F} = ODEEmptyC get_chunksize(cache::SciMLBase.DECache) = error("This cache does not have a chunksize.") get_chunksize(cache::ODEChunkCache{CS}) where {CS} = CS + +# For backwards compat with DelayDiffEq +function alg_cache(alg, u, rate_prototype, uEltypeNoUnits, + uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, + dt, reltol, p, calck, + val) + + alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, + calck, val, ODEVerbosity()) +end \ No newline at end of file From 56e821d4f00fb34c28a1555cc6637985825b6786 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 22:57:09 -0500 Subject: [PATCH 57/74] use nonlinear verbosity in _initialize_dae! --- .../src/initialize_dae.jl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl index e89fe6c0a3..26de1c722c 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/initialize_dae.jl @@ -231,7 +231,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD nlsolve = default_nlsolve(alg.nlsolve, isinplace, nlprob, u0) nlsol = solve(nlprob, nlsolve; abstol = integrator.opts.abstol, - reltol = integrator.opts.reltol, verbose = Minimal()) + reltol = integrator.opts.reltol, integrator.opts.verbose.nonlinear_verbosity) integrator.u = nlsol.u failed = nlsol.retcode != ReturnCode.Success end @@ -312,7 +312,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA nlprob = NonlinearProblem(nlfunc, u0, p) nlsolve = default_nlsolve(alg.nlsolve, isinplace, u0, nlprob, isAD) nlsol = solve(nlprob, nlsolve; abstol = integrator.opts.abstol, - reltol = integrator.opts.reltol, verbose = Minimal()) + reltol = integrator.opts.reltol, verbose = integrator.opts.verbose.nonlinear_verbosity) integrator.u = nlsol.u recursivecopy!(integrator.uprev, integrator.u) @@ -360,7 +360,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA nlfunc = NonlinearFunction(nlequation; jac_prototype = f.jac_prototype) nlprob = NonlinearProblem(nlfunc, u0) nlsol = solve(nlprob, nlsolve; abstol = integrator.opts.abstol, - reltol = integrator.opts.reltol, verbose = Minimal()) + reltol = integrator.opts.reltol, verbose = integrator.opts.verbose.nonlinear_verbosity) integrator.u = nlsol.u @@ -459,7 +459,8 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD nlprob = NonlinearProblem(nlfunc, alg_u, p) nlsolve = default_nlsolve(alg.nlsolve, isinplace, u, nlprob, isAD) - nlsol = solve(nlprob, nlsolve; abstol = alg.abstol, reltol = integrator.opts.reltol, verbose = Minimal()) + nlsol = solve(nlprob, nlsolve; abstol = alg.abstol, reltol = integrator.opts.reltol, + verbose = integrator.opts.verbose.nonlinear_verbosity) alg_u .= nlsol recursivecopy!(integrator.uprev, integrator.u) @@ -519,7 +520,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::OD nlprob = NonlinearProblem(nlfunc, u0[algebraic_vars]) nlsolve = default_nlsolve(alg.nlsolve, isinplace, u0, nlprob, isAD) - nlsol = solve(nlprob, nlsolve, verbose = Minimal()) + nlsol = solve(nlprob, nlsolve, verbose = integrator.opts.verbose.nonlinear_verbosity) u[algebraic_vars] .= nlsol.u @@ -607,7 +608,8 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA nlfunc = NonlinearFunction(nlequation!; jac_prototype = f.jac_prototype) nlprob = NonlinearProblem(nlfunc, ifelse.(differential_vars, du, u), p) - nlsol = solve(nlprob, nlsolve; abstol = alg.abstol, reltol = integrator.opts.reltol, verbose = Minimal()) + nlsol = solve(nlprob, nlsolve; abstol = alg.abstol, reltol = integrator.opts.reltol, + verbose = integrator.opts.verbose.nonlinear_verbosity) @. du = ifelse(differential_vars, nlsol.u, du) @. u = ifelse(differential_vars, u, nlsol.u) @@ -658,7 +660,7 @@ function _initialize_dae!(integrator::OrdinaryDiffEqCore.ODEIntegrator, prob::DA @show nlsolve - nlsol = solve(nlprob, nlsolve, verbose = Minimal()) + nlsol = solve(nlprob, nlsolve, verbose = integrator.opts.verbose.nonlinear_verbosity) du = ifelse.(differential_vars, nlsol.u, du) u = ifelse.(differential_vars, u, nlsol.u) From 14b6447d0501ed79d54c1049183a6422f9f5ee13 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 23:05:43 -0500 Subject: [PATCH 58/74] remove bad backwards compat --- lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl index 51ca3be2cb..d6c2b16116 100644 --- a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl +++ b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl @@ -124,13 +124,3 @@ alg_cache(alg::OrdinaryDiffEqAlgorithm, prob, callback::F) where {F} = ODEEmptyC get_chunksize(cache::SciMLBase.DECache) = error("This cache does not have a chunksize.") get_chunksize(cache::ODEChunkCache{CS}) where {CS} = CS - -# For backwards compat with DelayDiffEq -function alg_cache(alg, u, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, - dt, reltol, p, calck, - val) - - alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, - calck, val, ODEVerbosity()) -end \ No newline at end of file From 17afac9381f1991c4a27b20af25d151c5f5101b6 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 5 Nov 2025 23:30:00 -0500 Subject: [PATCH 59/74] backwards compat for stochasticdiffeq and delaydiffeq --- lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl | 9 +++++++++ .../src/OrdinaryDiffEqNonlinearSolve.jl | 2 +- lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl | 11 +++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl index d6c2b16116..5b1885289a 100644 --- a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl +++ b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl @@ -124,3 +124,12 @@ alg_cache(alg::OrdinaryDiffEqAlgorithm, prob, callback::F) where {F} = ODEEmptyC get_chunksize(cache::SciMLBase.DECache) = error("This cache does not have a chunksize.") get_chunksize(cache::ODEChunkCache{CS}) where {CS} = CS + +#Backwards compat for DelayDiffEq +function alg_cache(alg, u, rate_prototype, ::Type{uEltypeNoUnits}, + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(true), ODEVerbosity()) +end \ No newline at end of file diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl index 73910a3ecb..93a5e4d506 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl @@ -12,7 +12,7 @@ import DiffEqBase import PreallocationTools: dualcache, get_tmp using SimpleNonlinearSolve: SimpleTrustRegion, SimpleGaussNewton using NonlinearSolve: FastShortcutNonlinearPolyalg, FastShortcutNLLSPolyalg, NewtonRaphson, - step! + step!, NonlinearVerbosity using MuladdMacro: @muladd using FastBroadcast: @.. import FastClosures: @closure diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl index 0ca0ecd99a..215ca1384a 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl @@ -134,6 +134,17 @@ SciMLBase.has_jac(f::DAEResidualDerivativeWrapper) = SciMLBase.has_jac(f.f) SciMLBase.has_Wfact(f::DAEResidualDerivativeWrapper) = SciMLBase.has_Wfact(f.f) SciMLBase.has_Wfact_t(f::DAEResidualDerivativeWrapper) = SciMLBase.has_Wfact_t(f.f) +#Backwards compat for StochasticDiffEq +function build_nlsolver(alg, u, uprev, p, t, dt, f::F, rate_prototype, + ::Type{uEltypeNoUnits}, + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, γ, c, + iip) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, + uBottomEltypeNoUnits, + tTypeNoUnits, γ, c, 1, iip, NonlinearVerbosity()) +end + function build_nlsolver(alg, u, uprev, p, t, dt, f::F, rate_prototype, ::Type{uEltypeNoUnits}, ::Type{uBottomEltypeNoUnits}, From f9ecd33fb44c907b786421765e30d31c21898249 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Thu, 6 Nov 2025 09:44:05 -0500 Subject: [PATCH 60/74] move deprecated alg_cache and build_nlsolver to deprecated files --- lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl | 1 + lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl | 9 --------- lib/OrdinaryDiffEqCore/src/deprecated.jl | 8 ++++++++ .../src/OrdinaryDiffEqNonlinearSolve.jl | 1 + lib/OrdinaryDiffEqNonlinearSolve/src/deprecated.jl | 10 ++++++++++ lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl | 10 ---------- 6 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 lib/OrdinaryDiffEqCore/src/deprecated.jl create mode 100644 lib/OrdinaryDiffEqNonlinearSolve/src/deprecated.jl diff --git a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl index 10f7f7a75a..4b16d13267 100644 --- a/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl +++ b/lib/OrdinaryDiffEqCore/src/OrdinaryDiffEqCore.jl @@ -150,6 +150,7 @@ include("composite_algs.jl") include("alg_utils.jl") include("caches/basic_caches.jl") +include("deprecated.jl") include("integrators/type.jl") include("integrators/controllers.jl") diff --git a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl index 5b1885289a..d6c2b16116 100644 --- a/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl +++ b/lib/OrdinaryDiffEqCore/src/caches/basic_caches.jl @@ -124,12 +124,3 @@ alg_cache(alg::OrdinaryDiffEqAlgorithm, prob, callback::F) where {F} = ODEEmptyC get_chunksize(cache::SciMLBase.DECache) = error("This cache does not have a chunksize.") get_chunksize(cache::ODEChunkCache{CS}) where {CS} = CS - -#Backwards compat for DelayDiffEq -function alg_cache(alg, u, rate_prototype, ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, - dt, reltol, p, calck, - ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} - alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(true), ODEVerbosity()) -end \ No newline at end of file diff --git a/lib/OrdinaryDiffEqCore/src/deprecated.jl b/lib/OrdinaryDiffEqCore/src/deprecated.jl new file mode 100644 index 0000000000..018dba847a --- /dev/null +++ b/lib/OrdinaryDiffEqCore/src/deprecated.jl @@ -0,0 +1,8 @@ +#Backwards compat for DelayDiffEq +function alg_cache(alg, u, rate_prototype, ::Type{uEltypeNoUnits}, + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(true), ODEVerbosity()) +end \ No newline at end of file diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl index 93a5e4d506..b47a2291c0 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/OrdinaryDiffEqNonlinearSolve.jl @@ -62,6 +62,7 @@ import StaticArrays: SArray, MVector, SVector, @SVector, StaticArray, MMatrix, S include("type.jl") include("utils.jl") +include("deprecated.jl") include("nlsolve.jl") include("functional.jl") include("newton.jl") diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/deprecated.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/deprecated.jl new file mode 100644 index 0000000000..ff12942f17 --- /dev/null +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/deprecated.jl @@ -0,0 +1,10 @@ +#Backwards compat for StochasticDiffEq +function build_nlsolver(alg, u, uprev, p, t, dt, f::F, rate_prototype, + ::Type{uEltypeNoUnits}, + ::Type{uBottomEltypeNoUnits}, + ::Type{tTypeNoUnits}, γ, c, + iip) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, + uBottomEltypeNoUnits, + tTypeNoUnits, γ, c, 1, iip, NonlinearVerbosity()) +end diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl index 215ca1384a..dd072ba058 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/utils.jl @@ -134,16 +134,6 @@ SciMLBase.has_jac(f::DAEResidualDerivativeWrapper) = SciMLBase.has_jac(f.f) SciMLBase.has_Wfact(f::DAEResidualDerivativeWrapper) = SciMLBase.has_Wfact(f.f) SciMLBase.has_Wfact_t(f::DAEResidualDerivativeWrapper) = SciMLBase.has_Wfact_t(f.f) -#Backwards compat for StochasticDiffEq -function build_nlsolver(alg, u, uprev, p, t, dt, f::F, rate_prototype, - ::Type{uEltypeNoUnits}, - ::Type{uBottomEltypeNoUnits}, - ::Type{tTypeNoUnits}, γ, c, - iip) where {F, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} - build_nlsolver(alg, u, uprev, p, t, dt, f, rate_prototype, uEltypeNoUnits, - uBottomEltypeNoUnits, - tTypeNoUnits, γ, c, 1, iip, NonlinearVerbosity()) -end function build_nlsolver(alg, u, uprev, p, t, dt, f::F, rate_prototype, ::Type{uEltypeNoUnits}, From 1985af0984eeb56eb79855977c6bf1f21802fe07 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 7 Nov 2025 14:00:07 -0500 Subject: [PATCH 61/74] remove message in loopheader so Delay and StochasticDiffEq work --- lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl b/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl index c4e596aae4..c46f5d8c52 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl @@ -10,16 +10,12 @@ function loopheader!(integrator) if integrator.iter > 0 if (integrator.opts.adaptive && !integrator.accept_step) || integrator.force_stepfail - @SciMLMessage(lazy"Step rejected: t = $(integrator.t), EEst = $(integrator.EEst)", - integrator.opts.verbose, :step_rejected) if integrator.isout integrator.dt = integrator.dt * integrator.opts.qmin elseif !integrator.force_stepfail step_reject_controller!(integrator, integrator.alg) end else - @SciMLMessage(lazy"Step accepted: t = $(integrator.t), dt = $(integrator.dt), EEst = $(integrator.EEst)", - integrator.opts.verbose, :step_accepted) integrator.success_iter += 1 apply_step!(integrator) end From 5b7810827bcb6767ea4fa9ce7e378dbfd771fbd6 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 7 Nov 2025 15:25:33 -0500 Subject: [PATCH 62/74] add another dep path for oop --- lib/OrdinaryDiffEqCore/src/deprecated.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/OrdinaryDiffEqCore/src/deprecated.jl b/lib/OrdinaryDiffEqCore/src/deprecated.jl index 018dba847a..e00fe79a4a 100644 --- a/lib/OrdinaryDiffEqCore/src/deprecated.jl +++ b/lib/OrdinaryDiffEqCore/src/deprecated.jl @@ -5,4 +5,12 @@ function alg_cache(alg, u, rate_prototype, ::Type{uEltypeNoUnits}, ::Val{true}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(true), ODEVerbosity()) +end + +function alg_cache(alg, u, rate_prototype, ::Type{uEltypeNoUnits}, + ::Type{uBottomEltypeNoUnits}, ::Type{tTypeNoUnits}, uprev, uprev2, f, t, + dt, reltol, p, calck, + ::Val{false}) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits} + alg_cache(alg, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, Val(false), ODEVerbosity()) end \ No newline at end of file From 0d6e6623f1ae353ab6316f9817aef6d907668298 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Fri, 7 Nov 2025 16:05:55 -0500 Subject: [PATCH 63/74] put loopheader messages back --- lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl b/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl index c46f5d8c52..c3357442c8 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl @@ -10,12 +10,16 @@ function loopheader!(integrator) if integrator.iter > 0 if (integrator.opts.adaptive && !integrator.accept_step) || integrator.force_stepfail + @SciMLMessage(lazy"Step rejected: t = $(integrator.t), EEst = $(integrator.EEst)", + integrator.opts.verbose, :step_rejected) if integrator.isout integrator.dt = integrator.dt * integrator.opts.qmin elseif !integrator.force_stepfail step_reject_controller!(integrator, integrator.alg) end else + @SciMLMessage(lazy"Step accepted: t = $(integrator.t), dt = $(integrator.dt), EEst = $(integrator.EEst)", + integrator.opts.verbose, :step_accepted) integrator.success_iter += 1 apply_step!(integrator) end From 96ba527414601233aa78b058d2e2bc66eaa79142 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Mon, 10 Nov 2025 12:55:38 -0500 Subject: [PATCH 64/74] fix alg_cache for CG4a --- lib/OrdinaryDiffEqLinear/src/linear_caches.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OrdinaryDiffEqLinear/src/linear_caches.jl b/lib/OrdinaryDiffEqLinear/src/linear_caches.jl index 25caa3f099..4dabf82be8 100644 --- a/lib/OrdinaryDiffEqLinear/src/linear_caches.jl +++ b/lib/OrdinaryDiffEqLinear/src/linear_caches.jl @@ -174,7 +174,7 @@ end end function alg_cache(alg::CG4a, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{true}) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{true}, verbose) W = false .* vec(rate_prototype) .* vec(rate_prototype)' # uEltype? k = zero(rate_prototype) fsalfirst = zero(rate_prototype) @@ -186,7 +186,7 @@ struct CG4aConstantCache <: OrdinaryDiffEqConstantCache end function alg_cache(alg::CG4a, u, rate_prototype, uEltypeNoUnits, - tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{false}) + tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{false}, verbose) CG4aConstantCache() end From 8653c49b43a093a41d087e7137429e3eecd8c683 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Wed, 12 Nov 2025 12:51:35 -0500 Subject: [PATCH 65/74] inferrable default path, make grouping more inferrable --- lib/OrdinaryDiffEqCore/src/verbosity.jl | 118 +++++++++++++----------- 1 file changed, 64 insertions(+), 54 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index dcf528d75f..02eb4ba98c 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -114,39 +114,41 @@ const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat, :max_it const performance_options = (:alg_switch, :stiff_detection, :mismatched_input_output_type, :jacobian_update, :w_factorization, :newton_iterations) const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt, :dt_epsilon, :stability_check, :near_singular) -function option_group(option::Symbol) - if option in error_control_options - return :error_control - elseif option in performance_options - return :performance - elseif option in numerical_options - return :numerical - else - error("Unknown verbosity option: $option") - end -end - -# Get all options in a group -function group_options(verbosity::ODEVerbosity, group::Symbol) - if group === :error_control - return NamedTuple{error_control_options}(getproperty(verbosity, opt) - for opt in error_control_options) - elseif group === :performance - return NamedTuple{performance_options}(getproperty(verbosity, opt) - for opt in performance_options) - elseif group === :numerical - return NamedTuple{numerical_options}(getproperty(verbosity, opt) - for opt in numerical_options) - else - error("Unknown group: $group") - end -end - - function ODEVerbosity(; error_control = nothing, performance = nothing, numerical = nothing, linear_verbosity = nothing, nonlinear_verbosity = nothing, kwargs...) # Validate group arguments + + if error_control === nothing && performance === nothing && numerical === nothing && + linear_verbosity === nothing && nonlinear_verbosity === nothing && isempty(kwargs) + return ODEVerbosity( + linear_verbosity = Minimal(), + nonlinear_verbosity = Minimal(), + dt_NaN = WarnLevel(), + init_NaN = WarnLevel(), + dense_output_saveat = WarnLevel(), + max_iters = WarnLevel(), + dt_min_unstable = WarnLevel(), + instability = WarnLevel(), + newton_convergence = Silent(), + step_rejected = Silent(), + step_accepted = Silent(), + convergence_limit = Silent(), + alg_switch = Silent(), + stiff_detection = Silent(), + mismatched_input_output_type = WarnLevel(), + jacobian_update = Silent(), + w_factorization = Silent(), + newton_iterations = Silent(), + rosenbrock_no_differential_states = WarnLevel(), + shampine_dt = Silent(), + unlimited_dt = WarnLevel(), + dt_epsilon = Silent(), + stability_check = Silent(), + near_singular = Silent() + ) + end + if error_control !== nothing && !(error_control isa AbstractMessageLevel) throw(ArgumentError("error_control must be a SciMLLogging.AbstractMessageLevel, got $(typeof(error_control))")) end @@ -196,13 +198,37 @@ function ODEVerbosity(; near_singular = Silent() ) - # Apply group-level settings + # Apply group-level settings - done explicitly for type stability final_args = if error_control !== nothing || performance !== nothing || numerical !== nothing - NamedTuple{keys(default_args)}( - _resolve_arg_value( - key, default_args[key], error_control, performance, numerical) - for key in keys(default_args) + ( + linear_verbosity = default_args.linear_verbosity, + nonlinear_verbosity = default_args.nonlinear_verbosity, + # Error control group + dt_NaN = error_control !== nothing ? error_control : default_args.dt_NaN, + init_NaN = error_control !== nothing ? error_control : default_args.init_NaN, + dense_output_saveat = error_control !== nothing ? error_control : default_args.dense_output_saveat, + max_iters = error_control !== nothing ? error_control : default_args.max_iters, + dt_min_unstable = error_control !== nothing ? error_control : default_args.dt_min_unstable, + instability = error_control !== nothing ? error_control : default_args.instability, + newton_convergence = error_control !== nothing ? error_control : default_args.newton_convergence, + step_rejected = error_control !== nothing ? error_control : default_args.step_rejected, + step_accepted = error_control !== nothing ? error_control : default_args.step_accepted, + convergence_limit = error_control !== nothing ? error_control : default_args.convergence_limit, + # Performance group + alg_switch = performance !== nothing ? performance : default_args.alg_switch, + stiff_detection = performance !== nothing ? performance : default_args.stiff_detection, + mismatched_input_output_type = performance !== nothing ? performance : default_args.mismatched_input_output_type, + jacobian_update = performance !== nothing ? performance : default_args.jacobian_update, + w_factorization = performance !== nothing ? performance : default_args.w_factorization, + newton_iterations = performance !== nothing ? performance : default_args.newton_iterations, + # Numerical group + rosenbrock_no_differential_states = numerical !== nothing ? numerical : default_args.rosenbrock_no_differential_states, + shampine_dt = numerical !== nothing ? numerical : default_args.shampine_dt, + unlimited_dt = numerical !== nothing ? numerical : default_args.unlimited_dt, + dt_epsilon = numerical !== nothing ? numerical : default_args.dt_epsilon, + stability_check = numerical !== nothing ? numerical : default_args.stability_check, + near_singular = numerical !== nothing ? numerical : default_args.near_singular ) else default_args @@ -222,7 +248,7 @@ end function ODEVerbosity(verbose::AbstractVerbosityPreset) if verbose isa Minimal # Minimal: Only fatal errors and critical warnings - ODEVerbosity( + return ODEVerbosity( linear_verbosity = Minimal(), nonlinear_verbosity = Minimal(), dt_NaN = WarnLevel(), @@ -250,10 +276,10 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) ) elseif verbose isa Standard # Standard: Everything from Minimal + non-fatal warnings - ODEVerbosity() + return ODEVerbosity() elseif verbose isa Detailed # Detailed: Everything from Standard + debugging/solver behavior - ODEVerbosity( + return ODEVerbosity( linear_verbosity = Detailed(), nonlinear_verbosity = Detailed(), dt_NaN = WarnLevel(), @@ -281,7 +307,7 @@ function ODEVerbosity(verbose::AbstractVerbosityPreset) ) elseif verbose isa All # All: Maximum verbosity - every possible logging message at InfoLevel - ODEVerbosity( + return ODEVerbosity( linear_verbosity = All(), nonlinear_verbosity = All(), dt_NaN = WarnLevel(), @@ -338,19 +364,3 @@ end Silent() ) end - -# Helper function to resolve argument values based on group membership -@inline function _resolve_arg_value( - key::Symbol, default_val, error_control, performance, numerical) - if key === :linear_verbosity || key === :nonlinear_verbosity - return default_val - elseif key in error_control_options && error_control !== nothing - return error_control - elseif key in performance_options && performance !== nothing - return performance - elseif key in numerical_options && numerical !== nothing - return numerical - else - return default_val - end -end From 939dbf9a40e9375a63bb6d2c2f78ea1f7f4058ba Mon Sep 17 00:00:00 2001 From: jClugstor Date: Thu, 13 Nov 2025 12:29:49 -0500 Subject: [PATCH 66/74] use multiple dispatch for handling verbose kwarg --- lib/OrdinaryDiffEqCore/src/solve.jl | 12 +----------- lib/OrdinaryDiffEqCore/src/verbosity.jl | 12 ++++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/solve.jl b/lib/OrdinaryDiffEqCore/src/solve.jl index d9f19f2f47..9982055418 100644 --- a/lib/OrdinaryDiffEqCore/src/solve.jl +++ b/lib/OrdinaryDiffEqCore/src/solve.jl @@ -96,17 +96,7 @@ function SciMLBase.__init( error("This solver is not able to use mass matrices. For compatible solvers see https://docs.sciml.ai/DiffEqDocs/stable/solvers/dae_solve/") end - if verbose isa Bool - if verbose - verbose_spec = ODEVerbosity() - else - verbose_spec = ODEVerbosity(None()) - end - elseif verbose isa AbstractVerbosityPreset - verbose_spec = ODEVerbosity(verbose) - else - verbose_spec = verbose - end + verbose_spec = _process_verbose_param(verbose) if alg isa OrdinaryDiffEqRosenbrockAdaptiveAlgorithm && # https://github.com/SciML/OrdinaryDiffEq.jl/pull/2079 fixes this for Rosenbrock23 and 32 diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index 02eb4ba98c..fa2723554c 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -364,3 +364,15 @@ end Silent() ) end + +const DEFAULT_VERBOSE = ODEVerbosity() + +@inline function _process_verbose_param(verbose::SciMLLogging.AbstractVerbosityPreset) + ODEVerbosity(verbose) +end + +@inline function _process_verbose_param(verbose::Bool) + verbose ? DEFAULT_VERBOSE : ODEVerbosity(SciMLLogging.None()) +end + +@inline _process_verbose_param(verbose::ODEVerbosity) = verbose \ No newline at end of file From f277e9609577ec9a0b90ce2a9a369e2abc775d99 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Thu, 13 Nov 2025 13:30:37 -0500 Subject: [PATCH 67/74] add generated path for ODEVerbosity constructor --- lib/OrdinaryDiffEqCore/src/verbosity.jl | 148 ++++++++++++++++++------ 1 file changed, 113 insertions(+), 35 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/verbosity.jl b/lib/OrdinaryDiffEqCore/src/verbosity.jl index fa2723554c..a9531b2381 100644 --- a/lib/OrdinaryDiffEqCore/src/verbosity.jl +++ b/lib/OrdinaryDiffEqCore/src/verbosity.jl @@ -114,41 +114,12 @@ const error_control_options = (:dt_NaN, :init_NaN, :dense_output_saveat, :max_it const performance_options = (:alg_switch, :stiff_detection, :mismatched_input_output_type, :jacobian_update, :w_factorization, :newton_iterations) const numerical_options = (:rosenbrock_no_differential_states, :shampine_dt, :unlimited_dt, :dt_epsilon, :stability_check, :near_singular) -function ODEVerbosity(; - error_control = nothing, performance = nothing, numerical = nothing, - linear_verbosity = nothing, nonlinear_verbosity = nothing, kwargs...) +# Runtime helper for complex verbosity construction path +function _build_ode_verbosity_runtime( + error_control, performance, numerical, + linear_verbosity, nonlinear_verbosity, kwargs +) # Validate group arguments - - if error_control === nothing && performance === nothing && numerical === nothing && - linear_verbosity === nothing && nonlinear_verbosity === nothing && isempty(kwargs) - return ODEVerbosity( - linear_verbosity = Minimal(), - nonlinear_verbosity = Minimal(), - dt_NaN = WarnLevel(), - init_NaN = WarnLevel(), - dense_output_saveat = WarnLevel(), - max_iters = WarnLevel(), - dt_min_unstable = WarnLevel(), - instability = WarnLevel(), - newton_convergence = Silent(), - step_rejected = Silent(), - step_accepted = Silent(), - convergence_limit = Silent(), - alg_switch = Silent(), - stiff_detection = Silent(), - mismatched_input_output_type = WarnLevel(), - jacobian_update = Silent(), - w_factorization = Silent(), - newton_iterations = Silent(), - rosenbrock_no_differential_states = WarnLevel(), - shampine_dt = Silent(), - unlimited_dt = WarnLevel(), - dt_epsilon = Silent(), - stability_check = Silent(), - near_singular = Silent() - ) - end - if error_control !== nothing && !(error_control isa AbstractMessageLevel) throw(ArgumentError("error_control must be a SciMLLogging.AbstractMessageLevel, got $(typeof(error_control))")) end @@ -160,7 +131,7 @@ function ODEVerbosity(; end # Validate individual kwargs - for (key, value) in kwargs + for (key, value) in pairs(kwargs) if !(key in error_control_options || key in performance_options || key in numerical_options) throw(ArgumentError("Unknown verbosity option: $key. Valid options are: $(tuple(error_control_options..., performance_options..., numerical_options...))")) @@ -242,6 +213,113 @@ function ODEVerbosity(; ODEVerbosity(values(final_args)...) end +# Optionally-generated function for ODEVerbosity construction +# Uses compile-time type information to optimize the common default case +function _build_ode_verbosity( + error_control, + performance, + numerical, + linear_verbosity, + nonlinear_verbosity, + kwargs +) + if @generated + # Generated path: In this block, we're at compile time + # error_control, performance, numerical, etc. are the actual type values + # Check if all group params are Nothing and kwargs is empty (fast default path) + if error_control === Nothing && performance === Nothing && numerical === Nothing && + linear_verbosity === Nothing && nonlinear_verbosity === Nothing && + kwargs <: NamedTuple{()} + # Return an expression that constructs the default directly + return quote + ODEVerbosity( + Minimal(), # linear_verbosity + Minimal(), # nonlinear_verbosity + WarnLevel(), # dt_NaN + WarnLevel(), # init_NaN + WarnLevel(), # dense_output_saveat + WarnLevel(), # max_iters + WarnLevel(), # dt_min_unstable + WarnLevel(), # instability + Silent(), # newton_convergence + Silent(), # step_rejected + Silent(), # step_accepted + Silent(), # convergence_limit + Silent(), # alg_switch + Silent(), # stiff_detection + WarnLevel(), # mismatched_input_output_type + Silent(), # jacobian_update + Silent(), # w_factorization + Silent(), # newton_iterations + WarnLevel(), # rosenbrock_no_differential_states + Silent(), # shampine_dt + WarnLevel(), # unlimited_dt + Silent(), # dt_epsilon + Silent(), # stability_check + Silent() # near_singular + ) + end + else + # For non-default cases, delegate to runtime logic + return quote + _build_ode_verbosity_runtime( + error_control, performance, numerical, + linear_verbosity, nonlinear_verbosity, kwargs + ) + end + end + else + # Runtime fallback: error_control, performance, etc. are VALUES + if error_control === nothing && performance === nothing && numerical === nothing && + linear_verbosity === nothing && nonlinear_verbosity === nothing && + isempty(kwargs) + # Fast default path at runtime + ODEVerbosity( + Minimal(), # linear_verbosity + Minimal(), # nonlinear_verbosity + WarnLevel(), # dt_NaN + WarnLevel(), # init_NaN + WarnLevel(), # dense_output_saveat + WarnLevel(), # max_iters + WarnLevel(), # dt_min_unstable + WarnLevel(), # instability + Silent(), # newton_convergence + Silent(), # step_rejected + Silent(), # step_accepted + Silent(), # convergence_limit + Silent(), # alg_switch + Silent(), # stiff_detection + WarnLevel(), # mismatched_input_output_type + Silent(), # jacobian_update + Silent(), # w_factorization + Silent(), # newton_iterations + WarnLevel(), # rosenbrock_no_differential_states + Silent(), # shampine_dt + WarnLevel(), # unlimited_dt + Silent(), # dt_epsilon + Silent(), # stability_check + Silent() # near_singular + ) + else + # Complex path + _build_ode_verbosity_runtime( + error_control, performance, numerical, + linear_verbosity, nonlinear_verbosity, kwargs + ) + end + end +end + +function ODEVerbosity(; + error_control = nothing, performance = nothing, numerical = nothing, + linear_verbosity = nothing, nonlinear_verbosity = nothing, kwargs...) + _build_ode_verbosity( + error_control, performance, numerical, + linear_verbosity, nonlinear_verbosity, + NamedTuple(kwargs) + ) +end + # Constructor for verbosity presets following the hierarchical levels: # None < Minimal < Standard < Detailed < All # Each level includes all messages from levels below it plus additional ones From 24b600d9c2eefd41209c1925a96e327d6a91c859 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Thu, 13 Nov 2025 13:47:33 -0500 Subject: [PATCH 68/74] fix up the verbosity tests --- test/interface/verbosity.jl | 167 +++++++++++++++++++----------------- 1 file changed, 90 insertions(+), 77 deletions(-) diff --git a/test/interface/verbosity.jl b/test/interface/verbosity.jl index 2949d9df74..213a4dce5c 100644 --- a/test/interface/verbosity.jl +++ b/test/interface/verbosity.jl @@ -1,10 +1,6 @@ using OrdinaryDiffEqCore -using OrdinaryDiffEqCore: ODEVerbosity, option_group, group_options -using OrdinaryDiffEqBDF -using OrdinaryDiffEqExtrapolation -using OrdinaryDiffEqFIRK -using OrdinaryDiffEqRosenbrock -using OrdinaryDiffEqSDIRK +using OrdinaryDiffEqCore: ODEVerbosity +using OrdinaryDiffEq using OrdinaryDiffEqNonlinearSolve: NonlinearSolveAlg using ODEProblemLibrary: prob_ode_vanderpol_stiff using Test @@ -16,62 +12,126 @@ using NonlinearSolve: NonlinearVerbosity @testset "Default constructor" begin v1 = ODEVerbosity() @test v1 isa ODEVerbosity + + # Test solver verbosity + @test v1.linear_verbosity isa SciMLLogging.Minimal + @test v1.nonlinear_verbosity isa SciMLLogging.Minimal + + # Test error control group (default: WarnLevel except newton_convergence, step_rejected, step_accepted, convergence_limit) @test v1.dt_NaN isa SciMLLogging.WarnLevel @test v1.init_NaN isa SciMLLogging.WarnLevel @test v1.dense_output_saveat isa SciMLLogging.WarnLevel - @test v1.alg_switch isa SciMLLogging.WarnLevel + @test v1.max_iters isa SciMLLogging.WarnLevel + @test v1.dt_min_unstable isa SciMLLogging.WarnLevel + @test v1.instability isa SciMLLogging.WarnLevel + @test v1.newton_convergence isa SciMLLogging.Silent + @test v1.step_rejected isa SciMLLogging.Silent + @test v1.step_accepted isa SciMLLogging.Silent + @test v1.convergence_limit isa SciMLLogging.Silent + + # Test performance group (default: Silent except mismatched_input_output_type) + @test v1.alg_switch isa SciMLLogging.Silent + @test v1.stiff_detection isa SciMLLogging.Silent @test v1.mismatched_input_output_type isa SciMLLogging.WarnLevel + @test v1.jacobian_update isa SciMLLogging.Silent + @test v1.w_factorization isa SciMLLogging.Silent + @test v1.newton_iterations isa SciMLLogging.Silent + + # Test numerical group (default: WarnLevel except shampine_dt, dt_epsilon, stability_check) @test v1.rosenbrock_no_differential_states isa SciMLLogging.WarnLevel - @test v1.shampine_dt isa SciMLLogging.WarnLevel + @test v1.shampine_dt isa SciMLLogging.Silent @test v1.unlimited_dt isa SciMLLogging.WarnLevel - @test v1.linear_verbosity isa SciMLLogging.AbstractVerbosityPreset - @test v1.nonlinear_verbosity isa SciMLLogging.AbstractVerbosityPreset + @test v1.dt_epsilon isa SciMLLogging.Silent + @test v1.stability_check isa SciMLLogging.Silent + @test v1.near_singular isa SciMLLogging.Silent end @testset "ODEVerbosity preset constructors" begin v_none = ODEVerbosity(SciMLLogging.None()) - v_all = ODEVerbosity(SciMLLogging.All()) v_minimal = ODEVerbosity(SciMLLogging.Minimal()) v_standard = ODEVerbosity(SciMLLogging.Standard()) v_detailed = ODEVerbosity(SciMLLogging.Detailed()) + v_all = ODEVerbosity(SciMLLogging.All()) + # Test None - everything Silent + @test v_none.linear_verbosity isa SciMLLogging.None + @test v_none.nonlinear_verbosity isa SciMLLogging.None @test v_none.dt_NaN isa SciMLLogging.Silent @test v_none.init_NaN isa SciMLLogging.Silent @test v_none.alg_switch isa SciMLLogging.Silent @test v_none.rosenbrock_no_differential_states isa SciMLLogging.Silent + # Test Minimal - only critical errors + @test v_minimal.linear_verbosity isa SciMLLogging.Minimal + @test v_minimal.nonlinear_verbosity isa SciMLLogging.Minimal @test v_minimal.dt_NaN isa SciMLLogging.WarnLevel @test v_minimal.init_NaN isa SciMLLogging.WarnLevel + @test v_minimal.max_iters isa SciMLLogging.WarnLevel + @test v_minimal.newton_convergence isa SciMLLogging.WarnLevel + @test v_minimal.near_singular isa SciMLLogging.WarnLevel @test v_minimal.alg_switch isa SciMLLogging.Silent @test v_minimal.dense_output_saveat isa SciMLLogging.Silent + @test v_minimal.mismatched_input_output_type isa SciMLLogging.Silent + # Test Standard - same as default @test v_standard.dt_NaN isa SciMLLogging.WarnLevel @test v_standard.init_NaN isa SciMLLogging.WarnLevel - @test v_standard.alg_switch isa SciMLLogging.WarnLevel + @test v_standard.alg_switch isa SciMLLogging.Silent + @test v_standard.dense_output_saveat isa SciMLLogging.WarnLevel + @test v_standard.mismatched_input_output_type isa SciMLLogging.WarnLevel + # Test Detailed - includes debugging info + @test v_detailed.linear_verbosity isa SciMLLogging.Detailed + @test v_detailed.nonlinear_verbosity isa SciMLLogging.Detailed @test v_detailed.alg_switch isa SciMLLogging.InfoLevel @test v_detailed.dense_output_saveat isa SciMLLogging.InfoLevel @test v_detailed.shampine_dt isa SciMLLogging.InfoLevel + @test v_detailed.jacobian_update isa SciMLLogging.InfoLevel + @test v_detailed.w_factorization isa SciMLLogging.InfoLevel + @test v_detailed.convergence_limit isa SciMLLogging.InfoLevel + # Test All - maximum verbosity + @test v_all.linear_verbosity isa SciMLLogging.All + @test v_all.nonlinear_verbosity isa SciMLLogging.All @test v_all.alg_switch isa SciMLLogging.InfoLevel @test v_all.shampine_dt isa SciMLLogging.InfoLevel @test v_all.dense_output_saveat isa SciMLLogging.InfoLevel + @test v_all.step_rejected isa SciMLLogging.InfoLevel + @test v_all.step_accepted isa SciMLLogging.InfoLevel + @test v_all.stiff_detection isa SciMLLogging.InfoLevel end @testset "Group-level keyword constructors" begin v_error = ODEVerbosity(error_control = SciMLLogging.ErrorLevel()) + # Test all error_control fields @test v_error.dt_NaN isa SciMLLogging.ErrorLevel @test v_error.init_NaN isa SciMLLogging.ErrorLevel @test v_error.dense_output_saveat isa SciMLLogging.ErrorLevel + @test v_error.max_iters isa SciMLLogging.ErrorLevel + @test v_error.dt_min_unstable isa SciMLLogging.ErrorLevel + @test v_error.instability isa SciMLLogging.ErrorLevel + @test v_error.newton_convergence isa SciMLLogging.ErrorLevel + @test v_error.step_rejected isa SciMLLogging.ErrorLevel + @test v_error.step_accepted isa SciMLLogging.ErrorLevel + @test v_error.convergence_limit isa SciMLLogging.ErrorLevel v_numerical = ODEVerbosity(numerical = SciMLLogging.Silent()) + # Test all numerical fields @test v_numerical.rosenbrock_no_differential_states isa SciMLLogging.Silent @test v_numerical.shampine_dt isa SciMLLogging.Silent @test v_numerical.unlimited_dt isa SciMLLogging.Silent + @test v_numerical.dt_epsilon isa SciMLLogging.Silent + @test v_numerical.stability_check isa SciMLLogging.Silent + @test v_numerical.near_singular isa SciMLLogging.Silent v_performance = ODEVerbosity(performance = SciMLLogging.InfoLevel()) + # Test all performance fields @test v_performance.alg_switch isa SciMLLogging.InfoLevel + @test v_performance.stiff_detection isa SciMLLogging.InfoLevel @test v_performance.mismatched_input_output_type isa SciMLLogging.InfoLevel + @test v_performance.jacobian_update isa SciMLLogging.InfoLevel + @test v_performance.w_factorization isa SciMLLogging.InfoLevel + @test v_performance.newton_iterations isa SciMLLogging.InfoLevel end @testset "Mixed group and individual settings" begin @@ -120,69 +180,22 @@ using NonlinearSolve: NonlinearVerbosity @test v_with_solvers2.nonlinear_verbosity isa SciMLLogging.All end - @testset "Group classification functions" begin - @test option_group(:dt_NaN) == :error_control - @test option_group(:init_NaN) == :error_control - @test option_group(:dense_output_saveat) == :error_control - @test option_group(:alg_switch) == :performance - @test option_group(:mismatched_input_output_type) == :performance - @test option_group(:rosenbrock_no_differential_states) == :numerical - @test option_group(:shampine_dt) == :numerical - @test option_group(:unlimited_dt) == :numerical - - # Test error for unknown option - @test_throws ErrorException option_group(:unknown_option) - end + @testset "Validation tests" begin + # Test that invalid group arguments throw errors + @test_throws ArgumentError ODEVerbosity(error_control = "invalid") + @test_throws ArgumentError ODEVerbosity(performance = 123) + @test_throws ArgumentError ODEVerbosity(numerical = :wrong) - @testset "Group options function" begin - v = ODEVerbosity(numerical = SciMLLogging.WarnLevel()) - numerical_opts = group_options(v, :numerical) - @test numerical_opts isa NamedTuple - @test :rosenbrock_no_differential_states in keys(numerical_opts) - @test :shampine_dt in keys(numerical_opts) - @test :unlimited_dt in keys(numerical_opts) - @test numerical_opts.rosenbrock_no_differential_states isa SciMLLogging.WarnLevel - @test numerical_opts.shampine_dt isa SciMLLogging.WarnLevel - @test numerical_opts.unlimited_dt isa SciMLLogging.WarnLevel - - error_opts = group_options(v, :error_control) - @test :dt_NaN in keys(error_opts) - @test :init_NaN in keys(error_opts) - @test :dense_output_saveat in keys(error_opts) - - performance_opts = group_options(v, :performance) - @test :alg_switch in keys(performance_opts) - @test :mismatched_input_output_type in keys(performance_opts) - - # Test error for unknown group - @test_throws ErrorException group_options(v, :unknown_group) - end - - @testset "All error control fields" begin - v = ODEVerbosity(error_control = InfoLevel()) - @test v.dt_NaN isa SciMLLogging.InfoLevel - @test v.init_NaN isa SciMLLogging.InfoLevel - @test v.dense_output_saveat isa SciMLLogging.InfoLevel - end - - @testset "All performance fields" begin - v = ODEVerbosity(performance = ErrorLevel()) - @test v.alg_switch isa SciMLLogging.ErrorLevel - @test v.mismatched_input_output_type isa SciMLLogging.ErrorLevel - end - - @testset "All numerical fields" begin - v = ODEVerbosity(numerical = InfoLevel()) - @test v.rosenbrock_no_differential_states isa SciMLLogging.InfoLevel - @test v.shampine_dt isa SciMLLogging.InfoLevel - @test v.unlimited_dt isa SciMLLogging.InfoLevel + # Test that invalid individual fields throw errors + @test_throws ArgumentError ODEVerbosity(dt_NaN = "invalid") + @test_throws ArgumentError ODEVerbosity(unknown_field = SciMLLogging.InfoLevel()) end @testset "Multiple group settings" begin v = ODEVerbosity( - error_control = ErrorLevel(), - performance = InfoLevel(), - numerical = Silent() + error_control = SciMLLogging.ErrorLevel(), + performance = SciMLLogging.InfoLevel(), + numerical = SciMLLogging.Silent() ) @test v.dt_NaN isa SciMLLogging.ErrorLevel @test v.alg_switch isa SciMLLogging.InfoLevel @@ -191,13 +204,13 @@ using NonlinearSolve: NonlinearVerbosity @testset "Complex mixed settings" begin v = ODEVerbosity( - error_control = WarnLevel(), - performance = InfoLevel(), - numerical = Silent(), + error_control = SciMLLogging.WarnLevel(), + performance = SciMLLogging.InfoLevel(), + numerical = SciMLLogging.Silent(), linear_verbosity = SciMLLogging.Detailed(), nonlinear_verbosity = SciMLLogging.Minimal(), - dt_NaN = ErrorLevel(), # Override specific error_control field - shampine_dt = WarnLevel() # Override specific numerical field + dt_NaN = SciMLLogging.ErrorLevel(), # Override specific error_control field + shampine_dt = SciMLLogging.WarnLevel() # Override specific numerical field ) # Check overrides took precedence @test v.dt_NaN isa SciMLLogging.ErrorLevel @@ -212,7 +225,7 @@ using NonlinearSolve: NonlinearVerbosity end @testset "Stiff Switching Message" begin - verb = ODEVerbosity(performance = ODEPerformanceVerbosity(alg_switch = Verbosity.Info())) + verb = ODEVerbosity(alg_switch = SciMLLogging.InfoLevel()) solve(prob_ode_vanderpol_stiff, AutoTsit5(Rodas5()), verbose = verb) end @@ -345,7 +358,7 @@ using NonlinearSolve: NonlinearVerbosity integrator = init(prob, ImplicitDeuflhardExtrapolation(), verbose = verbose, dt = 1e-3) for ls in integrator.cache.linsolve - @test ls.cacheval.verbose isa SciMLLogging.None + @test ls.verbose == LinearVerbosity(SciMLLogging.None()) end end From 79fbefb158fe2734b51e46d57fed4509b3c44d75 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Mon, 17 Nov 2025 10:43:54 -0500 Subject: [PATCH 69/74] add verbosity JET tests, make sure verbosity tests are in runtests --- test/interface/verbosity_jet.jl | 99 +++++++++++++++++++++++++++++++++ test/runtests.jl | 2 + 2 files changed, 101 insertions(+) create mode 100644 test/interface/verbosity_jet.jl diff --git a/test/interface/verbosity_jet.jl b/test/interface/verbosity_jet.jl new file mode 100644 index 0000000000..4e1885cd4f --- /dev/null +++ b/test/interface/verbosity_jet.jl @@ -0,0 +1,99 @@ +using OrdinaryDiffEq +using OrdinaryDiffEqCore +using OrdinaryDiffEqCore: ODEVerbosity +import OrdinaryDiffEqCore.SciMLLogging as SciMLLogging +using JET +using Test + +@testset "JET Test ODEVerbosity Constructors" begin + @testset "Default constructor" begin + @test_opt ODEVerbosity() + end + + @testset "Preset constructors" begin + @test_opt ODEVerbosity(SciMLLogging.None()) + @test_opt ODEVerbosity(SciMLLogging.Minimal()) + @test_opt ODEVerbosity(SciMLLogging.Standard()) + @test_opt ODEVerbosity(SciMLLogging.Detailed()) + @test_opt ODEVerbosity(SciMLLogging.All()) + end + + @testset "Group-level keyword constructors" begin + @test_opt ODEVerbosity(error_control = SciMLLogging.ErrorLevel()) + @test_opt ODEVerbosity(numerical = SciMLLogging.Silent()) + @test_opt ODEVerbosity(performance = SciMLLogging.InfoLevel()) + @test_opt ODEVerbosity(error_control = SciMLLogging.WarnLevel()) + @test_opt ODEVerbosity(numerical = SciMLLogging.WarnLevel()) + @test_opt ODEVerbosity(performance = SciMLLogging.Silent()) + end + + @testset "Individual keyword arguments" begin + @test_opt ODEVerbosity(dt_NaN = SciMLLogging.ErrorLevel()) + @test_opt ODEVerbosity(alg_switch = SciMLLogging.InfoLevel()) + @test_opt ODEVerbosity(shampine_dt = SciMLLogging.Silent()) + @test_opt ODEVerbosity(init_NaN = SciMLLogging.WarnLevel()) + end + + @testset "Linear and nonlinear verbosity" begin + @test_opt ODEVerbosity(linear_verbosity = SciMLLogging.Detailed()) + @test_opt ODEVerbosity(nonlinear_verbosity = SciMLLogging.Minimal()) + @test_opt ODEVerbosity(linear_verbosity = SciMLLogging.None()) + @test_opt ODEVerbosity(nonlinear_verbosity = SciMLLogging.All()) + @test_opt ODEVerbosity( + linear_verbosity = SciMLLogging.Detailed(), + nonlinear_verbosity = SciMLLogging.Minimal() + ) + @test_opt ODEVerbosity( + linear_verbosity = SciMLLogging.None(), + nonlinear_verbosity = SciMLLogging.All() + ) + end + + @testset "Mixed group and individual settings" begin + @test_opt ODEVerbosity( + numerical = SciMLLogging.Silent(), + shampine_dt = SciMLLogging.WarnLevel() + ) + @test_opt ODEVerbosity( + numerical = SciMLLogging.Silent(), + shampine_dt = SciMLLogging.WarnLevel(), + performance = SciMLLogging.InfoLevel() + ) + @test_opt ODEVerbosity( + error_control = SciMLLogging.WarnLevel(), + dt_NaN = SciMLLogging.ErrorLevel() + ) + end + + @testset "Multiple group settings" begin + @test_opt ODEVerbosity( + error_control = SciMLLogging.ErrorLevel(), + performance = SciMLLogging.InfoLevel(), + numerical = SciMLLogging.Silent() + ) + @test_opt ODEVerbosity( + error_control = SciMLLogging.WarnLevel(), + performance = SciMLLogging.Silent(), + numerical = SciMLLogging.WarnLevel() + ) + end + + @testset "Complex mixed settings" begin + @test_opt ODEVerbosity( + error_control = SciMLLogging.WarnLevel(), + performance = SciMLLogging.InfoLevel(), + numerical = SciMLLogging.Silent(), + linear_verbosity = SciMLLogging.Detailed(), + nonlinear_verbosity = SciMLLogging.Minimal(), + dt_NaN = SciMLLogging.ErrorLevel(), + shampine_dt = SciMLLogging.WarnLevel() + ) + @test_opt ODEVerbosity( + error_control = SciMLLogging.ErrorLevel(), + performance = SciMLLogging.Silent(), + numerical = SciMLLogging.WarnLevel(), + linear_verbosity = SciMLLogging.All(), + nonlinear_verbosity = SciMLLogging.None() + ) + end +end \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index 09c0af2144..934a938494 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -91,6 +91,8 @@ end @time @safetestset "No Jac Tests" include("interface/nojac.jl") @time @safetestset "Units Tests" include("interface/units_tests.jl") @time @safetestset "Non-Full Diagonal Sparsity Tests" include("interface/nonfulldiagonal_sparse.jl") + @time @safetestset "ODEVerbosity Tests" include("interface/verbosity.jl") + @time @safetestset "ODEVerbosity JET Tests" include("interface/verbosity_jet.jl") end if !is_APPVEYOR && (GROUP == "All" || GROUP == "InterfaceIV" || GROUP == "Interface") From 41b398adeecf5c31529f32623ba85c2a887b6357 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Mon, 17 Nov 2025 11:47:05 -0500 Subject: [PATCH 70/74] fix unlimited_dt factor message to give all information --- lib/OrdinaryDiffEqCore/src/integrators/controllers.jl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl b/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl index 1348fc2bdd..1b5c191d4d 100644 --- a/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl +++ b/lib/OrdinaryDiffEqCore/src/integrators/controllers.jl @@ -297,9 +297,15 @@ end k = min(alg_order(alg), alg_adaptive_order(alg)) + 1 dt_factor = err1^(beta1 / k) * err2^(beta2 / k) * err3^(beta3 / k) if isnan(dt_factor) - @SciMLMessage("unlimited dt_factor", + @SciMLMessage(lazy"unlimited dt_factor: + err1 = $err1 + err2 = $err2, + err3 = $err3, + beta1 = $beta1, + beta2 = $beta2, + beta3 = $beta3, + k = $k", integrator.opts.verbose, :unlimited_dt) - #@warn "unlimited dt_factor" dt_factor err1 err2 err3 beta1 beta2 beta3 k end dt_factor = controller.limiter(dt_factor) From aa255a98750588a0cc9351470211bc0eeff02066 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Mon, 17 Nov 2025 16:56:05 -0500 Subject: [PATCH 71/74] make sure JET is a test dep with correct versioning --- Project.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index f3d9b8931d..3f8d0a355a 100644 --- a/Project.toml +++ b/Project.toml @@ -124,6 +124,7 @@ FiniteDiff = "2.27" ForwardDiff = "0.10.38, 1" FunctionWrappersWrappers = "0.1.3" InteractiveUtils = "1.9" +JET = "0.9.18, 0.10.4, 0.11.0" JLArrays = "0.2" LineSearches = "7.4" LinearAlgebra = "1.9" @@ -189,6 +190,7 @@ DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" ElasticArrays = "fdbdab4c-e67f-52f5-8c3f-e7b388dad3d4" ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895" +JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb" ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" @@ -206,4 +208,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [targets] -test = ["ComponentArrays", "AlgebraicMultigrid", "IncompleteLU", "DiffEqCallbacks", "DifferentiationInterface", "DiffEqDevTools", "ExplicitImports", "ODEProblemLibrary", "ElasticArrays", "JLArrays", "Random", "SafeTestsets", "StructArrays", "Test", "Unitful", "Pkg", "NLsolve", "RecursiveFactorization", "SparseConnectivityTracer", "SparseMatrixColorings", "Statistics"] +test = ["ComponentArrays", "AlgebraicMultigrid", "IncompleteLU", "DiffEqCallbacks", "DifferentiationInterface", "DiffEqDevTools", "ExplicitImports", "ODEProblemLibrary", "ElasticArrays", "JET", "JLArrays", "Random", "SafeTestsets", "StructArrays", "Test", "Unitful", "Pkg", "NLsolve", "RecursiveFactorization", "SparseConnectivityTracer", "SparseMatrixColorings", "Statistics"] From 401b9832ddf6d59ee327612f8582a0eb632aaec7 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Mon, 17 Nov 2025 17:14:12 -0500 Subject: [PATCH 72/74] use sources for modelingtoolkit tests --- test/modelingtoolkit/Project.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/modelingtoolkit/Project.toml b/test/modelingtoolkit/Project.toml index 857bbcab3f..4dab287f1e 100644 --- a/test/modelingtoolkit/Project.toml +++ b/test/modelingtoolkit/Project.toml @@ -14,4 +14,9 @@ ModelingToolkit = "10.10" NonlinearSolve = "4.10" OrdinaryDiffEqBDF = "1" OrdinaryDiffEqNonlinearSolve = "1" -OrdinaryDiffEqSDIRK = "1" \ No newline at end of file +OrdinaryDiffEqSDIRK = "1" + +[sources] +OrdinaryDiffEqBDF = {path = "lib/OrdinaryDiffEqBDF"} +OrdinaryDiffEqNonlinearSolve = {path = "lib/OrdinaryDiffEqNonlinearSolve"} +OrdinaryDiffEqSDIRK = {path = "lib/OrdinaryDiffEqSDIRK"} \ No newline at end of file From 720252dea4ef6a9b29771f56ae60ed13ad765fd5 Mon Sep 17 00:00:00 2001 From: jClugstor Date: Mon, 17 Nov 2025 18:10:01 -0500 Subject: [PATCH 73/74] use correct lib sources --- test/modelingtoolkit/Project.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/modelingtoolkit/Project.toml b/test/modelingtoolkit/Project.toml index 4dab287f1e..1f49a2df63 100644 --- a/test/modelingtoolkit/Project.toml +++ b/test/modelingtoolkit/Project.toml @@ -17,6 +17,6 @@ OrdinaryDiffEqNonlinearSolve = "1" OrdinaryDiffEqSDIRK = "1" [sources] -OrdinaryDiffEqBDF = {path = "lib/OrdinaryDiffEqBDF"} -OrdinaryDiffEqNonlinearSolve = {path = "lib/OrdinaryDiffEqNonlinearSolve"} -OrdinaryDiffEqSDIRK = {path = "lib/OrdinaryDiffEqSDIRK"} \ No newline at end of file +OrdinaryDiffEqBDF = {path = "../../lib/OrdinaryDiffEqBDF"} +OrdinaryDiffEqNonlinearSolve = {path = "../../lib/OrdinaryDiffEqNonlinearSolve"} +OrdinaryDiffEqSDIRK = {path = "../../lib/OrdinaryDiffEqSDIRK"} \ No newline at end of file From 0de763ab069fb7eac7bda7cf82048a710ddea23f Mon Sep 17 00:00:00 2001 From: jClugstor Date: Mon, 17 Nov 2025 18:59:35 -0500 Subject: [PATCH 74/74] remove method ambiguity for GC4 --- lib/OrdinaryDiffEqLinear/src/linear_caches.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OrdinaryDiffEqLinear/src/linear_caches.jl b/lib/OrdinaryDiffEqLinear/src/linear_caches.jl index 4dabf82be8..34db88766d 100644 --- a/lib/OrdinaryDiffEqLinear/src/linear_caches.jl +++ b/lib/OrdinaryDiffEqLinear/src/linear_caches.jl @@ -185,7 +185,7 @@ end struct CG4aConstantCache <: OrdinaryDiffEqConstantCache end -function alg_cache(alg::CG4a, u, rate_prototype, uEltypeNoUnits, +function alg_cache(alg::CG4a, u, rate_prototype, uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits, uprev, uprev2, f, t, dt, reltol, p, calck, ::Val{false}, verbose) CG4aConstantCache() end