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

Mass swapping fixes #17

Merged
merged 11 commits into from
Jul 8, 2024
Merged

Mass swapping fixes #17

merged 11 commits into from
Jul 8, 2024

Conversation

angel-chandro
Copy link
Contributor

@angel-chandro angel-chandro commented Jul 2, 2024

Additional fixes to deal with the mass swapping events:

  1. Properties at infall should have a non-zero values for the satellite subhalos that aren't born as satellit, since the properties at infall are used for those type of subhalos. For satellite subhalos that are born as satellites, the current properties are used.
  2. Introduce the "apply_fix_mass_swapping_events" flag.
    • small changes

Summary by Sourcery

This pull request introduces a new flag to handle mass swapping events and fixes issues related to the properties of satellite subhalos at infall. It also includes enhancements to calculations involving virial radius and specific angular momentum, ensuring they correctly use infall properties when applicable.

  • New Features:
    • Introduced the 'apply_fix_mass_swapping_events' flag to handle mass swapping events more effectively.
  • Bug Fixes:
    • Ensured properties at infall have non-zero values for satellite subhalos that aren't born as satellites, using current properties for those that are.
  • Enhancements:
    • Updated various calculations to use infall properties for satellite subhalos when the 'apply_fix_mass_swapping_events' flag is set.
    • Refined the logic for determining virial radius and specific angular momentum based on subhalo type and infall properties.

Copy link

sourcery-ai bot commented Jul 2, 2024

Reviewer's Guide by Sourcery

This pull request introduces fixes for handling mass swapping events in dark matter halos. The changes include adding a new flag 'apply_fix_to_mass_swapping_events' and updating the logic in various functions to use this flag. Additionally, several minor refactoring and bug fixes were made to improve code clarity and correctness.

File-Level Changes

Files Changes
src/dark_matter_halos.cpp
src/gas_cooling.cpp
src/agn_feedback.cpp
src/shark_runner.cpp
include/agn_feedback.h
include/gas_cooling.h
Introduced 'dark_matter_params' and updated logic to handle mass swapping events based on the 'apply_fix_to_mass_swapping_events' flag.
src/tree_builder.cpp
src/galaxy_creator.cpp
src/galaxy_mergers.cpp
src/evolve_halos.cpp
Refactored and fixed minor issues related to subhalo properties and galaxy creation.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @angel-chandro - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@rtobar rtobar merged commit b9b6eba into ICRAR:devel Jul 8, 2024
7 of 8 checks passed
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.

2 participants