Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test vals of failing tests for upstream packages #1760

Merged
merged 5 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions examples/tree_2d_dgsem/elixir_eulermulti_shock_bubble.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ A shock-bubble testcase for multicomponent Euler equations
[arXiv: 1904.00972](https://arxiv.org/abs/1904.00972)
"""
function initial_condition_shock_bubble(x, t,
equations::CompressibleEulerMulticomponentEquations2D{
5,
2
})
equations::CompressibleEulerMulticomponentEquations2D{5,
2})
# bubble test case, see Gouasmi et al. https://arxiv.org/pdf/1904.00972
# other reference: https://www.researchgate.net/profile/Pep_Mulet/publication/222675930_A_flux-split_algorithm_applied_to_conservative_models_for_multicomponent_compressible_flows/links/568da54508aeaa1481ae7af0.pdf
# typical domain is rectangular, we change it to a square, as Trixi can only do squares
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ A shock-bubble testcase for multicomponent Euler equations
[arXiv: 1904.00972](https://arxiv.org/abs/1904.00972)
"""
function initial_condition_shock_bubble(x, t,
equations::CompressibleEulerMulticomponentEquations2D{
5,
2
})
equations::CompressibleEulerMulticomponentEquations2D{5,
2})
# bubble test case, see Gouasmi et al. https://arxiv.org/pdf/1904.00972
# other reference: https://www.researchgate.net/profile/Pep_Mulet/publication/222675930_A_flux-split_algorithm_applied_to_conservative_models_for_multicomponent_compressible_flows/links/568da54508aeaa1481ae7af0.pdf
# typical domain is rectangular, we change it to a square, as Trixi can only do squares
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ A shock-bubble testcase for multicomponent Euler equations
[arXiv: 1904.00972](https://arxiv.org/abs/1904.00972)
"""
function initial_condition_shock_bubble(x, t,
equations::CompressibleEulerMulticomponentEquations2D{
5,
2
})
equations::CompressibleEulerMulticomponentEquations2D{5,
2})
# bubble test case, see Gouasmi et al. https://arxiv.org/pdf/1904.00972
# other reference: https://www.researchgate.net/profile/Pep_Mulet/publication/222675930_A_flux-split_algorithm_applied_to_conservative_models_for_multicomponent_compressible_flows/links/568da54508aeaa1481ae7af0.pdf
# typical domain is rectangular, we change it to a square, as Trixi can only do squares
Expand Down
7 changes: 2 additions & 5 deletions ext/TrixiMakieExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ import Trixi: iplot, iplot!
# First some utilities
# Given a reference plotting triangulation, this function generates a plotting triangulation for
# the entire global mesh. The output can be plotted using `Makie.mesh`.
function global_plotting_triangulation_makie(pds::PlotDataSeries{
<:PlotData2DTriangulated
};
function global_plotting_triangulation_makie(pds::PlotDataSeries{<:PlotData2DTriangulated};
set_z_coordinate_zero = false)
@unpack variable_id = pds
pd = pds.plot_data
Expand Down Expand Up @@ -61,8 +59,7 @@ end

# Returns a list of `Makie.Point`s which can be used to plot the mesh, or a solution "wireframe"
# (e.g., a plot of the mesh lines but with the z-coordinate equal to the value of the solution).
function convert_PlotData2D_to_mesh_Points(pds::PlotDataSeries{<:PlotData2DTriangulated
};
function convert_PlotData2D_to_mesh_Points(pds::PlotDataSeries{<:PlotData2DTriangulated};
set_z_coordinate_zero = false)
@unpack variable_id = pds
pd = pds.plot_data
Expand Down
58 changes: 23 additions & 35 deletions src/auxiliary/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ function _precompile_manual_()
Matrix{RealT},
# DerivativeMatrix
#StaticArrays.SArray{Tuple{nnodes_,nnodes_},RealT,2,nnodes_^2},
Matrix{RealT}
}
Matrix{RealT}}
end

function mortar_type_dgsem(RealT, nnodes_)
Expand All @@ -197,8 +196,7 @@ function _precompile_manual_()
Matrix{RealT},
# ReverseMatrix
# StaticArrays.SArray{Tuple{nnodes_,nnodes_},RealT,2,nnodes_^2},
Matrix{RealT}
}
Matrix{RealT}}
end

function analyzer_type_dgsem(RealT, nnodes_)
Expand All @@ -208,8 +206,7 @@ function _precompile_manual_()
# VectorT
StaticArrays.SVector{nnodes_analysis, RealT},
# Vandermonde
Array{RealT, 2}
}
Array{RealT, 2}}
end

function adaptor_type_dgsem(RealT, nnodes_)
Expand Down Expand Up @@ -242,8 +239,8 @@ function _precompile_manual_()
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{(:initial_refinement_level, :n_cells_max),
Tuple{Int, Int}}, Type{TreeMesh},
Tuple{RealT, RealT, RealT}, Tuple{RealT, RealT, RealT
}})
Tuple{RealT, RealT, RealT},
Tuple{RealT, RealT, RealT}})
end
for TreeType in (SerialTree, ParallelTree), NDIMS in 1:3
@assert Base.precompile(Tuple{typeof(Trixi.initialize!),
Expand Down Expand Up @@ -308,8 +305,8 @@ function _precompile_manual_()
Base.precompile(Tuple{Type{LobattoLegendreBasis}, Int})
for RealT in (Float64,)
Base.precompile(Tuple{Type{LobattoLegendreBasis}, RealT, Int})
@assert Base.precompile(Tuple{typeof(Trixi.calc_dhat), Vector{RealT}, Vector{RealT}
})
@assert Base.precompile(Tuple{typeof(Trixi.calc_dhat), Vector{RealT},
Vector{RealT}})
@assert Base.precompile(Tuple{typeof(Trixi.calc_dsplit), Vector{RealT},
Vector{RealT}})
@assert Base.precompile(Tuple{typeof(Trixi.polynomial_derivative_matrix),
Expand All @@ -332,10 +329,10 @@ function _precompile_manual_()
@assert Base.precompile(Tuple{typeof(Trixi.calc_forward_lower), Int})
@assert Base.precompile(Tuple{typeof(Trixi.calc_reverse_upper), Int, Val{:gauss}})
@assert Base.precompile(Tuple{typeof(Trixi.calc_reverse_lower), Int, Val{:gauss}})
@assert Base.precompile(Tuple{typeof(Trixi.calc_reverse_upper), Int, Val{:gauss_lobatto
}})
@assert Base.precompile(Tuple{typeof(Trixi.calc_reverse_lower), Int, Val{:gauss_lobatto
}})
@assert Base.precompile(Tuple{typeof(Trixi.calc_reverse_upper), Int,
Val{:gauss_lobatto}})
@assert Base.precompile(Tuple{typeof(Trixi.calc_reverse_lower), Int,
Val{:gauss_lobatto}})

# Constructors: mortars, analyzers, adaptors
for RealT in (Float64,), polydeg in 1:7
Expand All @@ -362,14 +359,12 @@ function _precompile_manual_()
NamedTuple{(:interval, :save_final_restart),
Tuple{Int, Bool}}, Type{SaveRestartCallback}})
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{
(:interval, :save_initial_solution,
NamedTuple{(:interval, :save_initial_solution,
:save_final_solution, :solution_variables),
Tuple{Int, Bool, Bool, typeof(cons2cons)}},
Type{SaveSolutionCallback}})
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{
(:interval, :save_initial_solution,
NamedTuple{(:interval, :save_initial_solution,
:save_final_solution, :solution_variables),
Tuple{Int, Bool, Bool, typeof(cons2prim)}},
Type{SaveSolutionCallback}})
Expand All @@ -385,8 +380,7 @@ function _precompile_manual_()
# end
# end
@assert Base.precompile(Tuple{typeof(SummaryCallback)})
@assert Base.precompile(Tuple{
DiscreteCallback{typeof(Trixi.summary_callback),
@assert Base.precompile(Tuple{DiscreteCallback{typeof(Trixi.summary_callback),
typeof(Trixi.summary_callback),
typeof(Trixi.initialize_summary_callback),
typeof(SciMLBase.FINALIZE_DEFAULT)}})
Expand Down Expand Up @@ -419,8 +413,8 @@ function _precompile_manual_()
Trixi.ElementContainer2D{RealT, uEltype}})
@assert Base.precompile(Tuple{typeof(Trixi.init_mortars), Array{Int, 1},
TreeMesh{2, Trixi.SerialTree{2}},
Trixi.ElementContainer2D{RealT, uEltype}, mortar_type
})
Trixi.ElementContainer2D{RealT, uEltype},
mortar_type})
@assert Base.precompile(Tuple{typeof(Trixi.save_mesh_file),
TreeMesh{2, Trixi.SerialTree{2}}, String})

Expand All @@ -433,8 +427,8 @@ function _precompile_manual_()
Trixi.ElementContainer2D{RealT, uEltype}})
@assert Base.precompile(Tuple{typeof(Trixi.init_mortars), Array{Int, 1},
TreeMesh{2, Trixi.ParallelTree{2}},
Trixi.ElementContainer2D{RealT, uEltype}, mortar_type
})
Trixi.ElementContainer2D{RealT, uEltype},
mortar_type})
@assert Base.precompile(Tuple{typeof(Trixi.init_mpi_interfaces), Array{Int, 1},
TreeMesh{2, Trixi.ParallelTree{2}},
Trixi.ElementContainer2D{RealT, uEltype}})
Expand All @@ -450,8 +444,8 @@ function _precompile_manual_()
Trixi.ElementContainer3D{RealT, uEltype}})
@assert Base.precompile(Tuple{typeof(Trixi.init_mortars), Array{Int, 1},
TreeMesh{3, Trixi.SerialTree{3}},
Trixi.ElementContainer3D{RealT, uEltype}, mortar_type
})
Trixi.ElementContainer3D{RealT, uEltype},
mortar_type})
@assert Base.precompile(Tuple{typeof(Trixi.save_mesh_file),
TreeMesh{3, Trixi.SerialTree{3}}, String})
end
Expand Down Expand Up @@ -548,16 +542,10 @@ function _precompile_manual_()
restart_callback_type})

for solution_variables in (cons2cons, cons2prim)
save_solution_callback_type = DiscreteCallback{
SaveSolutionCallback{
typeof(solution_variables)
},
SaveSolutionCallback{
typeof(solution_variables)
},
save_solution_callback_type = DiscreteCallback{SaveSolutionCallback{typeof(solution_variables)},
SaveSolutionCallback{typeof(solution_variables)},
typeof(Trixi.initialize!),
typeof(SciMLBase.FINALIZE_DEFAULT)
}
typeof(SciMLBase.FINALIZE_DEFAULT)}
@assert Base.precompile(Tuple{typeof(show), Base.TTY,
save_solution_callback_type})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY},
Expand Down
3 changes: 1 addition & 2 deletions src/callbacks_step/averaging.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ function Base.show(io::IO, ::MIME"text/plain",
end

function AveragingCallback(semi::SemidiscretizationHyperbolic{<:Any,
<:CompressibleEulerEquations2D
},
<:CompressibleEulerEquations2D},
tspan; output_directory = "out", filename = "averaging.h5")
mesh, equations, solver, cache = mesh_equations_solver_cache(semi)
mean_values = initialize_mean_values(mesh, equations, solver, cache)
Expand Down
7 changes: 3 additions & 4 deletions src/callbacks_step/euler_acoustics_coupling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ the [`AveragingCallback`](@ref).
A direct-hybrid method for aeroacoustic analysis
[DOI: 10.18154/RWTH-2017-04082](https://doi.org/10.18154/RWTH-2017-04082)
"""
mutable struct EulerAcousticsCouplingCallback{RealT <: Real, MeanValues, IntegratorEuler
}
mutable struct EulerAcousticsCouplingCallback{RealT <: Real, MeanValues,
IntegratorEuler}
stepsize_callback_acoustics::StepsizeCallback{RealT}
stepsize_callback_euler::StepsizeCallback{RealT}
mean_values::MeanValues
Expand Down Expand Up @@ -85,8 +85,7 @@ The mean values for the acoustic perturbation equations are read from `averaging
"""
function EulerAcousticsCouplingCallback(ode_euler,
averaging_callback::DiscreteCallback{<:Any,
<:AveragingCallback
},
<:AveragingCallback},
alg, cfl_acoustics::Real, cfl_euler::Real;
kwargs...)
@unpack mean_values = averaging_callback.affect!
Expand Down
7 changes: 3 additions & 4 deletions src/callbacks_step/glm_speed_dg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

function calc_dt_for_cleaning_speed(cfl::Real, mesh,
equations::Union{AbstractIdealGlmMhdEquations,
AbstractIdealGlmMhdMulticomponentEquations
}, dg::DG, cache)
AbstractIdealGlmMhdMulticomponentEquations},
dg::DG, cache)
# compute time step for GLM linear advection equation with c_h=1 for the DG discretization on
# Cartesian meshes
max_scaled_speed_for_c_h = maximum(cache.elements.inverse_jacobian) *
Expand All @@ -20,8 +20,7 @@ end

function calc_dt_for_cleaning_speed(cfl::Real, mesh,
equations::Union{AbstractIdealGlmMhdEquations,
AbstractIdealGlmMhdMulticomponentEquations
},
AbstractIdealGlmMhdMulticomponentEquations},
dg::DGMulti, cache)
rd = dg.basis
md = mesh.md
Expand Down
6 changes: 2 additions & 4 deletions src/callbacks_step/save_solution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ end

function Base.show(io::IO,
cb::DiscreteCallback{<:Any,
<:PeriodicCallbackAffect{<:SaveSolutionCallback
}})
<:PeriodicCallbackAffect{<:SaveSolutionCallback}})
@nospecialize cb # reduce precompilation time

save_solution_callback = cb.affect!.affect!
Expand Down Expand Up @@ -71,8 +70,7 @@ end

function Base.show(io::IO, ::MIME"text/plain",
cb::DiscreteCallback{<:Any,
<:PeriodicCallbackAffect{<:SaveSolutionCallback
}})
<:PeriodicCallbackAffect{<:SaveSolutionCallback}})
@nospecialize cb # reduce precompilation time

if get(io, :compact, false)
Expand Down
6 changes: 2 additions & 4 deletions src/callbacks_step/save_solution_dg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ function save_solution_file(u, time, dt, timestep,
# compute the solution variables via broadcasting, and reinterpret the
# result as a plain array of floating point numbers
data = Array(reinterpret(eltype(u),
solution_variables.(reinterpret(SVector{
nvariables(equations),
solution_variables.(reinterpret(SVector{nvariables(equations),
eltype(u)}, u),
Ref(equations))))

Expand Down Expand Up @@ -116,8 +115,7 @@ function save_solution_file(u, time, dt, timestep,
# compute the solution variables via broadcasting, and reinterpret the
# result as a plain array of floating point numbers
data = Array(reinterpret(eltype(u),
solution_variables.(reinterpret(SVector{
nvariables(equations),
solution_variables.(reinterpret(SVector{nvariables(equations),
eltype(u)}, u),
Ref(equations))))

Expand Down
Loading
Loading