diff --git a/src/solvers/dgsem_tree/subcell_limiters_2d.jl b/src/solvers/dgsem_tree/subcell_limiters_2d.jl index 0a778aa8813..0055b2181b0 100644 --- a/src/solvers/dgsem_tree/subcell_limiters_2d.jl +++ b/src/solvers/dgsem_tree/subcell_limiters_2d.jl @@ -686,28 +686,28 @@ end end # Initial checks -function initial_check_entropy_spec(bound, goal, newton_abstol) +@inline function initial_check_entropy_spec(bound, goal, newton_abstol) goal <= max(newton_abstol, abs(bound) * newton_abstol) end -function initial_check_entropy_math(bound, goal, newton_abstol) +@inline function initial_check_entropy_math(bound, goal, newton_abstol) goal >= -max(newton_abstol, abs(bound) * newton_abstol) end -initial_check_nonnegative(bound, goal, newton_abstol) = goal <= 0 +@inline initial_check_nonnegative(bound, goal, newton_abstol) = goal <= 0 # Goal and d(Goal)d(u) function -goal_function(variable, bound, u, equations) = bound - variable(u, equations) -function dgoal_function(variable, u, dt, antidiffusive_flux, equations) +@inline goal_function(variable, bound, u, equations) = bound - variable(u, equations) +@inline function dgoal_function(variable, u, dt, antidiffusive_flux, equations) -dot(variable(u, equations, True()), dt * antidiffusive_flux) end # Final check -function final_check_standard(bound, goal, newton_abstol) +@inline function final_check_standard(bound, goal, newton_abstol) abs(goal) < max(newton_abstol, abs(bound) * newton_abstol) end -function final_check_nonnegative(bound, goal, newton_abstol) +@inline function final_check_nonnegative(bound, goal, newton_abstol) (goal <= eps()) && (goal > -max(newton_abstol, abs(bound) * newton_abstol)) end