|
| 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 |
|
void | setPrintLevel (int level) |
| Sets the print verbosity level for the point in cell query. More...
|
|
void | setInitialGuessType (int guessType) |
| Sets the initial guess type for the element-based point in cell query. More...
|
|
void | setInitialGridOrder (int order) |
| Sets the grid size for the initial guess in the element-based point in cell query. More...
|
|
void | setSolverProjectionType (int type) |
| Sets the solution strategy for the element-based point in cell query. More...
|
|
template<typename mesh_tag, typename ExecSpace = axom::SEQ_EXEC>
class axom::quest::PointInCell< mesh_tag, ExecSpace >
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.
- Template Parameters
-
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 |
- Note
- This class was designed to support point in cell queries against 2D or 3D computational meshes. The queries to the mesh are wrapped in a PointInCellMeshWrapper class templated on a mesh_tag type. To extend this design, one must create a new mesh tag (e.g.. an empty struct custom_mesh_tag) and add custom template specializations of PointInCellMeshWrapper and PointInCellTraits for this tag in the axom::quest namespace.
- See also
- PointInCellMeshWrapper_mfem.hpp for a specialized implementation for mfem meshes of arbitrary order. It uses the mesh_tag quest_point_in_cell_mfem_tag
template<typename mesh_tag , typename ExecSpace = axom::SEQ_EXEC>
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.
- Parameters
-
[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. |
- Returns
- The index of the mesh cell containing the query point. If no cell is found, returns the special value MeshTraits::NO_CELL. Otherwise, the result will be between 0 and N, where N is the number of cells in the mesh.
- Precondition
- pos is a non-null array with at least meshDimension() coords
-
When not NULL, isopar has space for meshDimension() coords
References SLIC_ASSERT, and SLIC_ERROR.
template<typename mesh_tag , typename ExecSpace = axom::SEQ_EXEC>
Sets the print verbosity level for the point in cell query.
- Parameters
-
[in] | level | The verbosity level (increases with level) |
This is useful for debugging the point in cell query
For the mfem mesh wrapper, the valid options are:
- -1: never print (default)
- 0: print only errors
- 1: print the first and last iterations
- 2: print every iteration
- 3: print every iteration including point coordinates.
template<typename mesh_tag , typename ExecSpace = axom::SEQ_EXEC>
Sets the initial guess type for the element-based point in cell query.
- Parameters
-
[in] | guessType | The guess type |
For the mfem mesh wrapper, the valid options are:
- 0: Use the element center in reference space
- 1: Use the closest physical node on a grid of points in physical space
- 2: Use the closest reference node on a grid of points in reference space
The grid size is controlled by setInitialGridOrder()
template<typename mesh_tag , typename ExecSpace = axom::SEQ_EXEC>
Sets the grid size for the initial guess in the element-based point in cell query.
- Parameters
-
[in] | order | The order for the grid size |
For the mfem mesh wrapper, the number of points in each spatial direction is given by max(trans_order+order,0)+1
, where trans_order is the order of the current element.
- See also
- setInitialGuessType