Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
c364bc4
Use SciMLOperators for IMEX with linear part
DanielDoehring Nov 27, 2025
ebd5b2f
test
DanielDoehring Nov 27, 2025
47dd6a2
bf
DanielDoehring Nov 27, 2025
2b4678b
Merge branch 'main' into MatrixOperatorIMEX
DanielDoehring Nov 27, 2025
d467843
cp
DanielDoehring Nov 27, 2025
9c3ba03
Merge branch 'MatrixOperatorIMEX' of github.com:DanielDoehring/Trixi.…
DanielDoehring Nov 27, 2025
cf59962
compat
DanielDoehring Nov 27, 2025
ecbf0d3
sciml base
DanielDoehring Nov 27, 2025
ac63659
cp
DanielDoehring Nov 27, 2025
7fe1660
cp
DanielDoehring Nov 27, 2025
bac340c
cp
DanielDoehring Nov 27, 2025
61d375f
revert
DanielDoehring Nov 27, 2025
3ef1310
f
DanielDoehring Nov 27, 2025
be88afe
cp
DanielDoehring Nov 27, 2025
83b2dad
cp
DanielDoehring Nov 27, 2025
236c5f8
cp
DanielDoehring Nov 27, 2025
9120892
cp
DanielDoehring Nov 27, 2025
4db9379
cp
DanielDoehring Nov 27, 2025
2ced411
cp
DanielDoehring Nov 27, 2025
006eb6b
Apply suggestions from code review
DanielDoehring Nov 27, 2025
885644f
Update test/Project.toml
DanielDoehring Nov 27, 2025
3897d6c
restrict sciml compact bounds
DanielDoehring Nov 27, 2025
376e451
relieve
DanielDoehring Nov 27, 2025
5bfc670
v
DanielDoehring Nov 27, 2025
66d8cfc
up
DanielDoehring Nov 27, 2025
5da16ce
up
DanielDoehring Nov 27, 2025
33748a3
up
DanielDoehring Nov 27, 2025
585e95d
rev
DanielDoehring Nov 27, 2025
042b1df
1
DanielDoehring Nov 27, 2025
5e1c5e2
cp
DanielDoehring Nov 27, 2025
d41294f
add base explicitly
DanielDoehring Nov 28, 2025
ad10cfd
Update src/semidiscretization/semidiscretization_hyperbolic_parabolic.jl
DanielDoehring Nov 28, 2025
d5cf05c
rev
DanielDoehring Nov 30, 2025
6646b37
rev
DanielDoehring Nov 30, 2025
d92804c
compat
DanielDoehring Nov 30, 2025
02d6fb5
Merge branch 'MatrixOperatorIMEX' of github.com:DanielDoehring/Trixi.…
DanielDoehring Nov 30, 2025
2c78429
Merge branch 'main' into MatrixOperatorIMEX
DanielDoehring Nov 30, 2025
b903d31
rm
DanielDoehring Nov 30, 2025
c3fe575
Merge branch 'MatrixOperatorIMEX' of github.com:DanielDoehring/Trixi.…
DanielDoehring Nov 30, 2025
8917be3
rev
DanielDoehring Nov 30, 2025
5f4d595
cp
DanielDoehring Nov 30, 2025
f391536
rev
DanielDoehring Nov 30, 2025
5392ac1
cp
DanielDoehring Nov 30, 2025
46123e1
up
DanielDoehring Nov 30, 2025
68602a0
Update examples/tree_2d_dgsem/elixir_advection_diffusion_imex_operato…
DanielDoehring Dec 1, 2025
6e0264b
Update examples/tree_2d_dgsem/elixir_advection_diffusion_imex_operato…
DanielDoehring Dec 1, 2025
dfbe22e
Merge branch 'main' into MatrixOperatorIMEX
DanielDoehring Dec 1, 2025
4c10ef5
Merge branch 'main' into MatrixOperatorIMEX
DanielDoehring Dec 2, 2025
d01ac3f
Update test/Project.toml
DanielDoehring Dec 3, 2025
a73c0f1
Merge branch 'main' into MatrixOperatorIMEX
DanielDoehring Dec 3, 2025
446f643
Merge branch 'main' into MatrixOperatorIMEX
DanielDoehring Dec 3, 2025
fb9c973
reduce changes
DanielDoehring Dec 4, 2025
0c2229f
Merge branch 'MatrixOperatorIMEX' of github.com:DanielDoehring/Trixi.…
DanielDoehring Dec 4, 2025
96360a3
try
DanielDoehring Dec 4, 2025
b0f1342
bump rat
DanielDoehring Dec 4, 2025
462d5a8
bump
DanielDoehring Dec 4, 2025
11fa94e
fix
DanielDoehring Dec 4, 2025
ed58b54
bump
DanielDoehring Dec 4, 2025
24a2e43
sbp
DanielDoehring Dec 4, 2025
46c74f4
cb
DanielDoehring Dec 4, 2025
1171f1f
dg
DanielDoehring Dec 4, 2025
6bbd558
hdf5
DanielDoehring Dec 4, 2025
7be2b94
8
DanielDoehring Dec 4, 2025
b9765be
lv
DanielDoehring Dec 4, 2025
69ce7c3
pref
DanielDoehring Dec 4, 2025
94d5c16
up
DanielDoehring Dec 4, 2025
7686ec5
up
DanielDoehring Dec 4, 2025
814bcff
cm
DanielDoehring Dec 4, 2025
107fa72
DS
DanielDoehring Dec 4, 2025
be86246
adt
DanielDoehring Dec 4, 2025
6220f4b
static
DanielDoehring Dec 4, 2025
c03ff9b
mk
DanielDoehring Dec 4, 2025
d92bc16
ka
DanielDoehring Dec 4, 2025
88ecc02
FA
DanielDoehring Dec 4, 2025
60d5531
p
DanielDoehring Dec 4, 2025
4787762
mpi
DanielDoehring Dec 4, 2025
5e873ad
doc
DanielDoehring Dec 4, 2025
dc63b53
Update src/equations/equations_parabolic.jl
DanielDoehring Dec 4, 2025
4a7b9ae
Merge branch 'main' into MatrixOperatorIMEX
DanielDoehring Dec 4, 2025
bee8a9b
Merge branch 'main' into MatrixOperatorIMEX
DanielDoehring Dec 4, 2025
58fa6b4
Merge branch 'main' into MatrixOperatorIMEX
DanielDoehring Dec 4, 2025
30859e0
Merge branch 'main' into MatrixOperatorIMEX
DanielDoehring Dec 6, 2025
3da48f3
Update src/Trixi.jl
DanielDoehring Dec 6, 2025
54e87f3
be precise
DanielDoehring Dec 6, 2025
73fb5fa
rwrite
DanielDoehring Dec 6, 2025
afe59d1
adapt
DanielDoehring Dec 6, 2025
00f525f
Update src/semidiscretization/semidiscretization_hyperbolic_parabolic.jl
DanielDoehring Dec 6, 2025
439e8da
fmt
DanielDoehring Dec 6, 2025
e4dce4a
Merge branch 'MatrixOperatorIMEX' of https://github.com/DanielDoehrin…
DanielDoehring Dec 6, 2025
4c7ca5e
Apply suggestions from code review
DanielDoehring Dec 7, 2025
775db13
revert
DanielDoehring Dec 7, 2025
9036f62
Merge branch 'MatrixOperatorIMEX' of https://github.com/DanielDoehrin…
DanielDoehring Dec 7, 2025
5057d40
Update Project.toml
DanielDoehring Dec 7, 2025
3d6bd2a
Update test/Project.toml
DanielDoehring Dec 7, 2025
6f714e2
core
DanielDoehring Dec 7, 2025
0a71bf4
Merge branch 'MatrixOperatorIMEX' of https://github.com/DanielDoehrin…
DanielDoehring Dec 7, 2025
2d4e9a3
bump
DanielDoehring Dec 7, 2025
0934c06
bump
DanielDoehring Dec 7, 2025
34f904e
base
DanielDoehring Dec 7, 2025
b4eb001
bp
DanielDoehring Dec 7, 2025
8251d4f
up
DanielDoehring Dec 7, 2025
d0ec119
bump
DanielDoehring Dec 7, 2025
7afb8e3
try
DanielDoehring Dec 7, 2025
7f9e250
bump
DanielDoehring Dec 7, 2025
a0b2027
fix
DanielDoehring Dec 7, 2025
8b2ac55
fix
DanielDoehring Dec 8, 2025
84cc62e
check limear APE
DanielDoehring Dec 8, 2025
6f6873c
elaborate
DanielDoehring Dec 8, 2025
2902199
Merge branch 'main' into MatrixOperatorIMEX
DanielDoehring Dec 8, 2025
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
10 changes: 5 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ TrixiSparseConnectivityTracerExt = "SparseConnectivityTracer"

[compat]
Accessors = "0.1.36"
Adapt = "4"
CUDA = "5.8"
Adapt = "4.1"
CUDA = "5.8.2"
CodeTracking = "1.0.5, 2, 3"
ConstructionBase = "1.5"
Convex = "0.16"
DataStructures = "0.18.15, 0.19"
DelimitedFiles = "1"
DiffEqBase = "6.155.2"
DiffEqBase = "6.174"
DiffEqCallbacks = "2.35, 3, 4"
Downloads = "1.6"
ECOS = "1.1.2"
Expand All @@ -89,7 +89,7 @@ KernelAbstractions = "0.9.36"
LinearAlgebra = "1"
LinearMaps = "2.7, 3.0"
LoopVectorization = "0.12.171"
MPI = "0.20.6"
MPI = "0.20.22"
Makie = "0.21, 0.22, 0.23, 0.24"
MuladdMacro = "0.2.4"
NLsolve = "4.5.1"
Expand All @@ -104,7 +104,7 @@ RecipesBase = "1.3.4"
RecursiveArrayTools = "3.31.1"
Reexport = "1.2"
Requires = "1.3"
SciMLBase = "2.67.0"
SciMLBase = "2.92.0"
SimpleUnPack = "1.1"
SparseArrays = "1"
SparseConnectivityTracer = "1.0.1"
Expand Down
74 changes: 74 additions & 0 deletions examples/tree_2d_dgsem/elixir_advection_diffusion_imex_operator.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
using OrdinaryDiffEqSDIRK
using SciMLBase, SciMLOperators, SparseArrays
using Trixi

###############################################################################
# semidiscretization of the linear advection-diffusion equation

advection_velocity = (1.5, 1.0)
equations = LinearScalarAdvectionEquation2D(advection_velocity)
diffusivity() = 0.5f0
equations_parabolic = LaplaceDiffusion2D(diffusivity(), equations)

solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs)

coordinates_min = (-1.0, -1.0)
coordinates_max = (1.0, 1.0)

mesh = TreeMesh(coordinates_min, coordinates_max,
initial_refinement_level = 4,
periodicity = true,
n_cells_max = 30_000)

function initial_condition_diffusive_convergence_test(x, t,
equation::LinearScalarAdvectionEquation2D)
# Store translated coordinate for easy use of exact solution
RealT = eltype(x)
x_trans = x - equation.advection_velocity * t

nu = diffusivity()
c = 1
A = 0.5f0
L = 2
f = 1.0f0 / L
omega = 2 * convert(RealT, pi) * f
scalar = c + A * sin(omega * sum(x_trans)) * exp(-2 * nu * omega^2 * t)
return SVector(scalar)
end
initial_condition = initial_condition_diffusive_convergence_test

semi = SemidiscretizationHyperbolicParabolic(mesh,
(equations, equations_parabolic),
initial_condition, solver)

###############################################################################
# ODE setup

tspan = (0.0, 0.5)
ode = semidiscretize(semi, tspan) # For accessing the initial condition u0 only

D_map, _ = linear_structure_parabolic(semi)
# Cannot directly construct `MatrixOperator` from `LinearMap`, need detour via sparse matrix
D_op = MatrixOperator(sparse(D_map))

split_func = SplitFunction(D_op, Trixi.rhs!)
ode_operator = SplitODEProblem{true}(split_func, ode.u0, tspan, semi)

###############################################################################
# Callbacks

summary_callback = SummaryCallback()

analysis_interval = 1000
analysis_callback = AnalysisCallback(semi, interval = analysis_interval)

alive_callback = AliveCallback(analysis_interval = analysis_interval)

callbacks = CallbackSet(summary_callback, analysis_callback, alive_callback)

###############################################################################
# run the simulation

sol = solve(ode_operator, KenCarp4();
adaptive = false, dt = 1e-2,
ode_default_options()..., callback = callbacks)
3 changes: 2 additions & 1 deletion src/Trixi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ export entropy, energy_total, energy_kinetic, energy_internal,
enstrophy, vorticity
export lake_at_rest_error
export ncomponents, eachcomponent
export have_constant_speed

export TreeMesh, StructuredMesh, StructuredMeshView, UnstructuredMesh2D, P4estMesh,
P4estMeshView, P4estMeshCubedSphere, T8codeMesh
Expand Down Expand Up @@ -321,7 +322,7 @@ export ode_norm, ode_unstable_check

export convergence_test,
jacobian_fd, jacobian_ad_forward, jacobian_ad_forward_parabolic,
linear_structure
linear_structure, linear_structure_parabolic

export DGMulti, DGMultiBasis, estimate_dt, DGMultiMesh, GaussSBP

Expand Down
18 changes: 18 additions & 0 deletions src/equations/acoustic_perturbation_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,24 @@ end
return SVector(diss[1], diss[2], diss[3], z, z, z, z)
end

"""
have_constant_speed(::AcousticPerturbationEquations2D)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref).

The acoustic perturbation equations are in principle linear for **constant** mean flow fields.
However, the mean flow variables are part of the solution vector in
[`AcousticPerturbationEquations2D`](@ref) and only the **global** mean flow variables are constant,
similar to the [`LinearizedEulerEquations2D`](@ref).

Moreover, when coupling to the [`CompressibleEulerEquations2D`](@ref) equations via
[`SemidiscretizationEulerAcoustics`](@ref), the mean field variables are updated
on the fly, see [`EulerAcousticsCouplingCallback`](@ref).

# Returns
- `False()`
"""
@inline have_constant_speed(::AcousticPerturbationEquations2D) = False()

@inline function max_abs_speeds(u, equations::AcousticPerturbationEquations2D)
Expand Down
5 changes: 4 additions & 1 deletion src/equations/compressible_navier_stokes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,16 @@ dynamic_viscosity(u, mu::Real, equations) = mu
dynamic_viscosity(u, mu::T, equations) where {T} = mu(u, equations)

"""
max_diffusivity(::AbstractCompressibleNavierStokesDiffusion)
have_constant_diffusivity(::AbstractCompressibleNavierStokesDiffusion)

# Returns
- `False()`

Used in diffusive CFL condition computation (see [`StepsizeCallback`](@ref)) to indicate that the
diffusivity is not constant in space and that [`max_diffusivity`](@ref) needs to be computed
at every node in every element.

Also employed in [`linear_structure`](@ref) and [`linear_structure_parabolic`](@ref) to check
if the diffusion term is linear in the variables/constant.
"""
@inline have_constant_diffusivity(::AbstractCompressibleNavierStokesDiffusion) = False()
11 changes: 11 additions & 0 deletions src/equations/equations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,17 @@ See also the test section P4estMesh2D with combine_conservative_and_nonconservat
"""
combine_conservative_and_nonconservative_fluxes(flux, ::AbstractEquations) = False()

"""
have_constant_speed(::AbstractEquations)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref).

This is the default fallback for nonlinear equations.

# Returns
- `False()`
"""
have_constant_speed(::AbstractEquations) = False()

"""
Expand Down
5 changes: 4 additions & 1 deletion src/equations/equations_parabolic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ abstract type AbstractLaplaceDiffusion{NDIMS, NVARS} <:
AbstractEquationsParabolic{NDIMS, NVARS, GradientVariablesConservative} end

"""
max_diffusivity(::AbstractLaplaceDiffusion)
have_constant_diffusivity(::AbstractLaplaceDiffusion)

# Returns
- `True()`

Used in diffusive CFL condition computation (see [`StepsizeCallback`](@ref)) to indicate that the
diffusivity is constant in space and that [`max_diffusivity`](@ref) needs **not** to be re-computed
at every node in every element.

Also employed in [`linear_structure`](@ref) and [`linear_structure_parabolic`](@ref) to check
if the diffusion term is linear in the variables/constant.
"""
@inline have_constant_diffusivity(::AbstractLaplaceDiffusion) = True()

Expand Down
9 changes: 9 additions & 0 deletions src/equations/hyperbolic_diffusion_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,15 @@ end
return sqrt(equations.nu * equations.inv_Tr)
end

"""
have_constant_speed(::HyperbolicDiffusionEquations1D)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref) and [`linear_structure`](@ref).

# Returns
- `True()`
"""
@inline have_constant_speed(::HyperbolicDiffusionEquations1D) = True()

@inline function max_abs_speeds(eq::HyperbolicDiffusionEquations1D)
Expand Down
9 changes: 9 additions & 0 deletions src/equations/hyperbolic_diffusion_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,15 @@ end
return SVector(f1, f2, f3)
end

"""
have_constant_speed(::HyperbolicDiffusionEquations2D)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref) and [`linear_structure`](@ref).

# Returns
- `True()`
"""
@inline have_constant_speed(::HyperbolicDiffusionEquations2D) = True()

@inline function max_abs_speeds(eq::HyperbolicDiffusionEquations2D)
Expand Down
9 changes: 9 additions & 0 deletions src/equations/hyperbolic_diffusion_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,15 @@ Godunov (upwind) flux for the 3D hyperbolic diffusion equations.
return SVector(f1, f2, f3, f4)
end

"""
have_constant_speed(::HyperbolicDiffusionEquations3D)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref) and [`linear_structure`](@ref).

# Returns
- `True()`
"""
@inline have_constant_speed(::HyperbolicDiffusionEquations3D) = True()

@inline function max_abs_speeds(eq::HyperbolicDiffusionEquations3D)
Expand Down
9 changes: 9 additions & 0 deletions src/equations/lattice_boltzmann_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,15 @@ Collision operator for the Bhatnagar, Gross, and Krook (BGK) model.
return -(u - equilibrium_distribution(u, equations)) / (tau + 0.5f0)
end

"""
have_constant_speed(::LatticeBoltzmannEquations2D)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref) and [`linear_structure`](@ref).

# Returns
- `True()`
"""
@inline have_constant_speed(::LatticeBoltzmannEquations2D) = True()

@inline function max_abs_speeds(equations::LatticeBoltzmannEquations2D)
Expand Down
9 changes: 9 additions & 0 deletions src/equations/lattice_boltzmann_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,15 @@ Collision operator for the Bhatnagar, Gross, and Krook (BGK) model.
return -(u - equilibrium_distribution(u, equations)) / (tau + 0.5f0)
end

"""
have_constant_speed(::LatticeBoltzmannEquations3D)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref) and [`linear_structure`](@ref).

# Returns
- `True()`
"""
@inline have_constant_speed(::LatticeBoltzmannEquations3D) = True()

@inline function max_abs_speeds(equations::LatticeBoltzmannEquations3D)
Expand Down
9 changes: 9 additions & 0 deletions src/equations/linear_elasticity_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ end
return SVector(f1, f2)
end

"""
have_constant_speed(::LinearElasticityEquations1D)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref) and [`linear_structure`](@ref).

# Returns
- `True()`
"""
@inline have_constant_speed(::LinearElasticityEquations1D) = True()

@inline function max_abs_speed_naive(u_ll, u_rr, orientation::Integer,
Expand Down
9 changes: 9 additions & 0 deletions src/equations/linear_scalar_advection_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,15 @@ function flux_engquist_osher(u_ll, u_rr, orientation::Int,
abs(equation.advection_velocity[orientation]) * (u_R - u_L)))
end

"""
have_constant_speed(::LinearScalarAdvectionEquation1D)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref) and [`linear_structure`](@ref).

# Returns
- `True()`
"""
@inline have_constant_speed(::LinearScalarAdvectionEquation1D) = True()

@inline function max_abs_speeds(equation::LinearScalarAdvectionEquation1D)
Expand Down
9 changes: 9 additions & 0 deletions src/equations/linear_scalar_advection_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,15 @@ function flux_godunov(u_ll, u_rr, normal_direction::AbstractVector,
end
end

"""
have_constant_speed(::LinearScalarAdvectionEquation2D)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref) and [`linear_structure`](@ref).

# Returns
- `True()`
"""
@inline have_constant_speed(::LinearScalarAdvectionEquation2D) = True()

@inline function max_abs_speeds(equation::LinearScalarAdvectionEquation2D)
Expand Down
9 changes: 9 additions & 0 deletions src/equations/linear_scalar_advection_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,15 @@ function flux_godunov(u_ll, u_rr, normal_direction::AbstractVector,
end
end

"""
have_constant_speed(::LinearScalarAdvectionEquation3D)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref) and [`linear_structure`](@ref).

# Returns
- `True()`
"""
@inline have_constant_speed(::LinearScalarAdvectionEquation3D) = True()

@inline function max_abs_speeds(equation::LinearScalarAdvectionEquation3D)
Expand Down
9 changes: 9 additions & 0 deletions src/equations/linearized_euler_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,15 @@ end
return SVector(f1, f2, f3)
end

"""
have_constant_speed(::LinearizedEulerEquations1D)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref) and [`linear_structure`](@ref).

# Returns
- `True()`
"""
@inline have_constant_speed(::LinearizedEulerEquations1D) = True()

@inline function max_abs_speeds(equations::LinearizedEulerEquations1D)
Expand Down
9 changes: 9 additions & 0 deletions src/equations/linearized_euler_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,15 @@ end
return SVector(f1, f2, f3, f4)
end

"""
have_constant_speed(::LinearizedEulerEquations2D)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref) and [`linear_structure`](@ref).

# Returns
- `True()`
"""
@inline have_constant_speed(::LinearizedEulerEquations2D) = True()

@inline function max_abs_speeds(equations::LinearizedEulerEquations2D)
Expand Down
9 changes: 9 additions & 0 deletions src/equations/linearized_euler_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ end
return SVector(f1, f2, f3, f4, f5)
end

"""
have_constant_speed(::LinearizedEulerEquations3D)

Indicates whether the characteristic speeds are constant, i.e., independent of the solution.
Queried in the timestep computation [`StepsizeCallback`](@ref) and [`linear_structure`](@ref).

# Returns
- `True()`
"""
@inline have_constant_speed(::LinearizedEulerEquations3D) = True()

@inline function max_abs_speeds(equations::LinearizedEulerEquations3D)
Expand Down
Loading
Loading