Repository navigation
PALC: pass the predictor z_pred and the step length ds to every corrector callback - #368
ParadaCarleton wants to merge 2 commits into
Conversation
…ctor callback A Newton callback could see the predictor only as x at step 0 and not at all in the closing call, so a callback comparing iterates to the predictor had to copy it into mutable state. Claude-Session: https://claude.ai/code/session_01BEoUbvf41HZqywHoqybG7q
|
OK, that's a nice suggestion. |
… predictor displacement Claude-Session: https://claude.ai/code/session_0195j23m7MRde8V6ApNmKjBR
|
I agree that the callback arguments are awkward, but Proposal: keep the NamedTuple and add The same need comes from downstream: a step-tracking callback wants the step's start I have not changed this PR. If you agree, I will push |
2 similar comments
|
I agree that the callback arguments are awkward, but Proposal: keep the NamedTuple and add The same need comes from downstream: a step-tracking callback wants the step's start I have not changed this PR. If you agree, I will push |
|
I agree that the callback arguments are awkward, but Proposal: keep the NamedTuple and add The same need comes from downstream: a step-tracking callback wants the step's start I have not changed this PR. If you agree, I will push |
The Newton callback of
newton_palcsees the predictor only asxin its first call, and its closing call gets neither the predictor nor the step length, so acallback_newtonthat compares iterates with the predictor (for example, to refuse a corrector that lands far from it) has to copy them into mutable state. This addsz_predanddsto the named tuple of all three PALC calls and changes nothing else; existing callbacks ignore the extra fields. A test intest/continuation/simple_continuation.jlchecks that every PALC call carries both, withx == z_predat step 0, and it fails without the change.