Skip to content

Commit

Permalink
Fix flux computation for FiniteSolution
Browse files Browse the repository at this point in the history
  • Loading branch information
gerlero committed Sep 6, 2024
1 parent 33a028b commit c0b1aec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/finite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -474,5 +474,5 @@ d_dt(sol::FiniteSolution, r, t) = derivative(t -> sol(r, t), t)

function flux(sol::FiniteSolution, r, t)
val, d_dr = value_and_derivative(r -> sol(r, t), AutoForwardDiff(), r)
return conductivity(sol.prob.eq, val) * d_dr
return -conductivity(sol.prob.eq, val) * d_dr
end

0 comments on commit c0b1aec

Please sign in to comment.