Skip to content

Commit

Permalink
remaining exports
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Aug 7, 2024
1 parent 79200de commit cc00a52
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
11 changes: 6 additions & 5 deletions lib/OrdinaryDiffEqBDF/test/dae_initialization_tests.jl
Original file line number Diff line number Diff line change
@@ -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]
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
3 changes: 2 additions & 1 deletion lib/OrdinaryDiffEqSymplecticRK/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
1 change: 1 addition & 0 deletions lib/OrdinaryDiffEqSymplecticRK/test/symplectic_tests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

using Test, LinearAlgebra
using OrdinaryDiffEqSymplecticRK, DiffEqBase
using OrdinaryDiffEqRKN

# algorithm, dq(p) != p, convergence order
const ALGOS = ((SymplecticEuler, true, 1),
Expand Down
17 changes: 7 additions & 10 deletions src/OrdinaryDiffEq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down Expand Up @@ -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

0 comments on commit cc00a52

Please sign in to comment.