Skip to content

Commit

Permalink
Update surface_conditions.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
glwagner authored and juliasloan25 committed May 17, 2024
1 parent 065c532 commit 4675e07
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/surface_conditions/surface_conditions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -404,16 +404,16 @@ function atmos_surface_conditions(
)
end

@inline surface_normal(𝒢::Geometry.LocalGeometry) = C3(unit_basis_vector_data(C3, 𝒢))
@inline surface_normal(G::Geometry.LocalGeometry) = C3(unit_basis_vector_data(C3, G))

@inline scalar_flux(flux, ) = flux *
@inline scalar_flux(flux, 𝒢::Geometry.LocalGeometry) = scalar_flux(flux, surface_normal(𝒢))
@inline scalar_flux(flux, n) = flux * n
@inline scalar_flux(flux, G::Geometry.LocalGeometry) = scalar_flux(flux, surface_normal(G))

@inline function vector_flux(σxz, σyz, 𝒢, n̂=surface_normal(𝒢))
x̂ẑ = CT12(CT1(unit_basis_vector_data(CT1, 𝒢)), 𝒢)
ŷẑ = CT12(CT2(unit_basis_vector_data(CT2, 𝒢)), 𝒢)
σ = C12(σxz * x̂ẑ + σyz * ŷẑ, 𝒢)
return σ
@inline function vector_flux(σxz, σyz, G, n=surface_normal(G))
xz = CT12(CT1(unit_basis_vector_data(CT1, G)), G)
yz = CT12(CT2(unit_basis_vector_data(CT2, G)), G)
σ = C12(σxz * xz + σyz * xz, G)
return n σ
end

"""
Expand Down

0 comments on commit 4675e07

Please sign in to comment.