-
Notifications
You must be signed in to change notification settings - Fork 63
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
rebx_calculate_energy #37
Comments
Thanks. I removed this in the new version, and have removed it from master for consistency for now. That function was a placeholder for a function meant to automatically calculate the energy based on what effects you've added, but I think requires too much logic and overhead when adding new effects for it to be worth it. At the same time it's probably a useful function. Would love some feedback. It would need a parallel list of unique effects, forces and operators should have a calculate energy function pointer field. There's also a distinction not only between conservative and dissipative effects, but also between conservative position and velocity dependent ones, because the former just have additive contributions to the potential, but the velocity dependent ones also change the kinetic terms. I guess one could rewrite the velocity dependent energy routines to subtract off the classical energy to just give the updates at the cost of large roundoff errors, or rewrite the routines to only calculate the update (not totally trivial). |
I agree. I think keeping some of the functions that calculate the energy around for some of the simpler effects such as gr potential would be helpful so that one doesn't need to reimplement them every time. But without any logic. |
I agree, thanks! |
There is a convenience function defined on the python side which is msising from c:
rebx.calculate_energy()
The text was updated successfully, but these errors were encountered: