AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
A class to accelerate Point-In-Cell queries on a computational mesh. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.7.0/src/axom/quest/PointInCell.hpp>
Public Types | |
using | Point2DType = primal::Point< double, 2 > |
using | Point3DType = primal::Point< double, 3 > |
using | MeshTraits = PointInCellTraits< mesh_tag > |
using | MeshType = typename MeshTraits::MeshType |
using | IndexType = typename MeshTraits::IndexType |
using | MeshWrapperType = detail::PointInCellMeshWrapper< mesh_tag > |
using | PointFinder2D = detail::PointFinder< 2, mesh_tag, ExecSpace > |
using | PointFinder3D = detail::PointFinder< 3, mesh_tag, ExecSpace > |
Public Member Functions | |
PointInCell (MeshType *mesh, int *resolution=nullptr, double bboxTolerance=1e-8, int allocatorID=axom::execution_space< ExecSpace >::allocatorID()) | |
~PointInCell () | |
IndexType | locatePoint (const double *pos, double *isopar=nullptr) const |
void | locatePoints (axom::ArrayView< const Point2DType > pts, IndexType *outCellIds, Point2DType *outIsopar=nullptr) |
void | locatePoints (axom::ArrayView< const Point3DType > pts, IndexType *outCellIds, Point3DType *outIsopar=nullptr) const |
bool | locatePointInCell (IndexType cellIdx, const double *pos, double *isopar) const |
void | reconstructPoint (IndexType cellIdx, const double *isopar, double *pos) const |
int | meshDimension () const |
A class to accelerate Point-In-Cell queries on a computational mesh.
A point in cell query over a computational mesh determines if a given point is contained in one of its cells. If so, it returns the index of the cell containing the point as well as the isoparametric coordinates of the point within the cell.
mesh_tag | A tag type (e.g. an empty struct) for the underlying computational mesh. There must also be corresponding template specializations of PointInCellMeshWrapper<mesh_tag> and PointInCellTraits<mesh_tag> for the provided mesh_tag in the axom::quest::detail namespace |
using axom::quest::PointInCell< mesh_tag, ExecSpace >::Point2DType = primal::Point<double, 2> |
using axom::quest::PointInCell< mesh_tag, ExecSpace >::Point3DType = primal::Point<double, 3> |
using axom::quest::PointInCell< mesh_tag, ExecSpace >::MeshTraits = PointInCellTraits<mesh_tag> |
using axom::quest::PointInCell< mesh_tag, ExecSpace >::MeshType = typename MeshTraits::MeshType |
using axom::quest::PointInCell< mesh_tag, ExecSpace >::IndexType = typename MeshTraits::IndexType |
using axom::quest::PointInCell< mesh_tag, ExecSpace >::MeshWrapperType = detail::PointInCellMeshWrapper<mesh_tag> |
using axom::quest::PointInCell< mesh_tag, ExecSpace >::PointFinder2D = detail::PointFinder<2, mesh_tag, ExecSpace> |
using axom::quest::PointInCell< mesh_tag, ExecSpace >::PointFinder3D = detail::PointFinder<3, mesh_tag, ExecSpace> |
|
inline |
Construct a point in cell query structure over a computational mesh
[in] | mesh | A pointer to the computational mesh |
[in] | resolution | Grid resolution for the spatial index. Default: NULL |
[in] | bboxTolerance | A tolerance factor by which to expand the bounding boxes. Default: 1e-8 |
[in] | allocatorId | Currently unused. Default value is based on the allocator ID set for the specified execution space. |
References SLIC_ASSERT, and SLIC_ERROR.
|
inline |
Destructor
|
inline |
Attempt to find the index of the mesh cell containing the given point.
If found, and isopar is not NULL, isopar contains the isoparametric coordinates the point within this cell.
[in] | pos | The coordinates of the query point in space |
[out] | isopar | The isoparametric coordinates of the query pt. Only valid when a cell is found. |
References SLIC_ASSERT, and SLIC_ERROR.
|
inline |
|
inline |
|
inline |
Determine if a query point is located within a specified mesh cell
[in] | cellIdx | The index of the cell within the mesh |
[in] | pos | The coordinates of the query point in space |
[out] | isopar | The isoparametric coordinates of the point within cell cellIdx. Only valid when the return value is true |
|
inline |
Evaluate the position of a point within a mesh cell at the given isoparametric coordinates.
[in] | cellIdx | The index of the cell within the mesh |
[in[ | isopar The isoparametric coordinates at which to evaluate | |
[out] | pos | The computed coordinates of the evaluated point |
|
inline |
Returns the dimension of the mesh