You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe. #218 introduces functions used for implicit timestepping. These will soon be moved to ClimaTimeSteppers (see CliMA/ClimaCore.jl#1230), but we should still generalize them while they are in ClimaLSM.
ldiv! current accesses x.soil.\vartheta_l, which is hardcoded for RRE. We want this function to work for any problem that may be stepped implicitly. We need to generalize this prognostic variable access, maybe by unpacking x recursively as is done for dss! in #218.
Alternative solution
Alternatively, we could have ldiv! dispatch off of concrete TridiagonalW types (so RichardsTridiagonalW for RRE). Then we'll implement one ldiv! function for each model (which isn't ideal), but we would be able to pass the property to access from x and b (so soil.\vartheta_l for RRE) to _ldiv!/ldiv_serial!, and keep _ldiv! and ldiv_serial! general across all AbstractTridiagonalW types.
Additional context
Ultimately, these functions will be generalized and moved to ClimaTimeSteppers, so we don't need a super optimized implementation here.
See ClimaCore SDI for adding these functions there: CliMA/ClimaCore.jl#1230
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
#218 introduces functions used for implicit timestepping. These will soon be moved to ClimaTimeSteppers (see CliMA/ClimaCore.jl#1230), but we should still generalize them while they are in ClimaLSM.
ldiv!
current accessesx.soil.\vartheta_l
, which is hardcoded for RRE. We want this function to work for any problem that may be stepped implicitly. We need to generalize this prognostic variable access, maybe by unpackingx
recursively as is done fordss!
in #218.Alternative solution
Alternatively, we could have
ldiv!
dispatch off of concreteTridiagonalW
types (soRichardsTridiagonalW
for RRE). Then we'll implement oneldiv!
function for each model (which isn't ideal), but we would be able to pass the property to access fromx
andb
(sosoil.\vartheta_l
for RRE) to_ldiv!/ldiv_serial!
, and keep_ldiv!
andldiv_serial!
general across allAbstractTridiagonalW
types.Additional context
Ultimately, these functions will be generalized and moved to ClimaTimeSteppers, so we don't need a super optimized implementation here.
See ClimaCore SDI for adding these functions there: CliMA/ClimaCore.jl#1230
The text was updated successfully, but these errors were encountered: