Skip to content

Commit

Permalink
Merge pull request #855 from AayushSabharwal/as/scimlfn-fix
Browse files Browse the repository at this point in the history
fix: fix some SciMLFunction constructors
  • Loading branch information
ChrisRackauckas authored Nov 8, 2024
2 parents d366481 + b821d1e commit 11dc895
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/scimlfunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion test/downstream/problem_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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) ==
Expand Down

0 comments on commit 11dc895

Please sign in to comment.