Skip to content

Conversation

@gunney1
Copy link
Contributor

@gunney1 gunney1 commented Sep 10, 2025

Summary

  • This PR is a feature. It does the following:

    • Adds geometry-specific optimizations for the mesh clipping.
    • Extends the MeshClipper test with the new geometries.
  • The following new classes implement the MeshClipperStrategy interface:

    • PlaneClipper for a plane geometry
    • TetClipper for a tetrahedron
    • HexClipper for a hexahedron
    • SphereClipper for a sphere
    • FSorClipper for a surface of revolution where the discrete curve r(z) is a function. Although the curve may have vertical segments, it may not double back in z. It can support stepped geometries but not hollow geometries. Cones and cylinders are supported by this implementation.
    • SorClipper for surface of revolution where the r(z) curve can double back on itself, for example to make a bowl.
    • TetMeshClipper for a general geometry described by a tetrahedral mesh.
  • New code are in namespace experimental, because this is still a work in progress.

Dependencies

The mesh clipping refactor includes multiple PRs. Please review these before this one.

Image of geometries supported (excluding the plane clipper)

visit0005

Performance comparison

This is a comparison of clipping times for the IntersectionShaper and the MeshClipper, showing the wall time it took to clip a sample of geometries. It uses the quest_shape_in_memory example for the IntersectionShaper and the quest_mesh_clipper test for the MeshClipper. The tests are run on the CPU on rzwhippet and on the GPU on rzadams. The mesh is 30^3 for the CPU and 100^3 for the GPU. Most of the geometries occupy about 1/16 of the mesh. Note that performance is highly configuration dependent, so this data does not tell the whole story. Furthermore, the amortization of shared costs in the new code was not used.

rzwhippet + seq, 303 mesh

Code plane tet tetmesh hex sphere cyl cone sor
IntersectionShaper 5.66 0.74 0.88 1.19 6.43 26.4 21.5 8.76
MeshClipper 0.02 0.08 0.33 0.30 0.76 3.93 4.69 6.20

rzadams + hip, 1003 mesh

Code plane tet tetmesh hex sphere cyl cone sor
IntersectionShaper .90 .48 .48 .53 .93 3.31 2.65 1.29
MeshClipper .10 .33 .38 .37 .66 .50 .58 .62

gunney1 added 30 commits May 12, 2025 12:53
Trying to achieve fast but not-too-trivial configs.
This is for performance testing.
This is for comparing with clipping code.
The checks didn't yield and change.  I added notes about its use
but left it disabled.
The bounding-box search didn't improve performance.
Maybe this will.
Use CoordinateTransformer to support arbitrary Cone positions
and rotations.  Adding code for SorClipper::labelInOut.
New implementations should be faster and not omit intersections
between cell vertices.
The previous one is a bit slow.  New one screens using the tet's
bounding box, and computes signed distance based on that.  Labling
cells uses the characteristic-length-based threshold to ensure
we don't lose intersections that occur between cell vertices.
This version doesn't miss intersections between vertices.
gunney1 added 30 commits January 7, 2026 20:52
It doesn't hurt anything and it's not worth the hassle to remove.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

high priority Quest Issues related to Axom's 'quest' component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants