Skip to content

Commit

Permalink
Merge pull request #3094 from SciML/ChrisRackauckas-patch-6
Browse files Browse the repository at this point in the history
Test master
  • Loading branch information
ChrisRackauckas authored Oct 9, 2024
2 parents 3a110df + 422230b commit 725da10
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ OffsetArrays = "1"
OrderedCollections = "1"
OrdinaryDiffEq = "6.82.0"
PrecompileTools = "1"
REPL = "1"
RecursiveArrayTools = "3.26"
Reexport = "0.2, 1"
RuntimeGeneratedFunctions = "0.5.9"
Expand Down Expand Up @@ -148,6 +149,7 @@ OptimizationMOI = "fd9f6733-72f4-499f-8506-86b2bdd0dea1"
OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
ReferenceTests = "324d217c-45ce-50fc-942e-d289b448e8cf"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
Expand All @@ -160,4 +162,4 @@ Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["AmplNLWriter", "BenchmarkTools", "ControlSystemsBase", "DataInterpolations", "DelayDiffEq", "NonlinearSolve", "ForwardDiff", "Ipopt", "Ipopt_jll", "ModelingToolkitStandardLibrary", "Optimization", "OptimizationOptimJL", "OptimizationMOI", "OrdinaryDiffEq", "Random", "ReferenceTests", "SafeTestsets", "StableRNGs", "Statistics", "SteadyStateDiffEq", "Test", "StochasticDiffEq", "Sundials", "StochasticDelayDiffEq", "Pkg", "JET"]
test = ["AmplNLWriter", "BenchmarkTools", "ControlSystemsBase", "DataInterpolations", "DelayDiffEq", "NonlinearSolve", "ForwardDiff", "Ipopt", "Ipopt_jll", "ModelingToolkitStandardLibrary", "Optimization", "OptimizationOptimJL", "OptimizationMOI", "OrdinaryDiffEq", "REPL", "Random", "ReferenceTests", "SafeTestsets", "StableRNGs", "Statistics", "SteadyStateDiffEq", "Test", "StochasticDiffEq", "Sundials", "StochasticDelayDiffEq", "Pkg", "JET"]
2 changes: 1 addition & 1 deletion test/dde.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ sol = solve(prob, MethodOfSteps(Tsit5()))
obsfn = ModelingToolkit.build_explicit_observed_function(
sys, [sys.osc1.delx, sys.osc2.delx])
@test_nowarn sol[[sys.osc1.delx, sys.osc2.delx]]
@test sol[sys.osc1.delx] sol(sol.t .- 0.01; idxs = sys.osc1.x)
@test sol[sys.osc1.delx] sol(sol.t .- 0.01; idxs = sys.osc1.x).u

@testset "DDE observed with array variables" begin
@component function valve(; name)
Expand Down
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using SafeTestsets, Pkg, Test
# https://github.com/JuliaLang/julia/issues/54664
import REPL

const GROUP = get(ENV, "GROUP", "All")

Expand Down
16 changes: 0 additions & 16 deletions test/structural_transformation/tearing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,6 @@ infprob = ODEProblem(structural_simplify(sys), [x => 1.0], (0, 1.0), [p => 0.2])
infprob.f(du, infprob.u0, pr, tt)
@test any(isnan, du)

sol1 = solve(prob, RosShamp4(), reltol = 8e-7)
sol2 = solve(ODEProblem{false}((u, p, t) -> [-asin(u[1] - pr * t)],
[1.0],
(0, 1.0),
0.2),
Tsit5(), tstops = sol1.t, adaptive = false)
@test Array(sol1[x])Array(sol2[1, :]) atol=1e-5

@test sol1[x] == first.(sol1.u)
@test sol1[y] == first.(sol1.u)
@test sin.(sol1[z]) .+ sol1[y]pr[1] * sol1.t atol=5e-5
@test sol1[sin(z) + y]sin.(sol1[z]) .+ sol1[y] rtol=1e-12

@test sol1[y, :] == sol1[x, :]
@test (@. sin(sol1[z, :]) + sol1[y, :])pr * sol1.t atol=5e-5

# 1426
function Translational_Mass(; name, m = 1.0)
sts = @variables s(t) v(t) a(t)
Expand Down

0 comments on commit 725da10

Please sign in to comment.