-
Notifications
You must be signed in to change notification settings - Fork 32
SOR implementation for MeshClipper
#1762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
This is needed to support the SorClipper.
|
I'm not sure that |
MeshClipperMeshClipper
…ture/gunney/sor-clipper
What about |
Renamed to |
kennyweiss
left a comment
There was a problem hiding this 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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| #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" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Arlie-Capps
left a comment
There was a problem hiding this 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.
the MonotonicZSORClipper that it uses internally.
Summary
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.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 useMotonicZSORClipperon each section.MotonicZSORClipperandSORClipper.MeshClippercode.