Fix output_list
Merge request reports
Activity
102 105 /* Transform input into correct time (e.g. ages or scale factor) */ 103 106 if (type == OUTPUT_LIST_REDSHIFT) *time = 1. / (1. + *time); 104 107 105 if (type == OUTPUT_LIST_AGE) 108 if (cosmo && type == OUTPUT_LIST_AGE) You check if
cosmo
with redshift or scale factor, but not with the cosmic time (maybe I should change the flagOUTPUT_LIST_AGE
toOUTPUT_LIST_COSMIC_TIME
?). Here I do not want to compute the scale factor from the cosmic time in a non cosmological simulation. In current master, the code just crash on a segmentation fault in this case.
Continuing the discussion about the header from !560 (merged). I did wonder about defining the type of the file in the parameter file (string instead of a boolean), which would be tidy, but having it in the file is also good documentation, so decided Loic's method was OK. One further thought (which was the part that unsettled me at first glance) was the need for two words with one blank between them, in the header. You could reasonably just look for the first one as sufficient, so then I thought about breaking the header into words and testing those. Getting seriously over engineered... So
strcasecmp
instead.assigned to @pdraper
mentioned in commit 11c22cf2