-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add BVPFunction #370
Merged
Merged
Add BVPFunction #370
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ac60b89
Add BVPFunction
ErikQQY 7a24ffd
Merge branch 'master' into master
ErikQQY 7cf85c4
Add bcjac and bcjac_prototype
ErikQQY 8046eb9
Cover more tests
ErikQQY a734ff8
Complete BVPFunction
ErikQQY c6fa298
Add new dispatch to problem construction
ErikQQY 681b9e1
Add new dispatch for SDEProblem
ErikQQY 61b726d
Done
ErikQQY 98afac4
Remove convenient constructor for BVProblem
ErikQQY 30fb3c2
BVP only
ErikQQY 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 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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
BVPFunction
storesbc
should be duplicate the storage inBVProblem
again?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, indeed, the problem construction process in
BVProblem
is similar withSDEProblem
, they both have duplicatebc
inBVProblem
andg
inSDEProblem
, but if we want to have aBVPFunction
stores bothf
andbc
, duplicatingbc
could really making the problem constructor concise. We need to note that when we are unpackingBVProblem
, we actually get aBVPFunction
but notf
.SciMLBase.jl/src/problems/sde_problems.jl
Lines 130 to 132 in 4d926fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case it's fair to stay consistent.
Maybe we can add an additional dispatch on BVPFunction where we automatically pull out the
bc
during problem construction that way user wont have to doBVProblem(BVPFunction(f, bc), bc...)
and instead can specifyBVProblem(BVPFunction(f, bc)....)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you mean a dispatch on
BVProblem
right? Just updated and now we can directly specifyBVProblem(BVPFunction(f, bc).....)
to construct aBVProblem
.Do we need to do the same for
SDEProblem
andSDEFunction
? The problem construct ofSDEProblem
also need users to do somthing likeSDEProblem(SDEFunction(f, g), g)
, see here: https://docs.sciml.ai/DiffEqDocs/stable/tutorials/sde_example/#Using-Higher-Order-MethodsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ChrisRackauckas do you think this is a valid API choice? Is there a particular reason other Problem Types don't have this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you handle downstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I am working on fixing downstream errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a little lost here, there are three ways of constructing a
BVProblem
:(1). Directly construction from scratch
(2). Use
BVPFunction
(3). Another way of using
BVPFunction
As for
SDEProblem
, the definitions are similar, so my question is that it looks the (2) and (3) dispatches can't exist at the same time, so I think we are deprecating (3) and using (2) instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like deprecating (3) and using (2) in
SDEProblem
andSDEFunction
is way more complicated thanBVProblem
andBVPFunction
.SplitSDEProblem
,DynamicalSDEProblem
and maybe some functions in ModelingToolkit.jl and JumpProcess.jl etc. are all relying on (3) in problem constructor, the new change in this PR would cause a lot of errors and break a lot of APIs.