Skip to content
Snippets Groups Projects

One major change to replace all gpart id/parts with the new id_or_neg_offset.

Merged Pedro Gonnet requested to merge gpart_ids into master

As discussed in #123 (closed), this merge request changes the gpart.id and gpart.part anonymous union into a single long long int id_or_neg_offset.

If this number is positive, then it is the particle ID and the gpart has no hydro counterpart.

If this number is negative, then it is the offset in the parts array of this particle's hydro counterpart.

Merge request reports

Merged by avatar (May 24, 2025 11:49pm 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
  • Matthieu Schaller Title changed from One major change to replace all gpart id/parts with the new id_or_neg_offset. to [WIP] One major change to replace all gpart id/parts with the new id_or_neg_offset.

    Title changed from One major change to replace all gpart id/parts with the new id_or_neg_offset. to [WIP] One major change to replace all gpart id/parts with the new id_or_neg_offset.

  • Author Developer

    Btw, the previous comments are just notes to myself on re-reading the code :)

    Finally, I should also make the re-linking of parts/gparts an external function. We do it in too many places and bug can creep in this way.

  • Pedro Gonnet Added 1 commit:

    Added 1 commit:

    • af2ad857 - fix the cell linking in cell_split.
  • Pedro Gonnet Added 2 commits:

    Added 2 commits:

    • f2385025 - fix non-negative offset use.
    • 415d6432 - replace memcpy with direct assignment.
  • Pedro Gonnet Added 3 commits:

    Added 3 commits:

    • 40edb635 - add utility functions to re-link parts/gparts.
    • cdea145c - fix some things.
    • 23f09dde - use the new part_relink_* functions throughout the code.
  • Author Developer

    OK, should be ready now!

  • Pedro Gonnet Title changed from [WIP] One major change to replace all gpart id/parts with the new id_or_neg_offset. to One major change to replace all gpart id/parts with the new id_or_neg_offset.

    Title changed from [WIP] One major change to replace all gpart id/parts with the new id_or_neg_offset. to One major change to replace all gpart id/parts with the new id_or_neg_offset.

  • mentioned in issue #121 (closed)

  • Can we put this on hold until all the MPI-gparts components have been merged in ?

  • Matthieu Schaller Title changed from One major change to replace all gpart id/parts with the new id_or_neg_offset. to [WIP] One major change to replace all gpart id/parts with the new id_or_neg_offset.

    Title changed from One major change to replace all gpart id/parts with the new id_or_neg_offset. to [WIP] One major change to replace all gpart id/parts with the new id_or_neg_offset.

  • Author Developer

    Sure, no problem.

  • Pedro Gonnet Added 194 commits:

    Added 194 commits:

  • Pedro Gonnet Added 123 commits:

    Added 123 commits:

  • Pedro Gonnet Added 1 commit:

    Added 1 commit:

    • fd0b64dc - only re-linke parts for which the gpart pointer is non-null.
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading