Skip to content

Commit

Permalink
Hoist gamma check
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Sep 7, 2023
1 parent 11e1f1a commit b4ebb7e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/solvers/imex_ark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ function step_u!(integrator, cache::IMEXARKCache)
s = length(b_exp)

if !isnothing(T_imp!) && !isnothing(newtons_method)
γ isa Nothing && sdirk_error(name)
NVTX.@range "update!" color = colorant"yellow" begin
update!(
newtons_method,
newtons_method_cache,
NewTimeStep(t),
jacobian -> isnothing(γ) ? sdirk_error(name) : T_imp!.Wfact(jacobian, u, p, dt * γ, t),
jacobian -> T_imp!.Wfact(jacobian, u, p, dt * γ, t),
)
end
end
Expand Down
3 changes: 2 additions & 1 deletion src/solvers/imex_ssprk.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,12 @@ function step_u!(integrator, cache::IMEXSSPRKCache)
s = length(b_imp)

if !isnothing(T_imp!) && !isnothing(newtons_method)
γ isa Nothing && sdirk_error(name)
update!(
newtons_method,
newtons_method_cache,
NewTimeStep(t),
jacobian -> isnothing(γ) ? sdirk_error(name) : T_imp!.Wfact(jacobian, u, p, dt * γ, t),
jacobian -> T_imp!.Wfact(jacobian, u, p, dt * γ, t),
)
end

Expand Down

0 comments on commit b4ebb7e

Please sign in to comment.