Skip to content

Commit b839a05

Browse files
committed
add type tests
1 parent 3a7e7c0 commit b839a05

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

examples/euler/dry_air/buoyancy/elixir_internal_energy_inertia_gravity_waves.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ mesh = P4estMesh(trees_per_dimension, polydeg = polydeg,
8383
initial_condition = initial_condition_gravity_waves
8484
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver,
8585
boundary_conditions = boundary_conditions)
86-
tspan = (0.0, 10.0)
86+
tspan = (0.0, 1800.0)
8787
ode = semidiscretize(semi, tspan)
8888

8989
summary_callback = SummaryCallback()

test/test_type.jl

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,4 +580,47 @@ end
580580
equations)) == RealT
581581
end
582582
end
583+
584+
@timed_testset "Compressible Euler Internal Energy With Gravity 2D" begin
585+
for RealT in (Float32, Float64)
586+
equations = @inferred CompressibleEulerInternalEnergyEquationsWithGravity2D(c_p = RealT(1004),
587+
c_v = RealT(717),
588+
gravity = RealT(9.81))
589+
590+
x = SVector(zero(RealT))
591+
t = zero(RealT)
592+
u = u_ll = u_rr = u_inner = cons = SVector(one(RealT), one(RealT), one(RealT),
593+
RealT(2), one(RealT))
594+
595+
normal_direction = SVector(one(RealT), one(RealT))
596+
597+
@test eltype(@inferred flux_nonconservative_artiano_ranocha(u_ll, u_rr,
598+
normal_direction,
599+
equations)) ==
600+
RealT
601+
@test eltype(@inferred flux_conservative_artiano_ranocha(u_ll, u_rr,
602+
normal_direction,
603+
equations)) ==
604+
RealT
605+
@test eltype(@inferred flux_nonconservative_es(u_ll, u_rr,
606+
normal_direction,
607+
equations)) ==
608+
RealT
609+
@test eltype(@inferred flux_conservative_es(u_ll, u_rr,
610+
normal_direction,
611+
equations)) ==
612+
RealT
613+
614+
@test eltype(@inferred cons2prim(u, equations)) == RealT
615+
@test eltype(@inferred prim2cons(u, equations)) == RealT
616+
@test eltype(@inferred cons2entropy(u, equations)) == RealT
617+
@test typeof(@inferred pressure(u, equations)) == RealT
618+
@test typeof(@inferred entropy(cons, equations)) == RealT
619+
@test eltype(@inferred Trixi.max_abs_speeds(u, equations)) == RealT
620+
@test typeof(@inferred max_abs_speed_naive(u_ll, u_rr, normal_direction,
621+
equations)) == RealT
622+
@test typeof(@inferred max_abs_speed(u_ll, u_rr, normal_direction,
623+
equations)) == RealT
624+
end
625+
end
583626
end

0 commit comments

Comments
 (0)