Path: blob/main/src/callbacks_step/lbm_collision_dg2d.jl
2055 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: noindent67function apply_collision!(u, dt, collision_op,8mesh::AbstractMesh{2}, equations, dg::DG, cache)9@threaded for element in eachelement(dg, cache)10for j in eachnode(dg), i in eachnode(dg)11u_node = get_node_vars(u, equations, dg, i, j, element)12update = collision_op(u_node, dt, equations)13add_to_node_vars!(u, update, equations, dg, i, j, element)14end15end1617return nothing18end19end # @muladd202122