Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
trixi-framework
GitHub Repository: trixi-framework/Trixi.jl
Path: blob/main/src/callbacks_step/lbm_collision_dg3d.jl
2055 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
function apply_collision!(u, dt, collision_op,
9
mesh::AbstractMesh{3}, equations, dg::DG, cache)
10
@threaded for element in eachelement(dg, cache)
11
for k in eachnode(dg), j in eachnode(dg), i in eachnode(dg)
12
u_node = get_node_vars(u, equations, dg, i, j, k, element)
13
update = collision_op(u_node, dt, equations)
14
add_to_node_vars!(u, update, equations, dg, i, j, k, element)
15
end
16
end
17
18
return nothing
19
end
20
end # @muladd
21
22