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

added version of bridge that includes velocities of individual stars … #556

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

webbjj
Copy link

@webbjj webbjj commented Dec 18, 2019

Note that the changes to bridge itself are minor. It just needs a use_velocities flag and self.vx,self.vy,self.vz need to be passed in get_gravity_at_point. I don't think they are needed in other functions. So it may not be necessary to have a separate file, and bridgev could be folded into bridge.

@rieder
Copy link
Member

rieder commented Dec 19, 2019

I would definitely fold it into bridge.py, and make it optional to pass the velocities. It would also make the changes easier to spot for us :).

I think the use_velocities flag should be passed when adding a "kicker" system, individually for each of these. Not all system may support get_gravity_at_point with velocities.

@ipelupessy
Copy link
Member

great! I would also put the changes in new (derived) classes in this case (and a more descriptive name than bridgev) in bridge.py. Can you also add an example of its use and some tests wouldalso be nice?

also next time: i suggest you make a feature branch in your fork and a PR against this (this makes it easier for yourself to work on multiple things at the same time;-)...)

@webbjj
Copy link
Author

webbjj commented Jan 4, 2020

I would definitely fold it into bridge.py, and make it optional to pass the velocities. It would also make the changes easier to spot for us :).

I think the use_velocities flag should be passed when adding a "kicker" system, individually for each of these. Not all system may support get_gravity_at_point with velocities.

Where is the check to see if the system is a "kicker" or not? Its not entirely clear to me where this is in bridge.

@webbjj
Copy link
Author

webbjj commented Jan 4, 2020

great! I would also put the changes in new (derived) classes in this case (and a more descriptive name than bridgev) in bridge.py. Can you also add an example of its use and some tests wouldalso be nice?

also next time: i suggest you make a feature branch in your fork and a PR against this (this makes it easier for yourself to work on multiple things at the same time;-)...)

Thanks for the suggestion. I am still a bit of a git rookie.

I was also hoping you can elaborate on your initial suggestion to put the changes in new (derived) classes. Are you saying make a class Bridgev (with better name) as opposed to adding the use_velocities option to class Bridge? Similarly, add a class GravityCodeInFieldv instead of adding to GravityCodeInField?

@ipelupessy
Copy link
Member

ok, I checked more carefully now: you should indeed make a new:

class BridgeWithVelocityDependendForces(Bridge):
..etc

(or some other descriptive name)..the option use_velocity still has to be present because as it is now you can enable these on a per system basis.

eventually this could be folded back in the Bridge, but I think it is nice to have a new class for now since that makes it clearer what the differences are.

already mentioned this, but tests and a way to validate would also be nice;-)

Make VelocityDependentBridge class to differentiate with regular Bridge
Under-the-hood changes look like they can just be merged.
@rieder
Copy link
Member

rieder commented Jan 27, 2020

I made some changes in a PR to this branch, creating a separate VelocityDependentBridge class (which mostly just inherits from Bridge) and merging the other changes into bridge.py.

Merge velocity dependent bridge into bridge.py
@rieder
Copy link
Member

rieder commented Jan 29, 2020

I'm not sure if I like the re-defining of "get_gravity_at_point" with velocities.

Perhaps we should have a new function "get_force_at_point" for this purpose - after all, the velocity dependent forces are different from gravity...

@ipelupessy
Copy link
Member

one thing I don't fully like: the method to get the acceleration in the velocity kick case is still called get_gravity; maybe it should be renamed to get_acceleration?

@ipelupessy
Copy link
Member

ok, I see you had the same concern ;-)

@rieder rieder self-requested a review June 2, 2020 08:26
@rieder rieder self-assigned this Jun 2, 2020
@rieder
Copy link
Member

rieder commented Apr 12, 2021

@ipelupessy should we perhaps just move to get_acceleration_at_point altogether, leaving get_gravity_at_point as an alias for this in case it is different?

@rieder
Copy link
Member

rieder commented Dec 3, 2021

Reminder to self that this is close to being mergeable. Just needs a name change for some functions.

@stale
Copy link

stale bot commented Mar 4, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 4, 2022
@ipelupessy
Copy link
Member

keep open for now

@stale
Copy link

stale bot commented May 4, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issues that have been around for a while without updates label May 4, 2022
@ipelupessy
Copy link
Member

keep

@stale stale bot removed the stale Issues that have been around for a while without updates label May 5, 2022
@rieder rieder removed the wontfix label May 12, 2022
@webbjj webbjj requested a review from a team as a code owner February 22, 2024 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants