add banded solver, TDC Y-face seed, skip cox if include_mlt_corr is F#991
Merged
Conversation
VincentVanlaer
approved these changes
May 13, 2026
Member
VincentVanlaer
left a comment
There was a problem hiding this comment.
Is there a test case you could enable this in? That way we don't break this option.
Member
Author
Yes, I will be using this in the pulsation models I introduce to the test suite for TDC. |
Member
Author
|
RSP2 will likely use it as well, once it's up and running (the banded solver). The TDC_Y_face_seeded_newton can be turned on in any test case we want. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pr adds:
a matrix solver option with
hydro_matrix_solver = 'banded'support and solver plumbing. This is the same banded solver RSP uses, just repurposed for star. It is significantly faster than bcyclic for pulsation models, or really anything that is on a smaller mesh. Bcyclic can parallelize more and remains a better all purpose generalized solver for MESA.use_TDC_Y_face_seeded_newtonplus the Y-face start/previous-iteration seed path.Small supporting TDC plumbing.
use_TDC_Y_face_seeded_newtonlet's TDC skip the bisection logic and newton iterate to get a solution faster if the solution hasn't moved very far. This is helpful for zones where convection is not changing very much and another full root bisection can be wasteful. This control in my testing reduced the number of iterations in most TDC zones in half. This should be tested further, but this option should reduce the time spent in TDC ~ 1/2 . I have seen 5-10% speed up in some models during testing, but the speed up only becomes important when the timestep is limited by tdc/mlt and not eos/kap or other evolve step related overhead.along with 2, when
include_mlt_corr_to_TDC = .false., we now skip the call to Cox inside TDC, since we don't need mlt Gamma. This is one less extra mlt call inside tdc per zone per iteration.