Skip to content

Commit

Permalink
Fixed total entropy function call
Browse files Browse the repository at this point in the history
  • Loading branch information
teohyikhaw committed Dec 9, 2023
1 parent 74f94fb commit a7c7a3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/test_tree_1d_eulermulti.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_1d_dgsem")
gas_constants=SVector{length(gas_constants)}(gas_constants...))
u = [-1.4632513788889214, 0.9908786980927811, 0.2909066990257628, 0.6256623915420473, 0.4905882754313441, 0.14481800501749112, 1.0333532872771651, 0.6805599818745411]
w = cons2entropy(u, equations)
@test w ForwardDiff.gradient(u -> total_entropy(u, equations), u)
@test w ForwardDiff.gradient(u -> Trixi.total_entropy(u, equations), u)
@test entropy2cons(w, equations) u
end

end
@trixi_testset "elixir_eulermulti_ec.jl" begin
@test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_eulermulti_ec.jl"),
l2=[0.15330089521538684, 0.4417674632047301,
Expand Down
2 changes: 1 addition & 1 deletion test/test_tree_2d_eulermulti.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ EXAMPLES_DIR = pkgdir(Trixi, "examples", "tree_2d_dgsem")
gas_constants=SVector{length(gas_constants)}(gas_constants...))
u = [-1.7433292819144075, 0.8844413258376495, 0.6050737175812364, 0.8261998359817043, 1.0801186290896465, 0.505654488367698, 0.6364415555805734, 0.851669392285058, 0.31219606420306223, 1.0930477805612038]
w = cons2entropy(u, equations)
@test w ForwardDiff.gradient(u -> total_entropy(u, equations), u)
@test w ForwardDiff.gradient(u -> Trixi.total_entropy(u, equations), u)
@test entropy2cons(w, equations) u
end

Expand Down

0 comments on commit a7c7a3b

Please sign in to comment.