Closed kmdeck closed 1 day ago
LGTM.
We should keep the tridiagonal solver in one central place that we do not have to duplicate it (so that we update it in one place, e.g., for GPU performance, this percolates through).
@dennisYatunin could we move the thomas algorithm function to ClimaTimesteppers?
also, if the matrix passed is the identity, will the algorithm spend time inverting it, or will it just return b
?
Actually, ClimaCore might be a slightly better location than ClimaTimeSteppers. We're currently computing Jacobian blocks as ClimaCore Fields, then copying them into arrays to run the Thomas Algorithm. It would probably be better to have a function in ClimaCore that can directly invert a Jacobian block Field (I left a note in ClimaCore last year to add a function like this).
If the Jacobian matrix is I
(or some constant times I
, which is encoded by the same struct), the matrix inversion will be ldiv!(x, I, b)
, which is defined in LinearAlgebra to just set x .= b
(scaled by a constant, if applicable).
If the Jacobian matrix is
I
(or some constant timesI
, which is encoded by the same struct), the matrix inversion will beldiv!(x, I, b)
, which is defined in LinearAlgebra to just setx .= b
(scaled by a constant, if applicable).
excellent!
completed - see #809 for followup
Purpose
We need an implicit solver for the soil model (both for Richards equation alone, and the full soil system), and possibly in the future for other models as well. Currently, the implicit solver for Richards equation is implemented and in use. The full soil implicit solver is still in progress.
Components
Inputs
Results and deliverables/Validation
Initial task breakdown
A preliminary list of PRs and a preliminary timeline of PRs, milestones, and key results.
A
andb
update every X timesteps, where X is chosen at the top-most level.Producers
@juliasloan25 (design and implementation) @kmdeck @dennisYatunin (design, implementation support)
Reviewers
Katherine, Dennis - PRs Tapio - SDI review (@tapios)
SDI Changelog