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

Fix potential energy calculation bug in MultiLayerQG.energies #294

Merged
merged 7 commits into from
Jul 7, 2022

Conversation

apaloczy
Copy link
Collaborator

@apaloczy apaloczy commented Jul 6, 2022

This fixes #292 by adding a missing 1/sum(params.H) factor to the potential energies in MultiLayerQG.energies.

@navidcy
Copy link
Member

navidcy commented Jul 7, 2022

This is great! I was thinking to add/modify a test to catch this. The tests at the moment have H=1 and thus were passing anyway?

@apaloczy
Copy link
Collaborator Author

apaloczy commented Jul 7, 2022

This is great! I was thinking to add/modify a test to catch this. The tests at the moment have H=1 and thus were passing anyway?

Right, I think that's what was happening. How's this? I tried writing a test with H = 10 to see if it works.

@navidcy
Copy link
Member

navidcy commented Jul 7, 2022

@apaloczy bump a patch release in Project.toml to v0.14.1

@navidcy
Copy link
Member

navidcy commented Jul 7, 2022

Also perhaps I can combine the energy tests.ls it OK if I push in the pr?

@navidcy navidcy changed the title Fix PE calculation bug in MultiLayerQG.energies Fix potential energy calculation bug in MultiLayerQG.energies Jul 7, 2022
@navidcy
Copy link
Member

navidcy commented Jul 7, 2022

I did it. Deleted the old test and just kept yours.

@navidcy navidcy added the 🐞 bug Something isn't working label Jul 7, 2022
@navidcy navidcy merged commit 00b8ab3 into FourierFlows:main Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential missing factor in MultiLayerQG.energies
2 participants