-
Notifications
You must be signed in to change notification settings - Fork 189
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
Limit initial time step to avoid control system deadlocks #5732
Limit initial time step to avoid control system deadlocks #5732
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the BBH metavariables, the InitializeMeasurements
action is at the end of the list, so it's fine that we change the step size there. But what prevents somebody from putting another initialization action after it that again changes the step size to something undesirable by the control system? Not saying this needs to hold up this PR, but something we should think about.
TimeDelta new_step{}; | ||
if constexpr (Metavariables::local_time_stepping) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[optional] You could put the if constexpr
inside the db::mutate
. Avoids the intermediate variable.
test_initialize_measurements<false>(true, true); | ||
test_initialize_measurements<false>(true, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[optional]
for (const auto& [ab_active, c_active] :
cartesian_product(std::array{true, false}, std::array{true, false})) {
test_initialize_measurements<false>(ab_active, c_active);
test_initialize_measurements<true>(ab_active, c_active);
}
Previous restriction was stricter than necessary. Now uses the same algorithm as Adams-Moulton. Also replace the comment in AM with a clearer explanation.
Some operations (e.g., control system stuff) can't be done during self-start, so it is good to keep the time range as small as possible.
3e72d93
to
818a0ef
Compare
Initialization actions are only allowed to decrease the time step, otherwise they could destabilize the evolution. That won't interfere with this code. The one exception I could imagine is a hypothetical initial run of some StepChoosers to pick a time step, but that's not really any worse than the existing restrictions on the step action ordering. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Avoids deadlocks during self-start if the requested time step is too large.
818a0ef
to
13ecc12
Compare
Proposed changes
Upgrade instructions
Code review checklist
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.Further comments