Path: blob/main/src/solvers/dgsem_p4est/subcell_limiters.jl
5616 views
# By default, Julia/LLVM does not use fused multiply-add operations (FMAs).1# Since these FMAs can increase the performance of many numerical algorithms,2# we need to opt-in explicitly.3# See https://ranocha.de/blog/Optimizing_EC_Trixi for further details.4@muladd begin5#! format: noindent67###############################################################################8# Auxiliary routine `get_boundary_outer_state` for non-periodic domains910"""11get_boundary_outer_state(u_inner, t,12boundary_condition::BoundaryConditionDirichlet,13normal_direction14mesh, equations, dg, cache, indices...)15For subcell limiting, the calculation of local bounds for non-periodic domains requires the boundary16outer state. This function returns the boundary value for [`BoundaryConditionDirichlet`](@ref) at17time `t` and for node with spatial indices `indices` at the boundary with `normal_direction`.1819Should be used together with [`P4estMesh`](@ref).2021!!! warning "Experimental implementation"22This is an experimental feature and may change in future releases.23"""24@inline function get_boundary_outer_state(u_inner, t,25boundary_condition::BoundaryConditionDirichlet,26normal_direction,27mesh::P4estMesh,28equations, dg, cache, indices...)29(; node_coordinates) = cache.elements3031x = get_node_coords(node_coordinates, equations, dg, indices...)32u_outer = boundary_condition.boundary_value_function(x, t, equations)3334return u_outer35end36end # @muladd373839