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

Updated the i/o routine of the gravity mode with potentials to use the new style.

parent 54d752f9
No related branches found
No related tags found
1 merge request!876Black holes repositioning
......@@ -108,15 +108,24 @@ INLINE static void darkmatter_write_particles(const struct gpart* gparts,
/* List what we want to write */
list[0] = io_make_output_field_convert_gpart(
"Coordinates", DOUBLE, 3, UNIT_CONV_LENGTH, gparts, convert_gpart_pos);
"Coordinates", DOUBLE, 3, UNIT_CONV_LENGTH, 1.f, gparts,
convert_gpart_pos, "Co-moving position of the particles");
list[1] = io_make_output_field_convert_gpart(
"Velocities", FLOAT, 3, UNIT_CONV_SPEED, gparts, convert_gpart_vel);
list[2] =
io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, gparts, mass);
list[3] = io_make_output_field("ParticleIDs", ULONGLONG, 1,
UNIT_CONV_NO_UNITS, gparts, id_or_neg_offset);
list[4] = io_make_output_field("Potentials", FLOAT, 1, UNIT_CONV_POTENTIAL,
gparts, potential);
"Velocities", FLOAT, 3, UNIT_CONV_SPEED, 0.f, gparts, convert_gpart_vel,
"Peculiar velocities of the stars. This is a * dx/dt where x is the "
"co-moving position of the particles.");
list[2] = io_make_output_field("Masses", FLOAT, 1, UNIT_CONV_MASS, 0.f,
gparts, mass, "Masses of the particles");
list[3] = io_make_output_field(
"ParticleIDs", ULONGLONG, 1, UNIT_CONV_NO_UNITS, 0.f, gparts,
id_or_neg_offset, "Unique ID of the particles");
list[4] = io_make_output_field(
"Potentials", FLOAT, 1, UNIT_CONV_POTENTIAL, -1.f, gparts, potential,
"Co-moving gravitational potential at position of the particles");
}
#endif /* SWIFT_POTENTIAL_GRAVITY_IO_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment