From fdae9b90f14b92d82dbdc0dfd4d936ac62d6eace Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Thu, 27 Feb 2020 10:18:19 +0800 Subject: [PATCH] Added BHs to the on-the-fly interface of VR --- src/velociraptor_interface.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/velociraptor_interface.c b/src/velociraptor_interface.c index d85093ac06..4af289c550 100644 --- a/src/velociraptor_interface.c +++ b/src/velociraptor_interface.c @@ -237,6 +237,7 @@ void velociraptor_convert_particles_mapper(void *map_data, int nr_gparts, const struct part *parts = s->parts; const struct xpart *xparts = s->xparts; const struct spart *sparts = s->sparts; + const struct bpart *bparts = s->bparts; /* Handle on the physics modules */ const struct cosmology *cosmo = e->cosmology; @@ -314,6 +315,13 @@ void velociraptor_convert_particles_mapper(void *map_data, int nr_gparts, swift_parts[i].T = 0.f; break; + case swift_type_black_hole: + + swift_parts[i].id = bparts[-gparts[i].id_or_neg_offset].id; + swift_parts[i].u = 0.f; + swift_parts[i].T = 0.f; + break; + case swift_type_dark_matter: swift_parts[i].id = gparts[i].id_or_neg_offset; -- GitLab