import StaticArrays
import SciMLBase
function _precompile_manual_()
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
function equations_types_1d(RealT)
(LinearScalarAdvectionEquation1D{RealT},
HyperbolicDiffusionEquations1D{RealT},
CompressibleEulerEquations1D{RealT},
IdealGlmMhdEquations1D{RealT})
end
function equations_types_2d(RealT)
(LinearScalarAdvectionEquation2D{RealT},
HyperbolicDiffusionEquations2D{RealT},
CompressibleEulerEquations2D{RealT},
IdealGlmMhdEquations2D{RealT},
LatticeBoltzmannEquations2D{RealT, typeof(Trixi.collision_bgk)})
end
function equations_types_3d(RealT)
(LinearScalarAdvectionEquation3D{RealT},
HyperbolicDiffusionEquations3D{RealT},
CompressibleEulerEquations3D{RealT},
IdealGlmMhdEquations3D{RealT},
LatticeBoltzmannEquations3D{RealT, typeof(Trixi.collision_bgk)})
end
function equations_types(RealT)
(LinearScalarAdvectionEquation1D{RealT},
LinearScalarAdvectionEquation2D{RealT},
LinearScalarAdvectionEquation3D{RealT},
HyperbolicDiffusionEquations1D{RealT},
HyperbolicDiffusionEquations2D{RealT},
HyperbolicDiffusionEquations3D{RealT},
CompressibleEulerEquations1D{RealT},
CompressibleEulerEquations2D{RealT},
CompressibleEulerEquations3D{RealT},
IdealGlmMhdEquations1D{RealT},
IdealGlmMhdEquations2D{RealT},
IdealGlmMhdEquations3D{RealT},
LatticeBoltzmannEquations2D{RealT, typeof(Trixi.collision_bgk)},
LatticeBoltzmannEquations3D{RealT, typeof(Trixi.collision_bgk)})
end
function basis_type_dgsem(RealT, nnodes_)
LobattoLegendreBasis{RealT, nnodes_,
StaticArrays.SVector{nnodes_, RealT},
Matrix{RealT},
Matrix{RealT},
Matrix{RealT}}
end
function mortar_type_dgsem(RealT, nnodes_)
LobattoLegendreMortarL2{RealT, nnodes_,
Matrix{RealT},
Matrix{RealT}}
end
function analyzer_type_dgsem(RealT, nnodes_)
polydeg = nnodes_ - 1
nnodes_analysis = 2 * polydeg + 1
LobattoLegendreAnalyzer{RealT, nnodes_analysis,
StaticArrays.SVector{nnodes_analysis, RealT},
Array{RealT, 2}}
end
function adaptor_type_dgsem(RealT, nnodes_)
LobattoLegendreAdaptorL2{RealT, nnodes_,
StaticArrays.SArray{Tuple{nnodes_, nnodes_}, RealT, 2,
nnodes_^2},
StaticArrays.SArray{Tuple{nnodes_, nnodes_}, RealT, 2,
nnodes_^2}
}
end
for RealT in (Int, Float64)
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{(:initial_refinement_level, :n_cells_max),
Tuple{Int, Int}}, Type{TreeMesh},
RealT, RealT})
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{(:initial_refinement_level, :n_cells_max),
Tuple{Int, Int}}, Type{TreeMesh},
Tuple{RealT}, Tuple{RealT}})
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{(:initial_refinement_level, :n_cells_max),
Tuple{Int, Int}}, Type{TreeMesh},
Tuple{RealT, RealT}, Tuple{RealT, RealT}})
@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}})
end
for TreeType in (SerialTree, ParallelTree), NDIMS in 1:3
@assert Base.precompile(Tuple{typeof(Trixi.initialize!),
TreeMesh{NDIMS, TreeType{NDIMS}, Float64}, Int,
Tuple{},
Tuple{}})
@assert Base.precompile(Tuple{typeof(Trixi.save_mesh_file),
TreeMesh{NDIMS, TreeType{NDIMS}, Float64}, String,
Int})
end
for RealT in (Float64,)
@assert Base.precompile(Tuple{Type{LinearScalarAdvectionEquation1D}, RealT})
@assert Base.precompile(Tuple{Type{LinearScalarAdvectionEquation2D}, RealT, RealT})
@assert Base.precompile(Tuple{Type{LinearScalarAdvectionEquation2D},
Tuple{RealT, RealT}})
@assert Base.precompile(Tuple{Type{LinearScalarAdvectionEquation3D}, RealT, RealT,
RealT})
@assert Base.precompile(Tuple{Type{LinearScalarAdvectionEquation3D},
Tuple{RealT, RealT, RealT}})
end
for RealT in (Float64,)
@assert Base.precompile(Tuple{Type{HyperbolicDiffusionEquations1D}})
@assert Base.precompile(Tuple{Type{HyperbolicDiffusionEquations2D}})
@assert Base.precompile(Tuple{Type{HyperbolicDiffusionEquations3D}})
end
for RealT in (Float64,)
@assert Base.precompile(Tuple{Type{CompressibleEulerEquations1D}, RealT})
@assert Base.precompile(Tuple{Type{CompressibleEulerEquations2D}, RealT})
@assert Base.precompile(Tuple{Type{CompressibleEulerEquations3D}, RealT})
end
for RealT in (Float64,)
@assert Base.precompile(Tuple{Type{IdealGlmMhdEquations1D}, RealT})
@assert Base.precompile(Tuple{Type{IdealGlmMhdEquations2D}, RealT})
@assert Base.precompile(Tuple{Type{IdealGlmMhdEquations3D}, RealT})
end
for RealT in (Float64,)
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{(:Ma, :Re), Tuple{RealT, RealT}},
Type{LatticeBoltzmannEquations2D}})
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{(:Ma, :Re), Tuple{RealT, Int}},
Type{LatticeBoltzmannEquations2D}})
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{(:Ma, :Re), Tuple{RealT, RealT}},
Type{LatticeBoltzmannEquations3D}})
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{(:Ma, :Re), Tuple{RealT, Int}},
Type{LatticeBoltzmannEquations3D}})
end
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_dsplit), Vector{RealT},
Vector{RealT}})
@assert Base.precompile(Tuple{typeof(Trixi.polynomial_derivative_matrix),
Vector{RealT}})
@assert Base.precompile(Tuple{typeof(Trixi.polynomial_interpolation_matrix),
Vector{RealT}, Vector{RealT}})
@assert Base.precompile(Tuple{typeof(Trixi.barycentric_weights), Vector{RealT}})
@assert Base.precompile(Tuple{typeof(Trixi.calc_lhat), RealT, Vector{RealT},
Vector{RealT}})
@assert Base.precompile(Tuple{typeof(Trixi.lagrange_interpolating_polynomials),
RealT, Vector{RealT}, Vector{RealT}})
@assert Base.precompile(Tuple{typeof(Trixi.calc_q_and_l), Int, RealT})
@assert Base.precompile(Tuple{typeof(Trixi.legendre_polynomial_and_derivative), Int,
RealT})
@assert Base.precompile(Tuple{typeof(Trixi.vandermonde_legendre), Vector{RealT}})
end
@assert Base.precompile(Tuple{typeof(Trixi.gauss_lobatto_nodes_weights), Int})
@assert Base.precompile(Tuple{typeof(Trixi.gauss_nodes_weights), Int})
@assert Base.precompile(Tuple{typeof(Trixi.calc_forward_upper), Int})
@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}})
for RealT in (Float64,), polydeg in 1:7
nnodes_ = polydeg + 1
basis_type = basis_type_dgsem(RealT, nnodes_)
@assert Base.precompile(Tuple{typeof(Trixi.MortarL2), basis_type})
@assert Base.precompile(Tuple{Type{Trixi.SolutionAnalyzer}, basis_type})
@assert Base.precompile(Tuple{Type{Trixi.AdaptorL2}, basis_type})
end
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{(:analysis_interval,), Tuple{Int}},
Type{AliveCallback}})
for RealT in (Float64,)
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{(:cfl,), Tuple{RealT}},
Type{StepsizeCallback}})
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{(:glm_scale, :cfl), Tuple{RealT, RealT}},
Type{GlmSpeedCallback}})
end
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
NamedTuple{(:interval, :save_final_restart),
Tuple{Int, Bool}}, Type{SaveRestartCallback}})
@assert Base.precompile(Tuple{Core.kwftype(typeof(Trixi.Type)),
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,
:save_final_solution, :solution_variables),
Tuple{Int, Bool, Bool, typeof(cons2prim)}},
Type{SaveSolutionCallback}})
@assert Base.precompile(Tuple{typeof(SummaryCallback)})
@assert Base.precompile(Tuple{typeof(summary_box), Base.TTY, String,
Vector{Pair{String, Any}}})
for RealT in (Float64,), polydeg in 1:7
uEltype = RealT
nnodes_ = polydeg + 1
mortar_type = mortar_type_dgsem(RealT, nnodes_)
@assert Base.precompile(Tuple{typeof(Trixi.init_boundaries), Array{Int, 1},
TreeMesh{1, Trixi.SerialTree{1}, RealT},
Trixi.ElementContainer1D{RealT, uEltype}})
@assert Base.precompile(Tuple{typeof(Trixi.init_interfaces), Array{Int, 1},
TreeMesh{1, Trixi.SerialTree{1}, RealT},
Trixi.ElementContainer1D{RealT, uEltype}})
@assert Base.precompile(Tuple{typeof(Trixi.save_mesh_file),
TreeMesh{1, Trixi.SerialTree{1}, RealT}, String})
@assert Base.precompile(Tuple{typeof(Trixi.init_boundaries), Array{Int, 1},
TreeMesh{2, Trixi.SerialTree{2}, RealT},
Trixi.ElementContainer2D{RealT, uEltype}})
@assert Base.precompile(Tuple{typeof(Trixi.init_interfaces), Array{Int, 1},
TreeMesh{2, Trixi.SerialTree{2}, RealT},
Trixi.ElementContainer2D{RealT, uEltype}})
@assert Base.precompile(Tuple{typeof(Trixi.init_mortars), Array{Int, 1},
TreeMesh{2, Trixi.SerialTree{2}, RealT},
Trixi.ElementContainer2D{RealT, uEltype},
mortar_type})
@assert Base.precompile(Tuple{typeof(Trixi.save_mesh_file),
TreeMesh{2, Trixi.SerialTree{2}, RealT}, String})
@assert Base.precompile(Tuple{typeof(Trixi.init_boundaries), Array{Int, 1},
TreeMesh{2, Trixi.ParallelTree{2}, RealT},
Trixi.ElementContainer2D{RealT, uEltype}})
@assert Base.precompile(Tuple{typeof(Trixi.init_interfaces), Array{Int, 1},
TreeMesh{2, Trixi.ParallelTree{2}, RealT},
Trixi.ElementContainer2D{RealT, uEltype}})
@assert Base.precompile(Tuple{typeof(Trixi.init_mortars), Array{Int, 1},
TreeMesh{2, Trixi.ParallelTree{2}, RealT},
Trixi.ElementContainer2D{RealT, uEltype},
mortar_type})
@assert Base.precompile(Tuple{typeof(Trixi.init_mpi_interfaces), Array{Int, 1},
TreeMesh{2, Trixi.ParallelTree{2}, RealT},
Trixi.ElementContainer2D{RealT, uEltype}})
@assert Base.precompile(Tuple{typeof(Trixi.save_mesh_file),
TreeMesh{2, Trixi.ParallelTree{2}, RealT}, String})
@assert Base.precompile(Tuple{typeof(Trixi.init_boundaries), Array{Int, 1},
TreeMesh{3, Trixi.SerialTree{3}, RealT},
Trixi.ElementContainer3D{RealT, uEltype}})
@assert Base.precompile(Tuple{typeof(Trixi.init_interfaces), Array{Int, 1},
TreeMesh{3, Trixi.SerialTree{3}, RealT},
Trixi.ElementContainer3D{RealT, uEltype}})
@assert Base.precompile(Tuple{typeof(Trixi.init_mortars), Array{Int, 1},
TreeMesh{3, Trixi.SerialTree{3}, RealT},
Trixi.ElementContainer3D{RealT, uEltype},
mortar_type})
@assert Base.precompile(Tuple{typeof(Trixi.save_mesh_file),
TreeMesh{3, Trixi.SerialTree{3}, RealT}, String})
end
for RealT in (Float64,)
for NDIMS in 1:3
@assert Base.precompile(Tuple{typeof(show), Base.TTY,
TreeMesh{NDIMS, Trixi.SerialTree{NDIMS}, RealT}})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY},
MIME"text/plain",
TreeMesh{NDIMS, Trixi.SerialTree{NDIMS}, RealT}})
@assert Base.precompile(Tuple{typeof(show), Base.TTY,
TreeMesh{NDIMS, Trixi.ParallelTree{NDIMS}, RealT}})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY},
MIME"text/plain",
TreeMesh{NDIMS, Trixi.ParallelTree{NDIMS}, RealT}})
end
for eq_type in equations_types(RealT)
@assert Base.precompile(Tuple{typeof(show), Base.TTY, eq_type})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY},
MIME"text/plain", eq_type})
end
for polydeg in 1:1
nnodes_ = polydeg + 1
basis_type = basis_type_dgsem(RealT, nnodes_)
mortar_type = mortar_type_dgsem(RealT, nnodes_)
analyzer_type = analyzer_type_dgsem(RealT, nnodes_)
adaptor_type = adaptor_type_dgsem(RealT, nnodes_)
@assert Base.precompile(Tuple{typeof(show), Base.TTY, basis_type})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY},
MIME"text/plain", basis_type})
@assert Base.precompile(Tuple{typeof(show), Base.TTY, mortar_type})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY},
MIME"text/plain", mortar_type})
@assert Base.precompile(Tuple{typeof(show), Base.TTY, analyzer_type})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY},
MIME"text/plain", analyzer_type})
@assert Base.precompile(Tuple{typeof(show), Base.TTY, adaptor_type})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY},
MIME"text/plain", adaptor_type})
@assert Base.precompile(Tuple{typeof(show), Base.TTY,
DG{basis_type, mortar_type,
typeof(flux_lax_friedrichs),
VolumeIntegralWeakForm}})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY},
MIME"text/plain",
DG{basis_type, mortar_type,
typeof(flux_lax_friedrichs),
VolumeIntegralWeakForm}})
end
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY}, MIME"text/plain",
SemidiscretizationHyperbolic})
end
@assert Base.precompile(Tuple{typeof(init_mpi)})
@assert Base.precompile(Tuple{typeof(init_p4est)})
return nothing
end
using PrecompileTools: @setup_workload, @compile_workload
@setup_workload begin
@compile_workload begin
DGSEM(3)
end
end