Skip to content

Commit

Permalink
Change parametrization to use Quadrangles instead of Triangles
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeingold committed Jan 20, 2025
1 parent 7397284 commit b92b18e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/geometries/polytopes/wedge.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ function (wedge::Wedge)(u, v, w)
throw(DomainError((u, v, w), "wedge(u, v, w) is not defined for u, v, w outside [0, 1]³."))
end
a1, a2, a3, b1, b2, b3 = vertices(wedge)
a = Triangle(a1, a2, a3)
b = Triangle(b1, b2, b3)
s = Segment(a(T(u), T(v)), b(T(u), T(v)))
a = Quadrangle(a1, b1, b2, a2)
b = Quadrangle(a1, b1, b3, a3)
uv = T(u), T(v)
s = Segment(a(uv...), b(uv...))
s(T(w))
end
end
2 changes: 1 addition & 1 deletion test/polytopes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ end
@test crs(w) <: Cartesian{NoDatum}
@test Meshes.lentype(w) ==
@test volume(w) T(1 / 2) * u"m^3"
@test w(T(0), T(0), T(1)) == vertices(w)[4]
@test w(T(1), T(1), T(1)) == vertices(w)[6]
@test_throws DomainError w(T(0), T(0), T(1.5))
m = boundary(w)
@test m isa Mesh
Expand Down

0 comments on commit b92b18e

Please sign in to comment.