Class GridPointSearch3D
Defined in File point_search.h
Inheritance Relationships
Base Type
public pcms::PointLocalizationSearch< 3 >(Template Class PointLocalizationSearch)
Class Documentation
-
class GridPointSearch3D : public pcms::PointLocalizationSearch<3>
Public Types
-
using Result = PointLocalizationSearch3D::Result
Public Functions
-
GridPointSearch3D(Omega_h::Mesh &mesh, LO Nx, LO Ny, LO Nz, const PointSearchTolerances &tolerances)
-
Kokkos::View<Result*> operator()(Kokkos::View<const Real*[DIM]> point) const override
Given points in global coordinates, returns for each the id of a tetrahedron containing it and the point’s barycentric coordinates in that tetrahedron. Containment is tested with a Cartesian tolerance band: the point may lie up to
tolerances(2)outside any face plane (the band is applied per barycentric coordinate, scaled by the gradient norm of that coordinate, so it is the same distance from both sides of a shared face). The result is always labelled REGION. When several tetrahedra contain the point (it lies on a shared face, edge or vertex) the smallest id is returned; this is an interim tie-break that hides a genuine ambiguity, see docs/point_search_shared_face_plan.md.If no candidate contains the point, the result is the candidate whose face is closest, encoded with Result::OutsideId or NO_INTERSECT with id -1 when the grid cell has no candidates at all.
-
virtual LO GetOwningElementId(const Result &result) override
This function provides a temporary solution to retrieve the original behavior of the point search, which previously returned the face ID regardless of which entity the search result belonged to. Many parts of the codebase still rely on this legacy behavior. After updating the point search to return the exact entity, this function can be called to retrieve the old behavior and ensure correctness. Long term, the implementation should be updated to properly handle the new result.
-
using Result = PointLocalizationSearch3D::Result