Skip to content

Commit

Permalink
Merge branch 'main' into VariableCFL
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDoehring authored Jan 31, 2025
2 parents 23ca754 + 900322e commit 4258041
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 35 deletions.
34 changes: 16 additions & 18 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Trixi"
uuid = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb"
authors = ["Michael Schlottke-Lakemper <[email protected]>", "Gregor Gassner <[email protected]>", "Hendrik Ranocha <[email protected]>", "Andrew R. Winters <[email protected]>", "Jesse Chan <[email protected]>"]
version = "0.9.15-DEV"
version = "0.9.16-DEV"

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
Expand All @@ -16,7 +16,6 @@ EllipsisNotation = "da5c29d0-fa7d-589e-88eb-ea29b0a81949"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LinearMaps = "7a12625a-238d-50fd-b39a-03d52299707e"
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
Expand Down Expand Up @@ -64,50 +63,49 @@ TrixiMakieExt = "Makie"
TrixiNLsolveExt = "NLsolve"

[compat]
Accessors = "0.1.12"
Accessors = "0.1.36"
CodeTracking = "1.0.5"
ConstructionBase = "1.3"
ConstructionBase = "1.5"
Convex = "0.16"
DataStructures = "0.18.15"
DelimitedFiles = "1"
DiffEqBase = "6 - 6.143"
DiffEqCallbacks = "2.25"
DiffEqCallbacks = "2.35"
Downloads = "1.6"
ECOS = "1.1.2"
EllipsisNotation = "1.0"
FillArrays = "0.13.2, 1"
FillArrays = "1.9"
ForwardDiff = "0.10.24"
HDF5 = "0.16.10, 0.17"
IfElse = "0.1"
LinearAlgebra = "1"
LinearMaps = "2.7, 3.0"
LoopVectorization = "0.12.151"
MPI = "0.20.6"
Makie = "0.19, 0.20"
Makie = "0.21, 0.22"
MuladdMacro = "0.2.2"
NLsolve = "4.5.1"
Octavian = "0.3.21"
OffsetArrays = "1.12"
OffsetArrays = "1.13"
P4est = "0.4.12"
Polyester = "0.7.10"
PrecompileTools = "1.1"
PrecompileTools = "1.2"
Preferences = "1.3"
Printf = "1"
RecipesBase = "1.1"
RecursiveArrayTools = "2.38.10"
RecipesBase = "1.3.4"
RecursiveArrayTools = "3.27.1"
Reexport = "1.0"
Requires = "1.1"
SciMLBase = "1.90, 2"
SciMLBase = "2.67.0"
SimpleUnPack = "1.1"
SparseArrays = "1"
StableRNGs = "1.0.2"
StartUpDG = "0.17.7, 1.1.5"
Static = "0.8.7"
StartUpDG = "1.1.5"
Static = "0.8.7, 1"
StaticArrayInterface = "1.4"
StaticArrays = "1.5"
StaticArrays = "1.7"
StrideArrays = "0.1.26"
StructArrays = "0.6.11"
SummationByPartsOperators = "0.5.41"
StructArrays = "0.6.18"
SummationByPartsOperators = "0.5.52"
T8code = "0.7.4"
TimerOutputs = "0.5.7"
Triangulate = "2.2"
Expand Down
4 changes: 2 additions & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Changelog = "5217a498-cd5d-4ec6-b8c2-9b85a09b6e3e"
Convex = "f65535da-76fb-5f13-bab9-19810c17039a"
ECOS = "e2685f51-7e38-5353-a97d-a921fd2c8199"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
ECOS = "e2685f51-7e38-5353-a97d-a921fd2c8199"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
HOHQMesh = "e4f4c7b8-17cb-445a-93c5-f69190ed6c8c"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
Expand All @@ -16,7 +16,7 @@ Trixi2Vtk = "bc1476a1-1ca6-4cc3-950b-c312b255ff95"
TrixiBase = "9a0f1c46-06d5-4909-a5a3-ce25d3fa3284"

[compat]
CairoMakie = "0.6, 0.7, 0.8, 0.9, 0.10, 0.11"
CairoMakie = "0.12, 0.13"
Changelog = "1.1"
Convex = "0.16"
Documenter = "1"
Expand Down
4 changes: 2 additions & 2 deletions ext/TrixiMakieExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ function iplot(pd::PlotData2DTriangulated;

# On OSX, shift-command-4 for screenshots triggers a constant "up-zoom".
# To avoid this, we remap up-zoom to the right shift button instead.
Makie.cameracontrols(ax.scene).attributes[:up_key][] = Makie.Keyboard.right_shift
Makie.cameracontrols(ax.scene).controls.up_key = Makie.Keyboard.right_shift

# typing this pulls up the figure (similar to display(plot!()) in Plots.jl)
fig
Expand Down Expand Up @@ -340,7 +340,7 @@ function Makie.plot!(myplot::TrixiHeatmap)

pd = pds.plot_data
solution_z = vec(StructArrays.component(pd.data, pds.variable_id))
Makie.mesh!(myplot, plotting_mesh, color = solution_z, shading = false,
Makie.mesh!(myplot, plotting_mesh, color = solution_z, shading = Makie.NoShading,
colormap = myplot[:colormap])
myplot.colorrange = extrema(solution_z)

Expand Down
1 change: 0 additions & 1 deletion src/Trixi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ using DiffEqCallbacks: PeriodicCallback, PeriodicCallbackAffect
using FillArrays: Ones, Zeros
using ForwardDiff: ForwardDiff
using HDF5: HDF5, h5open, attributes, create_dataset, datatype, dataspace
using IfElse: ifelse
using LinearMaps: LinearMap
using LoopVectorization: LoopVectorization, @turbo, indices
using StaticArrayInterface: static_length # used by LoopVectorization
Expand Down
24 changes: 16 additions & 8 deletions src/auxiliary/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ function _precompile_manual_()
@assert Base.precompile(Tuple{DiscreteCallback{typeof(Trixi.summary_callback),
typeof(Trixi.summary_callback),
typeof(Trixi.initialize_summary_callback),
typeof(SciMLBase.FINALIZE_DEFAULT)}})
typeof(SciMLBase.FINALIZE_DEFAULT),
typeof(nothing)}})
@assert Base.precompile(Tuple{typeof(summary_box), Base.TTY, String,
Vector{Pair{String, Any}}})
# TODO: AMRCallback, ControllerThreeLevel, indicators
Expand Down Expand Up @@ -523,7 +524,8 @@ function _precompile_manual_()
summary_callback_type = DiscreteCallback{typeof(Trixi.summary_callback),
typeof(Trixi.summary_callback),
typeof(Trixi.initialize_summary_callback),
typeof(SciMLBase.FINALIZE_DEFAULT)}
typeof(SciMLBase.FINALIZE_DEFAULT),
typeof(nothing)}
@assert Base.precompile(Tuple{typeof(show), Base.TTY, summary_callback_type})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY}, MIME"text/plain",
summary_callback_type})
Expand All @@ -533,14 +535,16 @@ function _precompile_manual_()

alive_callback_type = DiscreteCallback{AliveCallback, AliveCallback,
typeof(Trixi.initialize!),
typeof(SciMLBase.FINALIZE_DEFAULT)}
typeof(SciMLBase.FINALIZE_DEFAULT),
typeof(nothing)}
@assert Base.precompile(Tuple{typeof(show), Base.TTY, alive_callback_type})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY}, MIME"text/plain",
alive_callback_type})

restart_callback_type = DiscreteCallback{SaveRestartCallback, SaveRestartCallback,
typeof(Trixi.initialize!),
typeof(SciMLBase.FINALIZE_DEFAULT)}
typeof(SciMLBase.FINALIZE_DEFAULT),
typeof(nothing)}
@assert Base.precompile(Tuple{typeof(show), Base.TTY, restart_callback_type})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY}, MIME"text/plain",
restart_callback_type})
Expand All @@ -549,7 +553,8 @@ function _precompile_manual_()
save_solution_callback_type = DiscreteCallback{SaveSolutionCallback{typeof(solution_variables)},
SaveSolutionCallback{typeof(solution_variables)},
typeof(Trixi.initialize!),
typeof(SciMLBase.FINALIZE_DEFAULT)}
typeof(SciMLBase.FINALIZE_DEFAULT),
typeof(nothing)}
@assert Base.precompile(Tuple{typeof(show), Base.TTY,
save_solution_callback_type})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY},
Expand All @@ -561,23 +566,26 @@ function _precompile_manual_()
stepsize_callback_type = DiscreteCallback{StepsizeCallback{RealT},
StepsizeCallback{RealT},
typeof(Trixi.initialize!),
typeof(SciMLBase.FINALIZE_DEFAULT)}
typeof(SciMLBase.FINALIZE_DEFAULT),
typeof(nothing)}
@assert Base.precompile(Tuple{typeof(show), Base.TTY, stepsize_callback_type})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY}, MIME"text/plain",
stepsize_callback_type})

glm_speed_callback_type = DiscreteCallback{GlmSpeedCallback{RealT},
GlmSpeedCallback{RealT},
typeof(Trixi.initialize!),
typeof(SciMLBase.FINALIZE_DEFAULT)}
typeof(SciMLBase.FINALIZE_DEFAULT),
typeof(nothing)}
@assert Base.precompile(Tuple{typeof(show), Base.TTY, glm_speed_callback_type})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY}, MIME"text/plain",
glm_speed_callback_type})

lbm_collision_callback_type = DiscreteCallback{typeof(Trixi.lbm_collision_callback),
typeof(Trixi.lbm_collision_callback),
typeof(Trixi.initialize!),
typeof(SciMLBase.FINALIZE_DEFAULT)}
typeof(SciMLBase.FINALIZE_DEFAULT),
typeof(nothing)}
@assert Base.precompile(Tuple{typeof(show), Base.TTY, lbm_collision_callback_type})
@assert Base.precompile(Tuple{typeof(show), IOContext{Base.TTY}, MIME"text/plain",
lbm_collision_callback_type})
Expand Down
10 changes: 10 additions & 0 deletions src/solvers/dgsem_p4est/dg_parallel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ end

@inline Base.eltype(::P4estMPICache{uEltype}) where {uEltype} = uEltype

##
# Note that the code in `start_mpi_send`/`finish_mpi_receive!` is sensitive to inference on (at least) Julia 1.10.
# Julia's inference is bi-stable, it can sometimes depend on what code has been looked at already, and
# the presence of an inference result in the cache can have an impact on the inference of code.
# In this case the `send_buffer[first:last] .= vec(cache.mpi_mortars.u[2, :, :, ..,mortar])`,
# can fail to be inferred due to heuristics if this function is not in the cache...
precompile(Base.reindex,
(Tuple{Base.Slice{Base.OneTo{Int64}}, Int64, Base.Slice{Base.OneTo{Int64}},
Base.Slice{Base.OneTo{Int64}}, Int64}, Tuple{Int64, Int64, Int64}))

function start_mpi_send!(mpi_cache::P4estMPICache, mesh, equations, dg, cache)
data_size = nvariables(equations) * nnodes(dg)^(ndims(mesh) - 1)
n_small_elements = 2^(ndims(mesh) - 1)
Expand Down
4 changes: 2 additions & 2 deletions src/visualization/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#
# Note: This is an experimental feature and may be changed in future releases without notice.
#! format: off
const TrixiODESolution = Union{ODESolution{T, N, uType, uType2, DType, tType, rateType, P} where
{T, N, uType, uType2, DType, tType, rateType, P<:ODEProblem{uType_, tType_, isinplace, P_, F_} where
const TrixiODESolution = Union{ODESolution{T, N, uType, uType2, DType, tType, rateType, discType, P} where
{T, N, uType, uType2, DType, tType, rateType, discType, P<:ODEProblem{uType_, tType_, isinplace, P_, F_} where
{uType_, tType_, isinplace, P_<:AbstractSemidiscretization, F_}}, TimeIntegratorSolution}
#! format: on

Expand Down
4 changes: 2 additions & 2 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Aqua = "0.8"
CairoMakie = "0.10"
CairoMakie = "0.12, 0.13"
Convex = "0.16"
DelimitedFiles = "1"
DoubleFloats = "1.4.0"
Expand All @@ -34,7 +34,7 @@ ForwardDiff = "0.10.24"
LinearAlgebra = "1"
MPI = "0.20.6"
NLsolve = "4.5.1"
OrdinaryDiffEq = "6.49.1"
OrdinaryDiffEq = "6.66"
Plots = "1.19"
Printf = "1"
Quadmath = "0.5.10"
Expand Down

0 comments on commit 4258041

Please sign in to comment.