Skip to content
Snippets Groups Projects
Commit 4a5121e0 authored by Yves Revaz's avatar Yves Revaz
Browse files

fix a bug (?) in cooling_write_particles that was causing a segfault

parent f352a18a
Branches
Tags
1 merge request!1803fix a bug (?) in cooling_write_particles that was causing a segfault
...@@ -98,17 +98,15 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles( ...@@ -98,17 +98,15 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles(
#endif #endif
#if COOLING_GRACKLE_MODE >= 2 #if COOLING_GRACKLE_MODE >= 2
list += num; list[6] =
list[0] =
io_make_output_field("HM", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts, io_make_output_field("HM", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.HM_frac, "H- mass fraction"); cooling_data.HM_frac, "H- mass fraction");
list[1] = list[7] =
io_make_output_field("H2I", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts, io_make_output_field("H2I", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.H2I_frac, "H2I mass fraction"); cooling_data.H2I_frac, "H2I mass fraction");
list[2] = list[8] =
io_make_output_field("H2II", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts, io_make_output_field("H2II", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.H2II_frac, "H2II mass fraction"); cooling_data.H2II_frac, "H2II mass fraction");
...@@ -116,20 +114,17 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles( ...@@ -116,20 +114,17 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles(
#endif #endif
#if COOLING_GRACKLE_MODE >= 3 #if COOLING_GRACKLE_MODE >= 3
list += num; list[9] =
list[0] =
io_make_output_field("DI", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts, io_make_output_field("DI", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.DI_frac, "DI mass fraction"); cooling_data.DI_frac, "DI mass fraction");
list[1] = list[10] =
io_make_output_field("DII", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts, io_make_output_field("DII", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.DII_frac, "DII mass fraction"); cooling_data.DII_frac, "DII mass fraction");
list[2] = list[11] =
io_make_output_field("HDI", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts, io_make_output_field("HDI", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.HDI_frac, "HDI mass fraction"); cooling_data.HDI_frac, "HDI mass fraction");
num += 3; num += 3;
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment