Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
trixi-framework
GitHub Repository: trixi-framework/Trixi.jl
Path: blob/main/src/solvers/dgsem_unstructured/dg.jl
5590 views
1
# By default, Julia/LLVM does not use fused multiply-add operations (FMAs).
2
# Since these FMAs can increase the performance of many numerical algorithms,
3
# we need to opt-in explicitly.
4
# See https://ranocha.de/blog/Optimizing_EC_Trixi for further details.
5
@muladd begin
6
#! format: noindent
7
8
@inline function get_one_sided_surface_node_vars(u, equations, solver::DG, j,
9
indices...)
10
# There is a cut-off at `n == 10` inside of the method
11
# `ntuple(f::F, n::Integer) where F` in Base at ntuple.jl:17
12
# in Julia `v1.5`, leading to type instabilities if
13
# more than ten variables are used. That's why we use
14
# `Val(...)` below.
15
u_surface = SVector(ntuple(v -> u[j, v, indices...], Val(nvariables(equations))))
16
return u_surface
17
end
18
19
# 2D unstructured DG implementation
20
include("mappings_geometry_curved_2d.jl")
21
include("mappings_geometry_straight_2d.jl")
22
include("containers_2d.jl")
23
include("sort_boundary_conditions.jl")
24
include("dg_2d.jl")
25
include("indicators_2d.jl")
26
end # @muladd
27
28