Repository navigation
Variational smoother quadrature changes - #4544
Merged
roystgnr merged 2 commits intoSep 11, 2026
Merged
Conversation
The VariationalSmootherSystem integrates the distortion-dilation metric
using the default Gauss rule, whose points lie in the element interior.
That rule cannot detect a degeneracy that is localized at an element
corner: a quad can collapse toward one of its nodes (an "hourglass",
looking like a triangle) while the interior quadrature points still
report positive Jacobians, so the metric is not penalized and the mesh
is not flagged as tangled.
Add a way to integrate the metric with a quadrature rule whose points
include the element vertices (e.g. QTRAP, QSIMPSON, QNODAL,
QGAUSS_LOBATTO), so that a folding corner drives the metric up and is
detected. This is exposed as:
FEMContext::use_quadrature_rules(QuadratureType, extra_order)
- a sibling of use_default_quadrature_rules / use_unweighted_...,
building the requested rule type for each element/side/edge dim.
VariationalSmootherSystem::set_quadrature_type(QuadratureType)
- applied in init_context() after the base setup; the System's
extra_quadrature_order still controls the point count. Defaults
to QGAUSS, so existing behavior is unchanged.
VariationalMeshSmoother::set_quadrature_type(QuadratureType)
- plumbs the option through the high-level wrapper.
refs libMesh#4543
Co-Authored-By: Claude <noreply@anthropic.com>
GiudGiud
commented
Sep 9, 2026
| * it should be. Must be called before smooth()/setup(). See | ||
| * VariationalSmootherSystem::set_quadrature_type() for details and caveats. | ||
| */ | ||
| void set_quadrature_type(QuadratureType qt) { _quadrature_type = qt; } |
Contributor
Author
There was a problem hiding this comment.
I think this all I need from MOOSE side
|
Job Coverage, step Generate coverage on fd8d302 wanted to post the following: CoverageInconsistent report tags were found between the head and base reports. Inconsistent tags: This comment will be updated on new commits. |
Contributor
Author
|
Test failure unrelated. |
roystgnr
requested changes
Sep 10, 2026
roystgnr
left a comment
Member
There was a problem hiding this comment.
This is good enough as-is but I'm wondering if we can simplify the tests a bit
Add testVariationalQuadratureHourglass, which reads a mixed QUAD4/TRI3 patch built around a pinned hub node (meshes/quad4_tri3_hourglass.xda.gz) and smooths it two ways: - With the default Gauss rule, a quad folds into an hourglass; the mesh is not flagged as tangled because the interior Gauss points stay positive. - With QNODAL (set via VariationalMeshSmoother::set_quadrature_type), the metric is sampled at the element vertices, so no element folds. The fold is detected with Elem::has_invertible_map(), whose default implementation evaluates the map Jacobian at the element nodes and returns false if any nodal Jacobian is non-positive. Co-Authored-By: Claude <noreply@anthropic.com>
GiudGiud
force-pushed
the
variational-smoother-quadrature
branch
from
September 10, 2026 22:39
e400c5f to
fd8d302
Compare
roystgnr
approved these changes
Sep 11, 2026
rochi00
added a commit
to rochi00/libmesh
that referenced
this pull request
Sep 29, 2026
This also picks up meshes/quad4_tri3_hourglass.xda.gz in tests/Makefile.in, which tests/Makefile.am has listed since libMesh#4544 but the committed Makefile.in did not.
rochi00
added a commit
to rochi00/libmesh
that referenced
this pull request
Sep 29, 2026
This also picks up meshes/quad4_tri3_hourglass.xda.gz in tests/Makefile.in, which tests/Makefile.am has listed since libMesh#4544 but the committed Makefile.in did not.
rochi00
added a commit
to rochi00/libmesh
that referenced
this pull request
Sep 29, 2026
This also picks up meshes/quad4_tri3_hourglass.xda.gz in tests/Makefile.in, which tests/Makefile.am has listed since libMesh#4544 but the committed Makefile.in did not.
rochi00
added a commit
to rochi00/libmesh
that referenced
this pull request
Sep 29, 2026
This also picks up meshes/quad4_tri3_hourglass.xda.gz in tests/Makefile.in, which tests/Makefile.am has listed since libMesh#4544 but the committed Makefile.in did not.
rochi00
added a commit
to rochi00/libmesh
that referenced
this pull request
Sep 29, 2026
This also picks up meshes/quad4_tri3_hourglass.xda.gz in tests/Makefile.in, which tests/Makefile.am has listed since libMesh#4544 but the committed Makefile.in did not.
roystgnr
pushed a commit
that referenced
this pull request
Oct 4, 2026
tests/Makefile.am gained meshes/quad4_tri3_hourglass.xda.gz in #4544 without tests/Makefile.in being regenerated, so the mesh was missing from the generated test data list. This is the whole of ./bootstrap's diff against devel. Co-Authored-By: Claude <noreply@anthropic.com>
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.
This doesnt change the default yet
but it's evidence we can get something else from QNODAL that would be valuable