@@ -10,24 +10,26 @@ function Trixi.rhs!(du, u, t,
1010 equations:: AbstractCovariantEquations{2} ,
1111 boundary_conditions, source_terms:: Source ,
1212 dg:: DG , cache) where {Source}
13+ backend = trixi_backend (u)
14+
1315 # Reset du
1416 Trixi. @trixi_timeit Trixi. timer () " reset ∂u/∂t" Trixi. set_zero! (du, dg, cache)
1517
1618 # Calculate volume integral
1719 Trixi. @trixi_timeit Trixi. timer () " volume integral" begin
18- Trixi. calc_volume_integral! (du, u, mesh,
20+ Trixi. calc_volume_integral! (backend, du, u, mesh,
1921 Trixi. have_nonconservative_terms (equations),
2022 equations, dg. volume_integral, dg, cache)
2123 end
2224
2325 # Prolong solution to interfaces
2426 Trixi. @trixi_timeit Trixi. timer () " prolong2interfaces" begin
25- Trixi. prolong2interfaces! (cache, u, mesh, equations, dg)
27+ Trixi. prolong2interfaces! (backend, cache, u, mesh, equations, dg)
2628 end
2729
2830 # Calculate interface fluxes
2931 Trixi. @trixi_timeit Trixi. timer () " interface flux" begin
30- Trixi. calc_interface_flux! (cache. elements. surface_flux_values, mesh,
32+ Trixi. calc_interface_flux! (backend, cache. elements. surface_flux_values, mesh,
3133 Trixi. have_nonconservative_terms (equations),
3234 equations, dg. surface_integral, dg, cache)
3335 end
@@ -48,12 +50,14 @@ function Trixi.rhs!(du, u, t,
4850
4951 # Calculate surface integrals
5052 Trixi. @trixi_timeit Trixi. timer () " surface integral" begin
51- Trixi. calc_surface_integral! (du, u, mesh, equations, dg. surface_integral, dg,
53+ Trixi. calc_surface_integral! (backend, du, u, mesh, equations,
54+ dg. surface_integral, dg,
5255 cache)
5356 end
5457
5558 # Apply Jacobian from mapping to reference element
56- Trixi. @trixi_timeit Trixi. timer () " Jacobian" Trixi. apply_jacobian! (du, mesh,
59+ Trixi. @trixi_timeit Trixi. timer () " Jacobian" Trixi. apply_jacobian! (backend, du,
60+ mesh,
5761 equations, dg,
5862 cache)
5963
9296
9397# Weak form kernel which uses contravariant flux components, passing the geometric
9498# information contained in the auxiliary variables to the flux function
95- @inline function Trixi. weak_form_kernel! (du, u, element, mesh :: P4estMesh{2} ,
99+ @inline function Trixi. weak_form_kernel! (du, u, element, :: Type{<: P4estMesh{2} } ,
96100 nonconservative_terms:: False ,
97101 equations:: AbstractCovariantEquations{2} ,
98102 dg:: DGSEM , cache, alpha = true )
126130
127131# Flux differencing kernel which uses contravariant flux components, passing the geometric
128132# information contained in the auxiliary variables to the flux function
129- @inline function Trixi. flux_differencing_kernel! (du, u, element, mesh :: P4estMesh{2} ,
133+ @inline function Trixi. flux_differencing_kernel! (du, u, element, :: Type{<: P4estMesh{2} } ,
130134 nonconservative_terms:: False ,
131135 equations:: AbstractCovariantEquations{2} ,
132136 volume_flux, dg:: DGSEM , cache,
180184# Non-conservative flux differencing kernel which uses contravariant flux components,
181185# passing the geometric information contained in the auxiliary variables to the flux
182186# function
183- @inline function Trixi. flux_differencing_kernel! (du, u, element, mesh:: P4estMesh{2} ,
187+ @inline function Trixi. flux_differencing_kernel! (du, u, element,
188+ MeshT:: Type{<:P4estMesh{2}} ,
184189 nonconservative_terms:: True ,
185190 equations:: AbstractCovariantEquations{2} ,
186191 volume_flux, dg:: DGSEM , cache,
190195 symmetric_flux, nonconservative_flux = volume_flux
191196
192197 # Apply the symmetric flux as usual
193- Trixi. flux_differencing_kernel! (du, u, element, mesh , False (), equations,
198+ Trixi. flux_differencing_kernel! (du, u, element, MeshT , False (), equations,
194199 symmetric_flux, dg, cache, alpha)
195200
196201 for j in eachnode (dg), i in eachnode (dg)
230235# Calculate the interface flux directly in the local coordinate system. This function
231236# differs from the standard approach in Trixi.jl in that one does not need to pass the
232237# normal vector to the pointwise flux calculation.
233- function Trixi. calc_interface_flux! (surface_flux_values,
238+ function Trixi. calc_interface_flux! (backend :: Nothing , surface_flux_values,
234239 mesh:: P4estMesh{2} ,
235240 nonconservative_terms,
236241 equations:: AbstractCovariantEquations{2} ,
@@ -452,7 +457,7 @@ function Trixi.calc_sources!(du, u, t, source_terms::Nothing,
452457end
453458
454459# Apply the exact Jacobian stored in auxiliary variables
455- function Trixi. apply_jacobian! (du, mesh:: P4estMesh{2} ,
460+ function Trixi. apply_jacobian! (backend :: Nothing , du, mesh:: P4estMesh{2} ,
456461 equations:: AbstractCovariantEquations{2} ,
457462 dg:: DG , cache)
458463 (; aux_node_vars) = cache. auxiliary_variables
0 commit comments