Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jlchan committed Apr 4, 2023
2 parents 6ef9297 + 6a7c795 commit 02539cc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: CI
on:
pull_request:
branches:
- master
- main
push:
branches:
- master
- main
tags: '*'
jobs:
test:
Expand Down
9 changes: 4 additions & 5 deletions src/warpblend_interp_nodes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
"""
get_edge_list(elem::AbstractElemShape)
Returns list of edges for a specific element (elem = Tri(), Pyr(), or Tet()).
Returns list of edges for a specific element (elem = Tri(), Pyr(), Hex(), or Tet()).
"""
get_edge_list(elem::AbstractElemShape)

get_edge_list(::Tri) = SVector(1, 2), SVector(2, 3), SVector(3, 1)
get_edge_list(::Quad) = SVector(1, 2), SVector(2, 3), SVector(3, 4), SVector(4, 1) # not used directly but included for completeness
get_edge_list(elem::Union{Tri, Quad}) = SVector{2}.(find_face_nodes(elem, equi_nodes(elem, 1)...))
get_edge_list(::Tet) = SVector(1, 4), SVector(4, 3), SVector(3, 1), SVector(1, 2), SVector(3, 2), SVector(4, 2)
get_edge_list(::Pyr) = SVector(1, 2), SVector(2, 4), SVector(3, 4), SVector(3, 1), SVector(1, 5), SVector(2, 5), SVector(3, 5), SVector(4, 5)

Expand All @@ -26,7 +25,7 @@ get_edge_list(::Pyr) = SVector(1, 2), SVector(2, 4), SVector(3, 4), SVector(3,

get_edge_list(::Hex) = SVector(1, 5), SVector(3, 7), SVector(2, 6), SVector(4, 8),
SVector(1, 3), SVector(2, 4), SVector(1, 2), SVector(3, 4),
SVector(5, 7), SVector(6, 8), SVector(5, 6), SVector(7, 8)
SVector(5, 7), SVector(6, 8), SVector(5, 6), SVector(7, 8)


get_vertices(elem::AbstractElemShape) = equi_nodes(elem, 1)
Expand Down Expand Up @@ -91,7 +90,7 @@ function edge_basis(N, vertices, edges, basis1D, vertex_functions, rst...)
r1D_edge = V1[:,e[1]] - V1[:,e[2]]
V1D, _ = basis1D(N-2, r1D_edge)
for i in axes(V1D, 2)
V[:,id] = V1D[:,i] .* V1[:,e[1]] .* V1[:,e[2]]
V[:, id] = V1D[:, i] .* V1[:, e[1]] .* V1[:, e[2]]
id += 1
end
end
Expand Down
5 changes: 4 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ area(elem::Tri) = 2.0
Vq1D = vandermonde(Line(), N, quad_nodes(Line(), N)[1])
@test Vq kron(Vq1D, Vq1D)

@test NodesAndModes.get_edge_list(Quad()) == ([1,2], [2,3], [3,4], [4,1])
@test NodesAndModes.face_basis(Quad(), N, r, s) NodesAndModes.edge_basis(Quad(), N, r, s)

# check invertibility of face basis matrix
Fmask = hcat(NodesAndModes.find_face_nodes(Quad(), r, s)...)
@test cond(NodesAndModes.face_basis(Quad(), N, r[Fmask], s[Fmask])) < 1e3
end
end

Expand Down

2 comments on commit 02539cc

@jlchan
Copy link
Owner Author

@jlchan jlchan commented on 02539cc Apr 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/80963

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.2 -m "<description of version>" 02539cccef6a8c6fb8b266affc63d985f4d46cf8
git push origin v0.9.2

Please sign in to comment.