Skip to content

WIP: calc_tdust_1d: factor out bisect and lightly refactor newton method - #581

Open
mabruzzo wants to merge 47 commits into
grackle-project:newchem-cppfrom
mabruzzo:ncc/factor-out-bisect
Open

WIP: calc_tdust_1d: factor out bisect and lightly refactor newton method#581
mabruzzo wants to merge 47 commits into
grackle-project:newchem-cppfrom
mabruzzo:ncc/factor-out-bisect

Conversation

@mabruzzo

@mabruzzo mabruzzo commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

This should be reviewed after #579 has been merged


This is PR factors the bisection logic out of calc_tdust_1d and lightly refactors the associated newton-raphson logic. Ideally, we will be able to actively test this logic with unit tests.

The whole process reveals some interesting assumptions that were made with initial guesses. They were all built around the classic dust model. I'm not sure how robust these assumptions are with Gen's model. It's probably fine, but I don't think we would know if it didn't work (the logic for warning about non-convergence seems broken1).

Footnotes

  1. I left a comment about it in the function, but didn't fix it.

@mabruzzo mabruzzo changed the title WIP: factor out bisect calc_tdust_1d_g: factor out bisect and lightly refactor newton method Aug 6, 2026
@mabruzzo
mabruzzo force-pushed the ncc/factor-out-bisect branch from 35ec91c to 365c55f Compare August 20, 2026 01:46
@mabruzzo mabruzzo changed the title calc_tdust_1d_g: factor out bisect and lightly refactor newton method WIP: calc_tdust_1d: factor out bisect and lightly refactor newton method Aug 20, 2026
@brittonsmith
brittonsmith changed the base branch from newchem-cpp to main August 20, 2026 12:19
@brittonsmith
brittonsmith changed the base branch from main to newchem-cpp August 20, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant