Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
SWIFTsim
SWIFTsim
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 69
    • Issues 69
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 11
    • Merge Requests 11
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • SWIFT
  • SWIFTsimSWIFTsim
  • Issues
  • #691

Closed
Open
Opened Jul 08, 2020 by John Helly@jch
  • Report abuse
  • New issue
Report abuse New issue

Output dataset VELOCIraptorGroupIDs is wrong when running Velociraptor on the fly

If Swift is compiled with Velociraptor support and we have Snapshots:invoke_stf=1 in the input file, then the output snapshots contain a dataset which should specify which Velociraptor group each particle belongs to. This dataset appears to be incorrect with the current master versions of Swift and Velociraptor.

For example, using the EAGLE_DMO_low_z 12Mpc box and plotting particles by assigning a random colour to each velociraptor group index:

screenshot

At least part of the problem is in velociraptor_convert_particles_mapper() where the array of struct swift_vel_part is populated. The index field is incorrect because it gets set to the index of the particle relative to the subset being processed by this invocation of the mapper function. I think the line

    swift_parts[i].index = i;

should be something like

    const ptrdiff_t index_offset = gparts - s->gparts;
    ...
    swift_parts[i].index = i + index_offset;

This results in far more of the particles getting assigned a group index, but it's still clearly wrong:

screenshot_fix

For comparison, here's how it looks if I discard the VELOCIraptorGroupIDs dataset from the snapshot and compute group membership from the velociraptor output files:

screenshot_gv

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
bug
Assign labels
  • View project labels
Reference: swift/swiftsim#691