Skip to content

Commit

Permalink
Add unit test to test default implementation of variable_derivative
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed Nov 16, 2023
1 parent 2c75e38 commit bf69564
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/test_unit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,26 @@ end
end
end

@testset "Consistency check for variable_derivative routine" begin
# Set up conservative variables, equations
u = [
0.5011914484393387,
0.8829127712445113,
0.43024132987932817,
0.7560616633050348,
]

equations = CompressibleEulerEquations2D(1.4)

# Define wrapper function for pressure in order to call default implementation
function pressure_test(u, equations)
return pressure(u, equations)
end

@test Trixi.variable_derivative(pressure_test, u, equations)
Trixi.variable_derivative(pressure, u, equations)
end

@testset "Equivalent Fluxes" begin
# Set up equations and dummy conservative variables state
# Burgers' Equation
Expand Down

0 comments on commit bf69564

Please sign in to comment.