vplanet
vplanet copied to clipboard
Printing of output parameters should be limited to those that are requested
When the code outputs parameters, it loops over all possible values, MODULEOPTEND, which is inefficient. Instead the code should record the number of outputs per body and just loop over them.
To fix this, I would create new variables in the Outfile struct called something like iNumOutputs and *iaOutput, which correspond to the total number of outputs (for that file) and an array of integer that correspond to each output. Then in options.c:ReadOutputOrder, allocate the memory for iaOutput based on the number of arguments returned from ReadOptionStringArray, and assign each element the integer ID for that option. Then, in output.c, loop over each Outfile's iNumOutputs instead of all possibilities.