feat(Rosenbrock): 1M donor / coupled / exact modes on the unified framework#731
Draft
haakon-e wants to merge 4 commits into
Draft
feat(Rosenbrock): 1M donor / coupled / exact modes on the unified framework#731haakon-e wants to merge 4 commits into
haakon-e wants to merge 4 commits into
Conversation
Member
Author
|
This change is part of the following stack:
Change managed by git-spice. |
This was referenced Jun 14, 2026
haakon-e
force-pushed
the
he/1m-unification
branch
from
June 14, 2026 02:45
f227cd9 to
d0a06bf
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
June 16, 2026 20:00
1fa016b to
9bffa2c
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
June 17, 2026 21:20
9bffa2c to
5ba20ad
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
June 18, 2026 21:42
5ba20ad to
c161025
Compare
haakon-e
force-pushed
the
he/1m-ad
branch
2 times, most recently
from
June 18, 2026 22:41
d761cf7 to
35b9d20
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
June 18, 2026 22:41
c161025 to
326fb30
Compare
Merged
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
June 22, 2026 21:01
326fb30 to
0265692
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
June 22, 2026 23:43
0265692 to
df7621d
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
June 22, 2026 23:55
df7621d to
e1ee26d
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
June 26, 2026 01:22
a5d4a45 to
631d52a
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
June 26, 2026 01:31
631d52a to
62a00be
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
July 1, 2026 05:34
62a00be to
0f9989e
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
July 1, 2026 05:46
0f9989e to
b3cba94
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
July 1, 2026 06:24
b3cba94 to
4cc8acb
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
July 1, 2026 15:01
4cc8acb to
5336a31
Compare
1 task
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
July 8, 2026 04:34
5336a31 to
558fe72
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
July 10, 2026 02:14
558fe72 to
4eff57c
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
July 10, 2026 23:15
4eff57c to
f91130e
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
July 11, 2026 00:58
f91130e to
5ae5e06
Compare
haakon-e
force-pushed
the
he/1m-ad
branch
2 times, most recently
from
July 11, 2026 02:14
daa78f8 to
19dbc82
Compare
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
July 11, 2026 02:31
1082418 to
61d0407
Compare
Extend the unified RosenbrockAverage framework to the one-moment model: add the DonorCellJacobian and CoupledDonorJacobian providers and channel masks, the rosenbrock_donor() and rosenbrock_coupled() presets, and the Microphysics1Moment substep driver. LinearizedAverage now forwards to rosenbrock_donor(), the donor-cell configuration of the framework. The one-moment kernels are made ForwardDiff-able so rosenbrock_exact() runs on the 1M model. Documentation and Float64/Float32 tests cover the donor/coupled/exact presets, the keyword constructor, donor-equals- LinearizedAverage, and zero-allocation hot calls.
The 2M+P3 RosenbrockAverage entry point dispatches only on ExactJacobian (or ManualJacobian); the default RosenbrockAverage() selects DonorJacobian, which the guard rejects with an ArgumentError. Pass rosenbrock_exact() so the kernel exercises the intended path.
Extract the shared saturation bisection from the two EndStateSaturationAdjustment methods. Rename _jacobian_1m_relinearized to _jacobian_1m_coupled to match CoupledDonorJacobian and rosenbrock_coupled(). Parametrize the 1M convergence tests over the limiter-free presets and use named presets instead of the bare default constructor; drop a rationale comment covered by the AD-compatibility guide.
Cover rosenbrock_donor, rosenbrock_coupled, and rosenbrock_exact through the 1M bulk_microphysics_tendencies entry on the GPU backend.
haakon-e
force-pushed
the
he/rosenbrock-2m-p3
branch
from
July 11, 2026 03:28
61d0407 to
8ae90c4
Compare
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.
What this adds
Adds the 1-moment (
Microphysics1Moment) path to theRosenbrockAverageframework from the previous PR. It introduces three presets:rosenbrock_donor():DonorJacobian, the donor-based linearizationM, reproducingLinearizedAverage(they agree to round-off in Float64).rosenbrock_coupled():CoupledDonorJacobian, the donor matrix plus the vapor-competition (WBF) coupling, and corrects the sign of the snow source from cloud liquid.rosenbrock_exact(): the exact ForwardDiff Jacobian with the growth term taken explicitly and a saturation adjustment. Several 1M kernels were modified to accept dual numbers so ForwardDiff can differentiate the tendency.Donor versus exact
The exact Jacobian costs about 2.5× the donor matrix per call. The donor matrix omits cross-couplings that in mixed-phase conditions exceed the diagonal, so at a given number of substeps the exact Jacobian is more accurate there;
coupledrestores the dominant vapor-competition coupling at the donor option's cost.Testing
1M tests:
rosenbrock_donor() ≡ LinearizedAverage(), the keyword constructor, all three presets return finite tendencies, and convergence against a fine explicit reference; zero-allocation and JET checks in Float64 and Float32.