Skip to content
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

energies: adding energy loss functions #734

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

drsk0
Copy link

@drsk0 drsk0 commented Sep 12, 2023

This commit adds energy loss functions. These are loss functions analogous to those obtained from PDE equations or boundary equations, but the energy integrand can be given explicitly in symbolic form.

The energies are maintained in a separate field from the PDE equations so that they can be weighted differently in adaptive loss functions.

I am happy to extend the docs once the general direction of this PR is approved.

This PR depends on SciML/ModelingToolkit.jl#2256.

@ChrisRackauckas
Copy link
Member

The energies are maintained in a separate field from the PDE equations so that they can be weighted differently in adaptive loss functions.

But the adaptive loss has a vector that it's adapting, so is this really any different than including the energy functions as part of the BCs?

@drsk0
Copy link
Author

drsk0 commented Sep 12, 2023

You could also have the energies as part of the BC's or PDE equations. I thought there might be a benefit to keeping them separate to be able to treat them differently if needed.

@ChrisRackauckas
Copy link
Member

Can you show an example which demonstrates a benefit?

@drsk0
Copy link
Author

drsk0 commented Sep 12, 2023

A trivial example that comes to mind is that I'd like to have them logged separately from the BC's. I consider the energy in a PDE problem a fairly different concept than the boundary conditions.

The other solution would be to allow for energies in BCs and equations. I could imagine a bit more subtle bugs when you accidentally create an energy instead of an equation in this case.

This commit adds additional symbolic loss functions. These are loss
functions analogous to those obtained from PDE equations or boundary
equations, but the integrand can be given explicitly in symbolic form.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants