Skip to content
Snippets Groups Projects
Commit 9e1f5c9b authored by Brian Groenke's avatar Brian Groenke
Browse files

Fix CFL step limiter choking on autodiff types

parent c706b3be
No related branches found
No related tags found
1 merge request!36Fix CFL step limiter callback choking on autodiff types
...@@ -6,7 +6,7 @@ function (fn::CryoGridCallbackFunction{<:CFLHeatState})(u,p,t) ...@@ -6,7 +6,7 @@ function (fn::CryoGridCallbackFunction{<:CFLHeatState})(u,p,t)
Δx = Δ(fn.setup.grid), Δx = Δ(fn.setup.grid),
Ceff = getvar(:Ceff, fn.setup, u), # apparent heat capacity Ceff = getvar(:Ceff, fn.setup, u), # apparent heat capacity
kc = getvar(:kc, fn.setup, u); # thermal cond. at grid centers kc = getvar(:kc, fn.setup, u); # thermal cond. at grid centers
@. Δt = Δx^2 * Ceff / kc @. Δt = adstrip(Δx^2 * Ceff / kc)
minimum(Δt) minimum(Δt)
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment