Skip to content

Add extruded wedge element map - #120

Draft
abhiyanpaudel wants to merge 59 commits into
SCOREC:mainfrom
abhiyanpaudel:extruded-wedge
Draft

abhiyanpaudel wants to merge 59 commits into
SCOREC:mainfrom
abhiyanpaudel:extruded-wedge

Conversation

@abhiyanpaudel

@abhiyanpaudel abhiyanpaudel commented Oct 28, 2026 •

Copy link
Copy Markdown

Adds element maps for wedge meshes built by stacking a 2D Omega_h triangle mesh into layers. Every plane uses the 2D mesh's vertex numbering and triangle connectivity. The caller sets the coordinates.

Depends on #116 and #118. Until they merge, this diff includes their commits.

Changes (MeshField::Omegah, src/MeshField.hpp)

  • getExtrudedWedgeElement<ShapeOrder>(mesh2d, numLayers, periodic, reverseOrientation):
    returns the shape and element map, for LinearWedgeShape (1) or
    LinearCubicWedgeShape (3).
  • getExtrudedWedgeMeshInfo(mesh2d, numLayers, periodic): entity counts for creating the field.
  • Supports open and periodic stacks; reverseOrientation flips the sign of det J.

Tests

New ExtrudedWedgeTest checks DOF ids, field positions, volumes and det J orientation for linear and cubic wedges.

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 28, 2026 20:46

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