-
-
Notifications
You must be signed in to change notification settings - Fork 217
energies: adding energies to PDESystems #2256
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 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,6 +196,7 @@ function complete(sys::AbstractSystem) | |
end | ||
|
||
for prop in [:eqs | ||
:energies | ||
:tag | ||
:noiseeqs | ||
:iv | ||
|
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
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.
Please include a default value, and make it an optional argument so as to not break all other pdesystems written to date
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.
Hi @xtalax, I tested that this won't break a pdesystem without energies. But I think a default value would be a good idea for all of the fields
eqs
,energies
andbcs
. Would you agree to add a default value (empty vector) to these three fields?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.
A PDE without eqs is undefined so I'm ok with this erroring. Default for bcs and energies is sensible though. Please remember to add test cases for this and also the energy free case in
test/pde.jl
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.
Imho a PDE without
eqs
is actually well-defined as well. It just means that there are no relations in the jet bundle. For example, you could just solve for a given boundary condition and low energy or even just for low energy solutions or solutions only satisfying the boundary conditions. If all three ofeqs
,bcs
andenergies
are empty, the semantics should be that any function defined on the domain is returned - the neural network with randomly initialized weights.I'll add defaults for
bcs
andenergies
and tests for now. Please note that this PR only makes sense if SciML/NeuralPDE.jl#734 is accepted as well.