diff --git a/lib/OrdinaryDiffEqBDF/test/dae_initialization_tests.jl b/lib/OrdinaryDiffEqBDF/test/dae_initialization_tests.jl index 6266004afc..246faa91ce 100644 --- a/lib/OrdinaryDiffEqBDF/test/dae_initialization_tests.jl +++ b/lib/OrdinaryDiffEqBDF/test/dae_initialization_tests.jl @@ -1,4 +1,5 @@ using OrdinaryDiffEqBDF, StaticArrays, LinearAlgebra, Test +using OrdinaryDiffEqNonlinearSolve f = function (du, u, p, t) out1 = -0.04u[1] + 1e4 * u[2] * u[3] - du[1] @@ -34,7 +35,7 @@ u₀ = [1.0, 0, 0.2] prob = DAEProblem(f, du₀, u₀, tspan, differential_vars = differential_vars) integrator = init(prob, DABDF2()) @test integrator.u≈[1.0, 0, 0.0] atol=1e-9 -integrator = init(prob, DABDF2(), initializealg = ShampineCollocationInit()) +integrator = init(prob, DABDF2(), initializealg = OrdinaryDiffEqNonlinearSolve.ShampineCollocationInit()) @test !(integrator.u ≈ [1.0, 0, 0.0]) u₀ = [1.0, 0, 0.2] @@ -80,7 +81,7 @@ u₀ = [1.0, 0, 0.2] prob = DAEProblem(f, du₀, u₀, tspan, differential_vars = differential_vars) integrator = init(prob, DABDF2()) @test integrator.u≈[1.0, 0, 0.0] atol=1e-9 -integrator = init(prob, DABDF2(), initializealg = ShampineCollocationInit()) +integrator = init(prob, DABDF2(), initializealg = OrdinaryDiffEqNonlinearSolve.ShampineCollocationInit()) @test !(integrator.u ≈ [1.0, 0, 0.0]) u₀ = [1.0, 0, 0.2] @@ -104,7 +105,7 @@ du₀ = [0.0, 0.0, 0.0] tspan = (0.0, 1.0) differential_vars = [true, true, false] prob = DAEProblem(f, du₀, u₀, tspan, differential_vars = differential_vars) -integrator = init(prob, DABDF2(); initializealg = ShampineCollocationInit()) +integrator = init(prob, DABDF2(); initializealg = OrdinaryDiffEqNonlinearSolve.ShampineCollocationInit()) @test integrator.du[1]≈0.0 atol=1e-9 @test_broken integrator.du[2]≈-1.0 atol=1e-9 @@ -115,7 +116,7 @@ end # test iip dae initialization with parameters without eltype/length probp = DAEProblem(f, du₀, u₀, tspan, UnusedParam(), differential_vars = differential_vars) -for initializealg in (ShampineCollocationInit(), BrownFullBasicInit()) +for initializealg in (OrdinaryDiffEqNonlinearSolve.ShampineCollocationInit(), OrdinaryDiffEqNonlinearSolve.BrownFullBasicInit()) @test isapprox( init(probp, DABDF2(); initializealg).u, init(prob, DABDF2(); initializealg).u) end @@ -148,7 +149,7 @@ integrator = init(prob, DABDF2()) @test integrator.du[2]≈1.0 atol=1e-9 # test oop DAE initialization with parameters without eltype/length probp = DAEProblem(f, du₀, u₀, tspan, UnusedParam(), differential_vars = differential_vars) -for initializealg in (ShampineCollocationInit(), BrownFullBasicInit()) +for initializealg in (OrdinaryDiffEqNonlinearSolve.ShampineCollocationInit(), OrdinaryDiffEqNonlinearSolve.BrownFullBasicInit()) @test isapprox( init(probp, DABDF2(); initializealg).u, init(prob, DABDF2(); initializealg).u) end diff --git a/lib/OrdinaryDiffEqSymplecticRK/Project.toml b/lib/OrdinaryDiffEqSymplecticRK/Project.toml index 8eb0937e57..25f6621ec5 100644 --- a/lib/OrdinaryDiffEqSymplecticRK/Project.toml +++ b/lib/OrdinaryDiffEqSymplecticRK/Project.toml @@ -20,9 +20,10 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" +OrdinaryDiffEqRKN = "af6ede74-add8-4cfd-b1df-9a4dbb109d7a" [compat] julia = "1.10" [targets] -test = ["DiffEqDevTools", "Random", "SafeTestsets", "Test", "Statistics", "LinearAlgebra", "OrdinaryDiffEqTsit5"] +test = ["DiffEqDevTools", "Random", "SafeTestsets", "Test", "Statistics", "LinearAlgebra", "OrdinaryDiffEqTsit5", "OrdinaryDiffEqRKN"] diff --git a/lib/OrdinaryDiffEqSymplecticRK/test/symplectic_tests.jl b/lib/OrdinaryDiffEqSymplecticRK/test/symplectic_tests.jl index 2688c9b798..e1771678b2 100644 --- a/lib/OrdinaryDiffEqSymplecticRK/test/symplectic_tests.jl +++ b/lib/OrdinaryDiffEqSymplecticRK/test/symplectic_tests.jl @@ -1,6 +1,7 @@ using Test, LinearAlgebra using OrdinaryDiffEqSymplecticRK, DiffEqBase +using OrdinaryDiffEqRKN # algorithm, dq(p) != p, convergence order const ALGOS = ((SymplecticEuler, true, 1), diff --git a/src/OrdinaryDiffEq.jl b/src/OrdinaryDiffEq.jl index a5b4d5b40d..1246a1c066 100644 --- a/src/OrdinaryDiffEq.jl +++ b/src/OrdinaryDiffEq.jl @@ -6,17 +6,19 @@ module OrdinaryDiffEq using Reexport @reexport using DiffEqBase -import OrdinaryDiffEqCore: trivial_limiter!, CompositeAlgorithm, alg_order, ShampineCollocationInit, BrownFullBasicInit, +import OrdinaryDiffEqCore: trivial_limiter!, CompositeAlgorithm, alg_order, ShampineCollocationInit, BrownFullBasicInit, NoInit, set_new_W!, set_W_γdt!, get_W, isfirstcall, isfirststage, isJcurrent, get_new_W_γdt_cutoff, DIRK, COEFFICIENT_MULTISTEP, NORDSIECK_MULTISTEP, GLM, MethodType, Divergence, VerySlowConvergence, SlowConvergence, Convergence, FastConvergence, NLStatus, TryAgain, AbstractNLSolverCache, - AbstractNLSolverAlgorithm, AbstractNLSolver + AbstractNLSolverAlgorithm, AbstractNLSolver, handle_discontinuities!, copyat_or_push!, + du_cache, full_cache, isfsal, ode_interpolant, u_cache, AutoSwitch -export CompositeAlgorithm, ShampineCollocationInit, BrownFullBasicInit, +export CompositeAlgorithm, ShampineCollocationInit, BrownFullBasicInit, NoInit set_new_W!, set_W_γdt!, get_W, isfirstcall, isfirststage, isJcurrent, get_new_W_γdt_cutoff, DIRK, COEFFICIENT_MULTISTEP, NORDSIECK_MULTISTEP, GLM, MethodType, Divergence, VerySlowConvergence, SlowConvergence, Convergence, FastConvergence, NLStatus, TryAgain, AbstractNLSolverCache, - AbstractNLSolverAlgorithm, AbstractNLSolver + AbstractNLSolverAlgorithm, AbstractNLSolver, handle_discontinuities!, copyat_or_push!, + du_cache, full_cache, isfsal, ode_interpolant, u_cache, AutoSwitch import OrdinaryDiffEqDifferentiation using OrdinaryDiffEqDifferentiation: _alg_autodiff, resize_grad_config!, dolinsolve, wrapprecs, UJacobianWrapper, build_jac_config, WOperator, FirstAutodiffJacError, calc_J!, calc_W!, calc_J, calc_W, jacobian2W! @@ -288,14 +290,9 @@ export constructDormandPrince export CompositeAlgorithm -export SHLDDRK52, SHLDDRK_2N - export AutoSwitch, AutoTsit5, AutoDP5, AutoVern6, AutoVern7, AutoVern8, AutoVern9 -export ShampineCollocationInit, BrownFullBasicInit, NoInit - -export NLNewton, NLAnderson, NLFunctional, NonlinearSolveAlg - +import OrdinaryDiffEqCore: IController, PIController, PIDController export IController, PIController, PIDController end # module