Commit 31fc3179 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Merge branch 'entropy_flag_bug_fix' into 'master'

Read the entropy flag as an array of 6 values

Fix to #192. 

Here is the fix. 

See merge request !207
parents dbb272c5 2540f485
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment