Skip to content

SIDM re-implementation and generic DM neighbour finding

(copied from !2134 (closed))

We would like to be able to carry out neighbour finding for dark matter particles. There are two major two science use cases: SIDM and BH dynamical friction. I'm creating this PR initially just as a place for me to collect notes.

Camila had implemented SIDM in SWIFT, but it's branched off quite an old version of master (pre FLAMINGO). It used PartType6 for SIDM particles, but this has since been taken by neutrinos. It also used the old neighbour finding code (a new version was implemented to better handle the steep density gradients found in COLIBRE).

  • Carry out a diff of this branch against master (from the time) to see what she added
  • Implement SIDM stuff on top of the DM neighbour finding

Darwin & Jon have been adding neighbour finding for sink particles.

  • Look into their implementation

Rough plan

  • Create a new particle type (!2150 (merged))
  • Add capability to read the new type from ICs, add them to the space, and write to snapshots (!2151 (merged))
  • Construct the tree and place the particles in the tree at the right place (!2168 (merged))
  • Copy the new hydro neighbour finding (!2175)
  • Add self and pair tasks. No recursion. Always active.
  • Test against the brute force neighbour finding script and against gas case.
  • Duplicate the ghost infrastructure to iterate towards the correct h.
  • Add infrastructure to kick, drift, and compute the time-step of the new type.
  • Work on the task activation.
  • Work on task splitting to optimise the level in the tree.
  • Verify the code correctness against the gas case.
  • Add second loop for SIDM kick.
  • Worry about MPI at a later date

The branch sidm_merge is a duplicate of master where we will merge the items above one-by-one.

Edited by Matthieu Schaller
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information