AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.6.1/src/axom/quest/SignedDistance.hpp>
Public Types | |
using | PointType = axom::primal::Point< double, NDIMS > |
using | VectorType = axom::primal::Vector< double, NDIMS > |
using | TriangleType = axom::primal::Triangle< double, NDIMS > |
using | BoxType = axom::primal::BoundingBox< double, NDIMS > |
using | ZipPoint = axom::primal::ZipIndexable< PointType > |
using | BVHTreeType = axom::spin::BVH< NDIMS, ExecSpace > |
Public Member Functions | |
SignedDistance (const mint::Mesh *surfaceMesh, bool isWatertight, bool computeSign=true, int allocatorID=axom::execution_space< ExecSpace >::allocatorID()) | |
Creates a SignedDistance instance for queries on the given mesh. More... | |
bool | setMesh (const mint::Mesh *surfaceMesh, int allocatorID=axom::execution_space< ExecSpace >::allocatorID()) |
Reinitializes a SignedDistance instance with a new surface mesh. More... | |
double | computeDistance (double x, double y, double z=0.0) |
Computes the distance of the given point to the input surface mesh. More... | |
double | computeDistance (const PointType &queryPnt) const |
Computes the distance of the given point to the surface mesh. More... | |
template<typename PointIndexable > | |
void | computeDistances (int npts, PointIndexable queryPts, double *outSgnDist, PointType *outClosestPts=nullptr) const |
Computes the distances of a set of points to the surface mesh. More... | |
const BVHTreeType & | getBVHTree () const |
Returns a const reference to the underlying bucket tree. More... | |
using axom::quest::SignedDistance< NDIMS, ExecSpace >::PointType = axom::primal::Point<double, NDIMS> |
using axom::quest::SignedDistance< NDIMS, ExecSpace >::VectorType = axom::primal::Vector<double, NDIMS> |
using axom::quest::SignedDistance< NDIMS, ExecSpace >::TriangleType = axom::primal::Triangle<double, NDIMS> |
using axom::quest::SignedDistance< NDIMS, ExecSpace >::BoxType = axom::primal::BoundingBox<double, NDIMS> |
using axom::quest::SignedDistance< NDIMS, ExecSpace >::ZipPoint = axom::primal::ZipIndexable<PointType> |
using axom::quest::SignedDistance< NDIMS, ExecSpace >::BVHTreeType = axom::spin::BVH<NDIMS, ExecSpace> |
axom::quest::SignedDistance< NDIMS, ExecSpace >::SignedDistance | ( | const mint::Mesh * | surfaceMesh, |
bool | isWatertight, | ||
bool | computeSign = true , |
||
int | allocatorID = axom::execution_space<ExecSpace>::allocatorID() |
||
) |
Creates a SignedDistance instance for queries on the given mesh.
[in] | surfaceMesh | user-supplied surface mesh. |
[in] | isWatertight | indicates if the surface mesh is closed. |
[in] | computeSign | indicates if distance queries should compute signs (optional). |
[in] | allocatorID | the allocator to create the underlying BVH with (optional). |
References axom::quest::SignedDistance< NDIMS, ExecSpace >::setMesh(), and SLIC_ASSERT.
bool axom::quest::SignedDistance< NDIMS, ExecSpace >::setMesh | ( | const mint::Mesh * | surfaceMesh, |
int | allocatorID = axom::execution_space<ExecSpace>::allocatorID() |
||
) |
Reinitializes a SignedDistance instance with a new surface mesh.
[in] | surfaceMesh | user-supplied surface mesh. |
[in] | allocatorID | the allocator to create the underlying BVH with (optional). |
References axom::primal::BoundingBox< T, NDIMS >::addPoint(), AXOM_LAMBDA, AXOM_PERF_MARK_FUNCTION, AXOM_UNUSED_VAR, axom::spin::BVH_BUILD_OK, axom::deallocate(), axom::mint::Mesh::getCoordinateArray(), axom::mint::Mesh::getNumberOfCells(), axom::mint::Mesh::getNumberOfNodes(), axom::spin::BVH< NDIMS, ExecSpace, FloatType, BVHImpl >::initialize(), axom::utilities::max(), axom::quest::detail::SD_GetUcdMeshData(), axom::spin::BVH< NDIMS, ExecSpace, FloatType, BVHImpl >::setAllocatorID(), SLIC_ASSERT, and SLIC_CHECK_MSG.
Referenced by axom::quest::SignedDistance< NDIMS, ExecSpace >::SignedDistance().
|
inline |
Computes the distance of the given point to the input surface mesh.
[in] | x | x-coordinate of the query point |
[in] | y | y-coordinate of the query point |
[in] | z | z-coordinate of the query point |
|
inline |
Computes the distance of the given point to the surface mesh.
[in] | queryPnt | user-supplied point. |
References axom::quest::SignedDistance< NDIMS, ExecSpace >::computeDistances().
|
inline |
Computes the distances of a set of points to the surface mesh.
[in] | npts | number of points to query |
[in] | queryPnt | user-supplied point indexable type. This can be a pointer-to-array, or a ZipIndexable<PointType>. |
[out] | outSgnDist | array to fill with corresponding signed distances for query points |
[out] | outClosestPts | array to fill with closest points on the mesh. Optional. |
References axom::primal::BoundingBox< T, NDIMS >::addPoint(), axom::primal::Triangle< T, NDIMS >::angle(), AXOM_LAMBDA, AXOM_PERF_MARK_SECTION, AXOM_UNUSED_VAR, axom::primal::closest_point(), axom::primal::BoundingBox< T, NDIMS >::contains(), axom::primal::Vector< T, NDIMS >::dot(), axom::quest::detail::edge, axom::quest::detail::face, axom::quest::detail::UcdMeshData::getCellNodeIDs(), axom::quest::detail::UcdMeshData::getCellType(), axom::quest::detail::getClosestPointLocType(), axom::mint::Mesh::getCoordinateArray(), axom::spin::BVH< NDIMS, ExecSpace, FloatType, BVHImpl >::getTraverser(), axom::quest::detail::isClosestPointTypeShared(), axom::utilities::isNearlyEqual(), axom::primal::Triangle< T, NDIMS >::normal(), axom::mint::QUAD, axom::quest::detail::SD_GetUcdMeshData(), axom::mint::SEGMENT, SLIC_ASSERT, SLIC_CHECK_MSG, axom::primal::squared_distance(), axom::mint::TRIANGLE, axom::primal::Vector< T, NDIMS >::unitVector(), and axom::quest::detail::vertex.
Referenced by axom::quest::SignedDistance< NDIMS, ExecSpace >::computeDistance().
|
inline |
Returns a const reference to the underlying bucket tree.
References AXOM_HOST_DEVICE, and DISABLE_COPY_AND_ASSIGNMENT.