Skip to content

Commit f16c15f

Browse files
committed
define fallback set_approximation_variables! for JET.jl
1 parent 2e841f9 commit f16c15f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/solver.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ Create a solver, where the three summation-by-parts (SBP) first-, second-, and t
5757
are of accuracy order `accuracy_order` and associated to the `mesh`.
5858
5959
!!! warning "Periodic operators only"
60-
This constructor creates periodic derivative operators that are only compatible with periodic
61-
boundary conditions. For non-periodic boundary conditions, use the `Solver(D1, D2, D3)`
60+
This constructor creates periodic derivative operators that are only compatible with periodic
61+
boundary conditions. For non-periodic boundary conditions, use the `Solver(D1, D2, D3)`
6262
constructor with appropriate non-periodic operators (or `nothing`).
6363
"""
6464
function Solver(mesh, accuracy_order)
@@ -150,6 +150,12 @@ function compute_coefficients!(q, func, t, mesh,
150150
end
151151
end
152152

153+
# `set_approximation_variables!` is defined for equations, which are hyperbolic
154+
# approximations, but below it is called for `equations` for which the compiler
155+
# doesn't know from type annotations that these are hyperbolic approximations.
156+
# Therefore, JET.jl fails. We provide a fallback definition here that does nothing.
157+
set_approximation_variables!(q, mesh, equations, solver) = nothing
158+
153159
# For a hyperbolic approximation, we allow returning either the full set
154160
# of variables or a reduced number determining only the limit system.
155161
# In the second case, we compute the remaining variables using the default

0 commit comments

Comments
 (0)