Skip to content

Commit

Permalink
Allow mixed types for Rosenbrock coeffs
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Sep 12, 2024
1 parent 9249cb2 commit 5c42ea2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ClimaTimeSteppers"
uuid = "595c0a79-7f3d-439a-bc5a-b232dc3bde79"
authors = ["Climate Modeling Alliance"]
version = "0.7.34"
version = "0.7.35"

[deps]
ClimaComms = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d"
Expand Down
5 changes: 2 additions & 3 deletions src/solvers/rosenbrock.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ function step_u!(int, cache::RosenbrockCache{Nstages}) where {Nstages}
tgrad! = isnothing(T_imp!) ? nothing : T_imp!.tgrad

(; post_explicit!, post_implicit!, dss!) = int.sol.prob.f
tT = typeof(t)

# TODO: This is only valid when Γ[i, i] is constant, otherwise we have to
# move this in the for loop
Expand All @@ -142,8 +141,8 @@ function step_u!(int, cache::RosenbrockCache{Nstages}) where {Nstages}
# Reset tendency
fill!(fU, 0)

αi = sum(α[i, 1:(i - 1)]; init = zero(tT))::tT
γi = sum(Γ[i, 1:i]; init = zero(tT))::tT
αi = sum(α[i, 1:(i - 1)]; init = zero(eltype(α)))
γi = sum(Γ[i, 1:i]; init = zero(eltype(Γ)))

U .= u
for j in 1:(i - 1)
Expand Down

0 comments on commit 5c42ea2

Please sign in to comment.