Skip to content
Snippets Groups Projects
Commit 58f1666a authored by Loic Hausammann's avatar Loic Hausammann
Browse files

Update io fields

parent b578d4f6
Branches
Tags
2 merge requests!837GEAR: Update io fields,!824Add a description and a scale-factor exponent to each individual array written to the snapshots.
...@@ -74,15 +74,17 @@ INLINE static int chemistry_write_particles(const struct part* parts, ...@@ -74,15 +74,17 @@ INLINE static int chemistry_write_particles(const struct part* parts,
/* List what we want to write */ /* List what we want to write */
list[0] = io_make_output_field( list[0] = io_make_output_field(
"SmoothedElementAbundance", FLOAT, chemistry_element_count, "SmoothedElementAbundances", FLOAT, chemistry_element_count,
UNIT_CONV_NO_UNITS, parts, chemistry_data.smoothed_metal_mass_fraction); UNIT_CONV_NO_UNITS, 0.f, parts, chemistry_data.smoothed_metal_mass_fraction,
"Element abundances smoothed over the neighbors");
list[1] = io_make_output_field("Z", FLOAT, 1, UNIT_CONV_NO_UNITS, parts, list[1] = io_make_output_field("Z", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, parts,
chemistry_data.Z); chemistry_data.Z, "Temporary field");
list[2] = io_make_output_field("ElementAbundance", FLOAT, list[2] = io_make_output_field("ElementAbundances", FLOAT,
chemistry_element_count, UNIT_CONV_NO_UNITS, chemistry_element_count, UNIT_CONV_NO_UNITS,
parts, chemistry_data.metal_mass_fraction); 0.f, parts, chemistry_data.metal_mass_fraction,
"Mass fraction of each element");
return 3; return 3;
} }
...@@ -100,15 +102,17 @@ INLINE static int chemistry_write_sparticles(const struct spart* sparts, ...@@ -100,15 +102,17 @@ INLINE static int chemistry_write_sparticles(const struct spart* sparts,
/* List what we want to write */ /* List what we want to write */
list[0] = io_make_output_field( list[0] = io_make_output_field(
"SmoothedElementAbundance", FLOAT, chemistry_element_count, "SmoothedElementAbundances", FLOAT, chemistry_element_count,
UNIT_CONV_NO_UNITS, sparts, chemistry_data.smoothed_metal_mass_fraction); UNIT_CONV_NO_UNITS, 0.f, sparts, chemistry_data.smoothed_metal_mass_fraction,
"Element abundances smoothed over the neighbors");
list[1] = io_make_output_field("Z", FLOAT, 1, UNIT_CONV_NO_UNITS, sparts, list[1] = io_make_output_field("Z", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, sparts,
chemistry_data.Z); chemistry_data.Z, "Temporary field");
list[2] = io_make_output_field("ElementAbundance", FLOAT, list[2] = io_make_output_field("ElementAbundance", FLOAT,
chemistry_element_count, UNIT_CONV_NO_UNITS, chemistry_element_count, UNIT_CONV_NO_UNITS,
sparts, chemistry_data.metal_mass_fraction); 0.f, sparts, chemistry_data.metal_mass_fraction,
"Mass fraction of each element");
return 3; return 3;
} }
......
...@@ -63,23 +63,23 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles( ...@@ -63,23 +63,23 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles(
#if COOLING_GRACKLE_MODE >= 1 #if COOLING_GRACKLE_MODE >= 1
/* List what we want to write */ /* List what we want to write */
list[0] = io_make_output_field("HI", FLOAT, 1, UNIT_CONV_NO_UNITS, xparts, list[0] = io_make_output_field("HI", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.HI_frac); cooling_data.HI_frac, "HI mass fraction");
list[1] = io_make_output_field("HII", FLOAT, 1, UNIT_CONV_NO_UNITS, xparts, list[1] = io_make_output_field("HII", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.HII_frac); cooling_data.HII_frac, "HII mass fraction");
list[2] = io_make_output_field("HeI", FLOAT, 1, UNIT_CONV_NO_UNITS, xparts, list[2] = io_make_output_field("HeI", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.HeI_frac); cooling_data.HeI_frac, "HeI mass fraction");
list[3] = io_make_output_field("HeII", FLOAT, 1, UNIT_CONV_NO_UNITS, xparts, list[3] = io_make_output_field("HeII", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.HeII_frac); cooling_data.HeII_frac, "HeII mass fraction");
list[4] = io_make_output_field("HeIII", FLOAT, 1, UNIT_CONV_NO_UNITS, xparts, list[4] = io_make_output_field("HeIII", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.HeIII_frac); cooling_data.HeIII_frac, "HeIII mass fraction");
list[5] = io_make_output_field("e", FLOAT, 1, UNIT_CONV_NO_UNITS, xparts, list[5] = io_make_output_field("e", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.e_frac); cooling_data.e_frac, "free electron mass fraction");
num += 6; num += 6;
#endif #endif
...@@ -87,14 +87,14 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles( ...@@ -87,14 +87,14 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles(
#if COOLING_GRACKLE_MODE >= 2 #if COOLING_GRACKLE_MODE >= 2
list += num; list += num;
list[0] = io_make_output_field("HM", FLOAT, 1, UNIT_CONV_NO_UNITS, xparts, list[0] = io_make_output_field("HM", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.HM_frac); cooling_data.HM_frac, "H- mass fraction");
list[1] = io_make_output_field("H2I", FLOAT, 1, UNIT_CONV_NO_UNITS, xparts, list[1] = io_make_output_field("H2I", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.H2I_frac); cooling_data.H2I_frac, "H2I mass fraction");
list[2] = io_make_output_field("H2II", FLOAT, 1, UNIT_CONV_NO_UNITS, xparts, list[2] = io_make_output_field("H2II", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.H2II_frac); cooling_data.H2II_frac, "H2II mass fraction");
num += 3; num += 3;
#endif #endif
...@@ -102,14 +102,14 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles( ...@@ -102,14 +102,14 @@ __attribute__((always_inline)) INLINE static int cooling_write_particles(
#if COOLING_GRACKLE_MODE >= 3 #if COOLING_GRACKLE_MODE >= 3
list += num; list += num;
list[0] = io_make_output_field("DI", FLOAT, 1, UNIT_CONV_NO_UNITS, xparts, list[0] = io_make_output_field("DI", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.DI_frac); cooling_data.DI_frac, "DI mass fraction");
list[1] = io_make_output_field("DII", FLOAT, 1, UNIT_CONV_NO_UNITS, xparts, list[1] = io_make_output_field("DII", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.DII_frac); cooling_data.DII_frac, "DII mass fraction");
list[2] = io_make_output_field("HDI", FLOAT, 1, UNIT_CONV_NO_UNITS, xparts, list[2] = io_make_output_field("HDI", FLOAT, 1, UNIT_CONV_NO_UNITS, 0.f, xparts,
cooling_data.HDI_frac); 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