@@ -274,11 +274,11 @@ function IntegratorTestCase(;
274274 jac_prototype = Matrix {FT} (undef, length (Y₀), length (Y₀))
275275 func_args = (; jac_prototype, Wfact = Wfact!, tgrad = tgrad!)
276276 tendency_func = ODEFunction (tendency!; func_args... )
277- if isnothing (implicit_tendency!) # assume that related args are also nothing
277+ split_tendency_func = if isnothing (implicit_tendency!) # assume that related args are also nothing
278278 no_tendency! (Yₜ, Y, _, t) = Yₜ .= 0
279- split_tendency_func = SplitFunction (tendency_func, no_tendency!)
279+ SplitFunction (tendency_func, no_tendency!)
280280 else
281- split_tendency_func = SplitFunction (ODEFunction (implicit_tendency!; func_args... ), explicit_tendency!)
281+ SplitFunction (ODEFunction (implicit_tendency!; func_args... ), explicit_tendency!)
282282 end
283283 make_prob (func) = ODEProblem (func, Y₀, (FT (0 ), t_end), nothing )
284284 IntegratorTestCase (
@@ -307,12 +307,14 @@ function ClimaIntegratorTestCase(;
307307 jac_prototype = Matrix {FT} (undef, length (Y₀), length (Y₀))
308308 func_args = (; jac_prototype, Wfact = Wfact!, tgrad = tgrad!)
309309 tendency_func = ClimaODEFunction (; T_imp! = ODEFunction (tendency!; func_args... ))
310- if isnothing (implicit_tendency!) # assume that related args are also nothing
311- split_tendency_func = ClimaODEFunction (; T_imp! = ODEFunction (tendency!; func_args... ))
310+
311+ T_imp! = if isnothing (implicit_tendency!)
312+ # assume that related args are also nothing
313+ ODEFunction (tendency!; func_args... )
312314 else
313- split_tendency_func =
314- ClimaODEFunction (; T_exp! = explicit_tendency!, T_imp! = ODEFunction (implicit_tendency!; func_args... ))
315+ ODEFunction (implicit_tendency!; func_args... )
315316 end
317+ split_tendency_func = ClimaODEFunction (; T_exp! = explicit_tendency!, T_imp!)
316318 make_prob (func) = ODEProblem (func, Y₀, (FT (0 ), t_end), nothing )
317319 IntegratorTestCase (
318320 test_name,
0 commit comments