Skip to content

Correct the surface integration of triangles, tetrahedra and hexahedra - #114

Merged
lxmota merged 1 commit into
mainfrom
tri-face-jacobian
Sep 26, 2026
Merged

lxmota merged 1 commit into
mainfrom
tri-face-jacobian

Conversation

@lxmota

@lxmota lxmota commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Three defects in the surface quadrature, all found by integrating a traction over element faces:

  1. MappedH1OrL2SurfaceInterpolants divided |t1 × t2| by the reference triangle area 1/2, but |t1 × t2| is already twice the physical triangle area, so the Jacobian of every triangular face was twice the face area and every traction on a tetrahedron face was doubled. The ratio of physical to reference area is |t1 × t2| for a triangle and |t1 × t2|/4 for a quadrilateral, whose t2 is the diagonal.
  2. The surface quadrature points of hexahedron faces 1, 3, 5 and 6 lay on faces 5, 6, 1 and 3 of face_vertices (the Exodus side order), and the tabulated normals followed the same wrong order; the Gauss-Lobatto rule also left face 6 unassigned. A traction on those faces was integrated with the shape functions of the wrong face, at about half its value.
  3. The edge quadrature points of triangle edges 1 and 3 used the coordinate −1 of an unshifted edge on the shifted reference triangle, so they lay outside the element.

Tests: the surface Jacobian integrates to the face area on every face of the linear, quadratic and enriched tetrahedra and of the hexahedron (reference and affine image); on every face of every element the shape functions of the face nodes sum to one at the face quadrature points; the tabulated normals of the tetrahedron and hexahedron equal the geometric face normals. Version 0.14.8.

@codecov

codecov Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.79%. Comparing base (093047e) to head (ad587b4).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
+ Coverage   63.53%   64.79%   +1.26%     
==========================================
  Files          13       13              
  Lines        1744     1744              
==========================================
+ Hits         1108     1130      +22     
+ Misses        636      614      -22     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Three defects in the surface quadrature, all found by integrating a
traction over element faces:

1. MappedH1OrL2SurfaceInterpolants divided |t1 × t2| by the reference
   triangle area 1/2, but |t1 × t2| is already twice the physical
   triangle area, so the Jacobian of every triangular face was twice the
   face area and every traction on a tetrahedron face was doubled.  The
   ratio of physical to reference area is |t1 × t2| for a triangle and
   |t1 × t2|/4 for a quadrilateral, whose t2 is the diagonal.

2. The surface quadrature points of hexahedron faces 1, 3, 5 and 6 lay on
   faces 5, 6, 1 and 3 of face_vertices (the Exodus side order), and the
   tabulated normals followed the same wrong order; the Gauss-Lobatto rule
   also left face 6 unassigned.  A traction on those faces was integrated
   with the shape functions of the wrong face, at about half its value.

3. The edge quadrature points of triangle edges 1 and 3 used the
   coordinate -1 of an unshifted edge on the shifted reference triangle,
   so they lay outside the element.

The tests integrate the surface Jacobian over every face of the linear,
quadratic and enriched tetrahedra and of the hexahedron, on the
reference element and on an affine image, and compare with the face
area; check on every face of every element that the shape functions of
the face nodes sum to one at the face quadrature points; and check the
tabulated normals of the tetrahedron and hexahedron against the face
geometry.

Signed-off-by: Alejandro Mota <amota@sandia.gov>
@lxmota lxmota changed the title Correct the surface Jacobian of triangular faces Correct the surface integration of triangles, tetrahedra and hexahedra Sep 26, 2026
@lxmota
lxmota merged commit 201fd9a into main Sep 26, 2026
7 checks passed
@lxmota
lxmota deleted the tri-face-jacobian branch September 26, 2026 18:47
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