Created
November 2, 2022 16:17
-
-
Save tehrengruber/ed5421eb7420a1b1bb8dcde86136fa50 to your computer and use it in GitHub Desktop.
Upstream Advection Stencil IR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__field_operator_fvm_advect( | |
__sym_1, | |
__sym_2, | |
__sym_3, | |
__sym_4, | |
__sym_5, | |
__sym_6, | |
__sym_7, | |
__sym_8, | |
__sym_9, | |
__sym_10, | |
out, | |
____sym_1_size_0, | |
____sym_3_size_0, | |
____sym_4_size_0, | |
____sym_5_size_0, | |
____sym_6_size_0, | |
____sym_7_size_0, | |
____sym_8_size_0, | |
____sym_8_size_1, | |
____sym_9_size_0, | |
____sym_10_size_0, | |
__out_size_0 | |
) { | |
out ← ( | |
λ( | |
rho, | |
dt, | |
vol, | |
gac, | |
vel_x, | |
vel_y, | |
pole_edge_mask, | |
dual_face_orientation, | |
dual_face_normal_weighted_x, | |
dual_face_normal_weighted_y | |
) → | |
·rho | |
- ·dt / (·vol × ·gac) | |
× reduce(plus, 0, V2EDimₒ)( | |
(↑(λ(__arg0_______, __arg1_______) → ·__arg0_______ × ·__arg1_______))( | |
translate_shift(V2EDimₒ, V2Eₒ)( | |
(↑(λ(__arg0, __arg1, __arg2, __arg3, __arg4, __arg5) → | |
(λ(_cs_1) → if _cs_1 > 0.0 then ·⟪E2Vₒ, 0⟫(__arg0) × _cs_1 else ·⟪E2Vₒ, 1⟫(__arg0) × _cs_1)( | |
(λ(_cs_2) → | |
0.5 × (·⟪E2Vₒ, 0⟫(__arg1) + _cs_2 × ·⟪E2Vₒ, 1⟫(__arg1)) × ·__arg4 | |
+ (if ·__arg3 then 0.0 else 0.5 × (·⟪E2Vₒ, 0⟫(__arg2) + _cs_2 × ·⟪E2Vₒ, 1⟫(__arg2))) × ·__arg5)( | |
if ·__arg3 then 0 - 1.0 else 1.0 | |
) | |
)))(rho, vel_x, vel_y, pole_edge_mask, dual_face_normal_weighted_x, dual_face_normal_weighted_y) | |
), dual_face_orientation | |
) | |
) | |
)(__sym_1, __sym_2, __sym_3, __sym_4, __sym_5, __sym_6, __sym_7, __sym_8, __sym_9, __sym_10) @ u⟨ Vertex: [0, __out_size_0) ⟩; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment