-
-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2487 from oscardssmith/os/fix-FBDF-reinit
fix initialize! of FBDF
- Loading branch information
Showing
6 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,20 @@ | ||
using OrdinaryDiffEqBDF, Test | ||
|
||
foop = (u,p,t)->u | ||
proboop = ODEProblem(foop, ones(2), (0.0, 1000.0)) | ||
|
||
fiip = (du,u,p,t)->du.=u | ||
probiip = ODEProblem(fiip, ones(2), (0.0, 1000.0)) | ||
|
||
@testset "FBDF reinit" begin | ||
for prob in [proboop, probiip] | ||
integ = init(prob, FBDF(), verbose=false) #suppress warning to clean up CI | ||
solve!(integ) | ||
@test integ.sol.retcode != ReturnCode.Success | ||
@test integ.sol.t[end] >= 700 | ||
reinit!(integ, prob.u0) | ||
solve!(integ) | ||
@test integ.sol.retcode != ReturnCode.Success | ||
@test integ.sol.t[end] >= 700 | ||
end | ||
end |
This file contains 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 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