Skip to content
Snippets Groups Projects
Commit 59a20c27 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Use the correct position in the gpart array when constructing the VR particles in the interface.

parent 18cf1719
Branches
Tags
No related merge requests found
...@@ -206,9 +206,10 @@ void velociraptor_convert_particles_mapper(void *map_data, int nr_gparts, ...@@ -206,9 +206,10 @@ void velociraptor_convert_particles_mapper(void *map_data, int nr_gparts,
struct gpart *restrict gparts = (struct gpart *)map_data; struct gpart *restrict gparts = (struct gpart *)map_data;
struct velociraptor_copy_data *data = struct velociraptor_copy_data *data =
(struct velociraptor_copy_data *)extra_data; (struct velociraptor_copy_data *)extra_data;
struct swift_vel_part *swift_parts = data->swift_parts;
const struct engine *e = data->e; const struct engine *e = data->e;
const struct space *s = e->s; const struct space *s = e->s;
struct swift_vel_part *swift_parts =
data->swift_parts + (ptrdiff_t)(gparts - s->gparts);
/* Handle on the other particle types */ /* Handle on the other particle types */
const struct part *parts = s->parts; const struct part *parts = s->parts;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment