-
-
Notifications
You must be signed in to change notification settings - Fork 110
add PreallocationTools.DiffCache as cache for SplitODEProblem #1097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 5 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
28a8bcf
add PreallocationTools.LazyBufferCache as cache for SplitODEProblem
thomvet 69003bb
test: fix jump affects in MTK remake test
AayushSabharwal 724cc66
Merge branch 'SciML:master' into fix-orddiffeq-2719
thomvet 382ceef
make DiffCache instead of LBC
thomvet e73e4bb
Merge pull request #1099 from AayushSabharwal/as/fix-test
ChrisRackauckas 2e306e3
Force more function specialization
ChrisRackauckas 5ea73ad
Merge pull request #1101 from SciML/functionspecialization
ChrisRackauckas 571f92a
Update Project.toml
ChrisRackauckas b006610
add test
thomvet 1a60ad6
slimmer using
thomvet b0eb83c
Update test/downstream/splitodeproblem_cache.jl
ChrisRackauckas 3ba02de
Apply suggestions from code review
ChrisRackauckas ee65e46
make hasx foldable
oscardssmith a955c01
Merge pull request #1104 from oscardssmith/os/improve-hasx-defs
ChrisRackauckas b209f72
Update Project.toml
ChrisRackauckas 9db8a8c
Apply suggestions from code review
ChrisRackauckas 7ade05e
add PreallocationTools.LazyBufferCache as cache for SplitODEProblem
thomvet fc5bf4b
make DiffCache instead of LBC
thomvet adec855
add test
thomvet 71e8c49
slimmer using
thomvet 13026f8
Update test/downstream/splitodeproblem_cache.jl
ChrisRackauckas 2a71c1a
Apply suggestions from code review
ChrisRackauckas 42e382d
Apply suggestions from code review
ChrisRackauckas 4b12de8
Merge branch 'fix-orddiffeq-2719' of https://github.com/thomvet/SciML…
thomvet e45a494
add PreallocationTools.DiffCache as cache for SplitODEProblem
thomvet 37f9b1e
Merge branch 'fix-orddiffeq-2719' of https://github.com/thomvet/SciML…
thomvet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using OrdinaryDiffEq, Test | ||
|
||
# https://github.com/SciML/OrdinaryDiffEq.jl/issues/2719 | ||
|
||
# set up functions | ||
function f1!(du, u , p, t) | ||
du .= -u.^2 | ||
return nothing | ||
end | ||
|
||
function f2!(du, u , p, t) | ||
du .= 2u | ||
return nothing | ||
end | ||
|
||
function f!(du, u, p, t) | ||
du .= -u.^2 .+ 2u | ||
return nothing | ||
end | ||
|
||
#create problems | ||
u0 = ones(2) | ||
tspan = (0.0, 1.0) | ||
prob = ODEProblem(f!, u0, tspan) | ||
f_split! = SplitFunction(f1!, f2!) | ||
prob_split = SplitODEProblem(f_split!, u0, tspan) | ||
|
||
#solve | ||
sol = solve(prob, Rodas5()) | ||
sol_split = solve(prob_split, Rodas5()) | ||
ChrisRackauckas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
#tests | ||
@test sol_split == sol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.