Skip to content
Snippets Groups Projects

Sink iact overhauled to match BHs

Merged Jonathan Davies requested to merge sink_iact_update into master
All threads resolved!

Here's my attempt at overhauling the sink interactions such that they match the infrastructure for all the other particle types. I've used the BHs as a model, as right now the sinks only have swallow interactions.

I think I've made things consistent with the BHs, and the code compiles and appears to successfully run the Plummer sphere example simulation with the GEAR model.

Here's what I've changed:

  • All self/pair/sub interaction functions have been moved from runner_sinks.h to a new file runner_doiact_functions_sinks.h for consistency with BHs.
  • These functions are now declared in runner_doiact_sinks.h by pasting names around in the same way as the BHs are. All functions have been re-named accordingly.
  • I'm now importing these functions in runner_main.h and the new file runner_doiact_sinks.c as appropriate, and I added the relevant lines to runner_iact_undef.h.
  • I moved the declarations of the swallowing functions (e.g. runner_do_sinks_gas_swallow_self) from runner_doiact_sinks.h to runner.h for consistency with the BHs.

Please let me know if there's anything I've missed or that I should change. I requested a review from @matthieu but @Roduit please do have a look as well! For now I'm going to take this new code layout and try porting in the density interactions on a new branch.

Merge request reports

Merged by Matthieu SchallerMatthieu Schaller 8 months ago (Oct 30, 2024 12:12pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Darwin
  • Darwin
  • Darwin
  • Darwin
  • Darwin
  • Jonathan Davies added 3 commits

    added 3 commits

    • 66b70400 - Pluralise IACT function names
    • d586a692 - Cleanup
    • c0ab8f57 - Remove checks on gas for non-swallow sink tasks

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • @Roduit The latest set of commits should have resolved all comments.

  • Great! Many thanks!

    Can you format the code, please?

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 49cd7dda - Fix erroneous references to sinks in code comments

    Compare with previous version

  • @Roduit OK I think we're good to go - I've been running this latest version on the HomogeneousBox example for almost a day now and no problems have cropped up - I can just leave it going for a while.

    Just to let you know, after today I'm going to be on leave for a week so won't be responding on here.

  • Great! Thank you for the job you did!

    Everything is good for me. I don't know if @matthieu has anything else to suggest.

  • Matthieu Schaller
  • Matthieu Schaller resolved all threads

    resolved all threads

  • That all looks fine to me. Can I confirm that @Roduit is happy with the changes and that it does not break tests?

  • I confirm I'm happy and that tests are not broken. :)

    Many thanks, @jdavies, for this!

  • mentioned in commit 81fa7127

  • Please register or sign in to reply
    Loading