Skip to content

Conversation

@gunney1
Copy link
Contributor

@gunney1 gunney1 commented Jan 7, 2026

Summary

  • This PR is a feature
  • It does the following:
    • Add MonotonicZSORClipper, for clipping a surface-of-revolution where the 2D curve doesn't double back in the axial direction. For such a curve, the area under the curve is inside the geometry; the area above the curve is outside.
    • Add SORClipper, for clipping a general SOR where the curve can double back in the axial direction. This works by splitting up the curve where it changes directions and use MotonicZSORClipper on each section.
    • Add tests for MotonicZSORClipper and SORClipper.
    • Modify the SOR discretizer so it allows the curve in the -z direction, and remove checks that exclude this situation.
    • Fix a couple of minor errors from recent changes to the MeshClipper code.

@gunney1 gunney1 added this to the FY26 January Release milestone Jan 7, 2026
@gunney1 gunney1 self-assigned this Jan 7, 2026
@gunney1 gunney1 added the Quest Issues related to Axom's 'quest' component label Jan 7, 2026
@gunney1
Copy link
Contributor Author

gunney1 commented Jan 7, 2026

I'm not sure that FSorClipper is the best name for the class. The F stands for function, but the permitted curve can have a vertical slope so it's not exactly a function. Maybe MonotonicSorClipper, to emphasize that the z values have to be monotonic. Suggestions?

@gunney1 gunney1 changed the title Add SOR implementation for MeshClipper SOR implementation for MeshClipper Jan 8, 2026
Base automatically changed from feature/gunney/hex-clipper to develop January 9, 2026 17:09
@rhornung67
Copy link
Member

I'm not sure that FSorClipper is the best name for the class. The F stands for function, but the permitted curve can have a vertical slope so it's not exactly a function. Maybe MonotonicSorClipper, to emphasize that the z values have to be monotonic. Suggestions?

What about MonotonicZSorClipper to be more explicit?

@gunney1
Copy link
Contributor Author

gunney1 commented Jan 13, 2026

MonotonicZSorClipper

Renamed to SORClipper and MonotonicZSORClipper.

Copy link
Member

@kennyweiss kennyweiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gunney1

* tets points to at least NUM_TETS_PER_HEX objects. This method
* neither checks the pointer nor reallocates the space.
*/
AXOM_HOST_DEVICE inline static void hexToTets(const HexahedronType& hex, TetrahedronType* tets);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once all the PRs are updated, would it make sense to revise the API to take axom::ArrayViews instead of raw pointers? They can easily wrap a raw pointer, and carry their sizes, and allocators with them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this method is used in long inner loops I'd be concerned about constructing and destructing an ArrayView every cycle. That cost can be optimized away in theory, but does it always happen? My reference precedence for this is the Hexahedron::triangulate method, in which the Tetrahedron container is a TetIndexable template parameter. It doesn't check the container size.

Moreover, verifying the ArrayView size here is no more than verifying that we claimed the correct size when constructing the ArrayView. I'm not sure if that's very meaningful.

hexToTets is a private method. If there isn't enough space for the output, it's not a user error. It'd be an error in the short computeCellsAsTetsImpl method.

Comment on lines 30 to 35
#include "axom/quest/detail/clipping/HexClipper.hpp"
#include "axom/quest/detail/clipping/Plane3DClipper.hpp"
#include "axom/quest/detail/clipping/FSorClipper.hpp"
#include "axom/quest/detail/clipping/SorClipper.hpp"
#include "axom/quest/detail/clipping/SphereClipper.hpp"
#include "axom/quest/detail/clipping/TetClipper.hpp"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're including quest.hpp, we should not need to include any specific quest headers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should all files be included in quest.hpp? I assumed that some files are omitted, because I don't see any file that I placed in the detail subdirectory.

between the vertices. Given the angle, scale the bottom of bbInRz
for the worst case.
*/
double angleRange = maxAngle - minAngle;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an assumption that the range won't include the x-axis? E.g. from -30 degrees to 30 degrees.

Copy link
Contributor Author

@gunney1 gunney1 Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. The x-axis (that is, the axis of rotation) is included when angleRange >= M_PI. We account for this when we use angleRange to compute factor.

Copy link
Contributor

@Arlie-Capps Arlie-Capps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggested some documentation changes. Will approve after those are done.

@gunney1 gunney1 requested a review from Arlie-Capps January 15, 2026 19:55
the MonotonicZSORClipper that it uses internally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Quest Issues related to Axom's 'quest' component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants