Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing of output parameters should be limited to those that are requested #149

Open
RoryBarnes opened this issue Apr 23, 2021 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@RoryBarnes
Copy link
Collaborator

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.

@RoryBarnes RoryBarnes added enhancement New feature or request good first issue Good for newcomers labels Apr 23, 2021
@RoryBarnes
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant