From 2cd90c62d0c212600e8b8c47f235946b18a31fb5 Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Fri, 8 Nov 2024 21:56:41 +0530 Subject: [PATCH 1/2] fix: fix some SciMLFunction constructors --- src/scimlfunctions.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scimlfunctions.jl b/src/scimlfunctions.jl index 460d80826..a7f087bb0 100644 --- a/src/scimlfunctions.jl +++ b/src/scimlfunctions.jl @@ -2853,7 +2853,7 @@ function DynamicalODEFunction{iip, specialize}(f1, f2; colorvec = __has_colorvec(f1) ? f1.colorvec : nothing, sys = __has_sys(f1) ? f1.sys : nothing, - initialization_data = __has_initialization_data(f) ? f.initialization_data : + initialization_data = __has_initialization_data(f1) ? f1.initialization_data : nothing) where { iip, specialize @@ -3195,7 +3195,7 @@ function SplitSDEFunction{iip, specialize}(f1, f2, g; colorvec = __has_colorvec(f1) ? f1.colorvec : nothing, sys = __has_sys(f1) ? f1.sys : nothing, - initialization_data = __has_initialization_data(f) ? f.initialization_data : + initialization_data = __has_initialization_data(f1) ? f1.initialization_data : nothing) where { iip, specialize @@ -3282,7 +3282,7 @@ function DynamicalSDEFunction{iip, specialize}(f1, f2, g; colorvec = __has_colorvec(f1) ? f1.colorvec : nothing, sys = __has_sys(f1) ? f1.sys : nothing, - initialization_data = __has_initialization_data(f) ? f.initialization_data : + initialization_data = __has_initialization_data(f1) ? f1.initialization_data : nothing ) where { iip, From b821d1e441c7234c5e3bb0c759e19e3b8c6e1c18 Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Fri, 8 Nov 2024 21:57:41 +0530 Subject: [PATCH 2/2] refactor: format --- test/downstream/problem_interface.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/downstream/problem_interface.jl b/test/downstream/problem_interface.jl index b179551dc..27143e2f1 100644 --- a/test/downstream/problem_interface.jl +++ b/test/downstream/problem_interface.jl @@ -286,7 +286,8 @@ prob = SteadyStateProblem(osys, u0, ps) @test prob[X2] == prob[osys.X2] == prob[:X2] == 0.2 @test prob[[X, X2]] == prob[[osys.X, osys.X2]] == prob[[:X, :X2]] == [0.1, 0.2] @test getsym(prob, X)(prob) == getsym(prob, osys.X)(prob) == getsym(prob, :X)(prob) == 0.1 -@test getsym(prob, X2)(prob) == getsym(prob, osys.X2)(prob) == getsym(prob, :X2)(prob) == 0.2 +@test getsym(prob, X2)(prob) == getsym(prob, osys.X2)(prob) == getsym(prob, :X2)(prob) == + 0.2 @test getsym(prob, [X, X2])(prob) == getsym(prob, [osys.X, osys.X2])(prob) == getsym(prob, [:X, :X2])(prob) == [0.1, 0.2] @test getsym(prob, (X, X2))(prob) == getsym(prob, (osys.X, osys.X2))(prob) ==