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

Read the entropy flag as an array of 6 values

parent dbb272c5
Branches
Tags
1 merge request!207Read the entropy flag as an array of 6 values
......@@ -410,7 +410,9 @@ void read_ic_parallel(char* fileName, const struct UnitSystem* internal_units,
if (h_grp < 0) error("Error while opening file header\n");
/* Read the relevant information and print status */
readAttribute(h_grp, "Flag_Entropy_ICs", INT, flag_entropy);
int flag_entropy_temp[6];
readAttribute(h_grp, "Flag_Entropy_ICs", INT, flag_entropy_temp);
*flag_entropy = flag_entropy_temp[0];
readAttribute(h_grp, "BoxSize", DOUBLE, boxSize);
readAttribute(h_grp, "NumPart_Total", UINT, numParticles);
readAttribute(h_grp, "NumPart_Total_HighWord", UINT, numParticles_highWord);
......
......@@ -454,7 +454,9 @@ void read_ic_serial(char* fileName, const struct UnitSystem* internal_units,
if (h_grp < 0) error("Error while opening file header\n");
/* Read the relevant information and print status */
readAttribute(h_grp, "Flag_Entropy_ICs", INT, flag_entropy);
int flag_entropy_temp[6];
readAttribute(h_grp, "Flag_Entropy_ICs", INT, flag_entropy_temp);
*flag_entropy = flag_entropy_temp[0];
readAttribute(h_grp, "BoxSize", DOUBLE, boxSize);
readAttribute(h_grp, "NumPart_Total", UINT, numParticles);
readAttribute(h_grp, "NumPart_Total_HighWord", UINT, numParticles_highWord);
......
......@@ -365,7 +365,9 @@ void read_ic_single(char* fileName, const struct UnitSystem* internal_units,
if (h_grp < 0) error("Error while opening file header\n");
/* Read the relevant information and print status */
readAttribute(h_grp, "Flag_Entropy_ICs", INT, flag_entropy);
int flag_entropy_temp[6];
readAttribute(h_grp, "Flag_Entropy_ICs", INT, flag_entropy_temp);
*flag_entropy = flag_entropy_temp[0];
readAttribute(h_grp, "BoxSize", DOUBLE, boxSize);
readAttribute(h_grp, "NumPart_Total", UINT, numParticles);
readAttribute(h_grp, "NumPart_Total_HighWord", UINT, numParticles_highWord);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment