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

Refactor of ComputeIonizedBox #360

Open
daviesje opened this issue Mar 27, 2024 · 0 comments · May be fixed by #427
Open

Refactor of ComputeIonizedBox #360

daviesje opened this issue Mar 27, 2024 · 0 comments · May be fixed by #427
Assignees
Labels
context: C backend Changes occur predominantly in the C code context: v4-prep This issue regards changes to the v4-prep branch type: refactor Code refactoring / restyling for internal benefit

Comments

@daviesje
Copy link
Contributor

The current implementation of the reionization algorithm consists of one very long function (1500 lines). There is a lot of similar computation separated by flags (USE_MASS_DEPENDENT_ZETA, USE_MINI_HALOS, USE_HALO_FIELD) so there is a lot of opportunity to make this function more modular.

Functions could be created for initialising the required grids, finding maxima/minima for table generation, calculating ionizing emissivity from filtered grids at one radius, calculating recombinations etc.

By refactoring and removing redundant code here it will become much easier to add new models and detect issues in the future.

@daviesje daviesje added context: C backend Changes occur predominantly in the C code context: v4-prep This issue regards changes to the v4-prep branch type: refactor Code refactoring / restyling for internal benefit labels Mar 27, 2024
@daviesje daviesje self-assigned this Mar 27, 2024
@daviesje daviesje linked a pull request Sep 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context: C backend Changes occur predominantly in the C code context: v4-prep This issue regards changes to the v4-prep branch type: refactor Code refactoring / restyling for internal benefit
Projects
Status: In review
Development

Successfully merging a pull request may close this issue.

1 participant