Repository navigation
Create warped lattices on pyramids - #1099
Closed
garth-wells wants to merge 1 commit into
Closed
garth-wells wants to merge 1 commit into
garth-wells wants to merge 1 commit into
Conversation
Points on a pyramid could only be equispaced; any other lattice type raised "Non-equispaced points on pyramids not supported yet". Add the warp-and-blend construction of Hesthaven and Warburton, Nodal Discontinuous Galerkin Methods, pp. 175-180, so that a pyramid can carry GLL points. Each point is displaced by a blend of the one-dimensional warps along the eight edges: four that meet at the apex and two directions of the base. The blending factors are chosen so that the points on the quadrilateral base are those of create_quad and the points on each triangular face are those of create_tri_warped, which is what lets a mesh mix pyramids with hexahedra and tetrahedra. Face selecting functions interpolate between adjacent triangular faces, and are only evaluated away from the edges on which they are undefined. The warp is evaluated through a Lagrange basis, so it vanishes at the ends of an edge only up to rounding. On a triangle a blending factor damps the displacement at a vertex and the residual is harmless, but the pyramid blending factors all degenerate to one at the apex, where the residuals would otherwise accumulate and move the apex off the cell by a few epsilon. The pyramid polyset is expressed in the collapsed coordinates x / (1 - z) and y / (1 - z), so a point above the apex tabulates to nonsense. warp_function_zero_ends subtracts the linear interpolant of the two endpoint residuals, which makes the displacement exactly zero at both ends. Isaac's points and the centroid method are not implemented on a pyramid and still raise. The methods all agree for n <= 3, so the unspecified method is accepted there. Pyramids are re-enabled in the two cell-to-cell continuity tests, in the lattice test for warped GLL points, and in the gll_warped entries of the shared element list. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
Author
|
Duplicate of #1098, which has the same four files with an identical diff. Closing this one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Points on a pyramid could only be equispaced; any other lattice type raised
Non-equispaced points on pyramids not supported yet. This adds the warp-and-blend construction of Hesthaven and Warburton, Nodal Discontinuous Galerkin Methods, pp. 175-180, so that a pyramid can carry GLL points.Construction
Each point is displaced by a blend of the one-dimensional warps along the eight edges of the pyramid: the four that meet at the apex, and the two directions of the base. The warp arguments and blending weights are accumulated for every point first, so the warp function, which solves a dense system, is evaluated once.
The blending factors are chosen so that
create_quad, andcreate_tri_warped,which is what lets a mesh mix pyramids with hexahedra and tetrahedra. Face selecting functions interpolate between adjacent triangular faces, and are evaluated only away from the edges on which they are undefined.
Checked as point sets, at
n= 2, 3, 4, 5, 6 and 8: the base agrees with the quadrilateral lattice and all four triangular faces agree with the triangle lattice, to within 4e-16.Keeping the apex on the cell
The warp is evaluated through a Lagrange basis, so it vanishes at the ends of an edge only up to rounding. On a triangle a blending factor damps the displacement at a vertex and that residual is harmless, but the pyramid blending factors all degenerate to one at the apex, where the residuals would otherwise accumulate and move the apex off the cell by a few epsilon. Since the pyramid polyset is expressed in the collapsed coordinates
x / (1 - z)andy / (1 - z), a point above the apex tabulates to nonsense.warp_function_zero_endsevaluates the warp at the two endpoints alongside the requested points and subtracts the linear interpolant of the two residuals, so the displacement is exactly zero at both ends. The apex comes back as exactly(0, 0, 1)for everyntested, and every point lies inside the cell.Other simplex methods
Isaac's points and the centroid method are not implemented on a pyramid and still raise, with messages naming the method. The methods all agree for
n <= 3, sosimplex_method::noneis accepted there.Tests
Pyramids are re-enabled in
test_continuity_triangle_facetandtest_continuity_quadrilateral_facet, in the lattice test for warped GLL points, and in thegll_warpedentries of the shared element list intest/utils.py. Thegll_isaacentries move to a separate loop that still excludes pyramids.Python suite 10184 passed / 341 skipped / 23 xfailed; C++ suite 22/22;
ruffandclang-formatclean.🤖 Generated with Claude Code