Skip to content

Add LinearCubicWedgeShape: wedge shape functions linear in the triangle, cubic in zeta - #116

Draft
abhiyanpaudel wants to merge 28 commits into
SCOREC:mainfrom
abhiyanpaudel:linear-cubic-wedge
Draft

abhiyanpaudel wants to merge 28 commits into
SCOREC:mainfrom
abhiyanpaudel:linear-cubic-wedge

Conversation

@abhiyanpaudel

@abhiyanpaudel abhiyanpaudel commented Oct 16, 2026 •

Copy link
Copy Markdown

Adds LinearCubicWedgeShape, a 12-node wedge that is linear in $(\xi_0, \xi_1)$ and cubic Lagrange in $\zeta$, for field-aligned wedge geometry. Depends on #113.

$$ N_a = L_a,\ell_0, \quad N_{a+3} = L_a,\ell_3, \quad N_{6+2a} = L_a,\ell_1, \quad N_{7+2a} = L_a,\ell_2, \qquad a = 0, 1, 2 $$

Here $\ell_k$ are the cubic Lagrange polynomials on $\zeta = -1, -\tfrac13, \tfrac13, 1$. Nodes 0–5 are the vertices, and nodes $6+2a$ and $7+2a$ sit on vertical edge $a$ at $\zeta = \mp\tfrac13$.

Changes

  • src/MeshField_Shape.hpp: add LinearCubicWedgeShape
  • test/testCubicWedgeShape.cpp (new): Kronecker delta, partition of unity, exact reproduction of $\mathrm{span}\lbrace 1, \xi_0, \xi_1 \rbrace \times \lbrace 1, \zeta, \zeta^2, \zeta^3 \rbrace$ and gradients check
  • CMakeLists.txt: register CubicWedgeShapeTest

Add Wedge to Mesh_Topology and numWedge to MeshInfo for wedge
(triangular prism) elements. Wedge is appended after Pyramid so no
existing enum value changes; Prism and numPrism are unchanged.
LinearWedgeShape is the linear wedge (triangular prism): the tensor
product of the linear triangle in (xi0, xi1) and the linear edge in
zeta in [-1, 1]. Nodes 0-2 are the triangle vertices at zeta = -1 and
nodes 3-5 those at zeta = +1, following Zienkiewicz, Taylor and Zhu,
Section 6.4, Fig. 6.16a.

test/testWedgeShape.cpp checks the Kronecker delta property at the
nodes and, at interior points, partition of unity, reproduction of
the bilinear functions spanned by the basis and their gradients, and
the analytic gradients against finite differences.

test/testWedgeElement.cpp builds a FieldElement from a coordinate
field, LinearWedgeShape and a small wedge-to-vertex map, and checks
MeshField::evaluate, getJacobians and getJacobianDeterminants on a
right prism and a skewed wedge against the geometric map written out
by hand.
Add LinearCubicWedgeShape, a 12-node wedge with a linear triangle basis in
(xi0, xi1) and a cubic Lagrange basis in zeta. The shape is the tensor
product of the two.

Nodes 0-5 match LinearWedgeShape: triangle vertices at zeta = -1 and +1.
Nodes 6-11 are two interior nodes on each vertical edge, at zeta = -1/3 and
+1/3, so each edge carries two DOFs. The struct declares DofHolders
{Vertex, Edge}, NumDofHolders {6, 3}, DofsPerHolder {1, 2}, and Order = 3.

The cubic functions are the Lagrange interpolants on the stations -1, -1/3,
1/3, 1. Gradients use their analytic derivatives.
@abhiyanpaudel
abhiyanpaudel marked this pull request as draft October 16, 2026 18:31

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant