axom
axom copied to clipboard
Add `intersection_volume(Hexahedron, Tetrahedron)` geometric primitive to primal
A user requested a new primitive operation in primal to return the intersection volume between a hexahedron and a tetrahedron.
We already have
- a Tetrahedron object
- functionality to decompose a hexahedron into 24 Tetrahedra, and
- a geometric primitive to find the clipped region in the intersection of two tetrahedra (
primal::clip(primal::Tetrahedron, primal::Tetrahedron) -> primal::Polyhedron
) which has avolume()
function.
To implement this, we'd need
- a new geometric primitive::
Hexahedron
to define a (linear) hexahedron in 3D defined by 8 vertices, and - an
intersection_volume(Hexahedron, Tetrahedron)
operator
Note: The new intersection_volume
operator needs to work on the host or device.
See:
- https://github.com/LLNL/axom/blob/develop/src/axom/primal/geometry/Tetrahedron.hpp
- https://github.com/LLNL/axom/blob/88cac26073cafb969bbdbe71c86b51a3ecfea211/src/axom/quest/IntersectionShaper.hpp#L124-L178
- https://github.com/LLNL/axom/blob/88cac26073cafb969bbdbe71c86b51a3ecfea211/src/axom/primal/operators/clip.hpp#L132-L161