We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 660894d + 926cf05 commit 2bb62faCopy full SHA for 2bb62fa
src/utils/utilities.jl
@@ -58,11 +58,13 @@ individual velocity components:
58
cell centers, and
59
- `uᵥ` should be a `Covariant3Vector`-valued field at cell faces.
60
"""
61
-function compute_kinetic(uₕ::Fields.Field, uᵥ::Fields.Field)
+function compute_kinetic(uₕ, uᵥ)
62
@assert eltype(uₕ) <: Union{C1, C2, C12}
63
@assert eltype(uᵥ) <: C3
64
+ FT = Spaces.undertype(axes(uₕ))
65
+ onehalf = FT(1 / 2)
66
return @. lazy(
- 1 / 2 * (
67
+ onehalf * (
68
dot(C123(uₕ), CT123(uₕ)) +
69
ᶜinterp(dot(C123(uᵥ), CT123(uᵥ))) +
70
2 * dot(CT123(uₕ), ᶜinterp(C123(uᵥ)))
0 commit comments