Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiManyer committed Jan 13, 2025
1 parent 2297590 commit 36192f6
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions src/Geometry/BoundaryTriangulations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -237,24 +237,16 @@ function get_facet_normal(trian::BoundaryTriangulation, face_glue::FaceToCellGlu
Fields.MemoArray(face_s_n)
end

function get_edge_tangent(trian::BoundaryTriangulation, boundary_trian_glue::FaceToCellGlue)
face_s_n = get_facet_normal(trian, boundary_trian_glue)
get_edge_tangent(trian::BoundaryTriangulation) = get_edge_tangent(trian, trian.glue)

function get_edge_tangent(trian::BoundaryTriangulation, glue)
@notimplementedif Dp != 2 "get_edge_tangent only implemented for 2D"
face_s_n = get_facet_normal(trian, glue)
rotate_normal_2d(n) = VectorValue(n[2], -n[1])
face_s_t = lazy_map(Operation(rotate_normal_2d), face_s_n)
return Fields.MemoArray(face_s_t)
end

function get_edge_tangent(trian::BoundaryTriangulation{Dc,Dp,A,<:FaceToCellGlue}) where {Dc,Dp,A}
Dp != 2 && error("get_edge_tangent only implemented for 2D")
glue = trian.glue
get_edge_tangent(trian, glue)
end

function get_facet_normal(trian::BoundaryTriangulation{Dc,Dp,A,<:FaceToCellGlue}) where {Dc,Dp,A}
glue = trian.glue
get_facet_normal(trian, glue)
end

function push_normal(invJt,n)
v = invJtn
m = sqrt(inner(v,v))
Expand Down

0 comments on commit 36192f6

Please sign in to comment.