Template Class PointLocalizationSearch

Nested Relationships

Nested Types

Inheritance Relationships

Derived Type

Class Documentation

template<int Dim>
class PointLocalizationSearch

The search reports the entity the point lies on and the point’s parametric coordinates on that entity. It does not choose an element; a consumer that needs one lifts the point into an adjacent element (see OmegaHMeshBinding).

Subclassed by pcms::localization::GridPointSearch< Dim >

Public Functions

inline explicit PointLocalizationSearch(Real tolerance)
Parameters:

tolerance – Cartesian distance from the facets of a simplex within which a point counts as lying on them

virtual Kokkos::View<Result*> Locate(Kokkos::View<const Real*[Dim]> points) const = 0
virtual ~PointLocalizationSearch() = default

Public Static Attributes

static constexpr int Dimension = Dim

Protected Attributes

Real tolerance_
struct Result

Public Types

enum class Dimensionality

Values:

enumerator VERTEX
enumerator EDGE
enumerator FACE
enumerator REGION
enumerator NO_INTERSECT

Public Functions

inline constexpr bool IsOutside() const

True when the point was not located inside any entity.

inline constexpr LO EntityId() const

Id of the entity of dimension dimensionality: the containing entity of a located point, the nearest entity of an outside point, or -1 for NO_INTERSECT.

Public Members

Dimensionality dimensionality
LO entity

id of the entity of that dimension that contains the point; OutsideId(nearest entity) for a point outside the mesh; -1 for NO_INTERSECT

Kokkos::Array<Real, Dim> parametric

The point on the entity in reduced coordinates: the entity’s dimension many entries are used (none for a vertex, 1 on an edge, 2 on a face, 3 in a region), the others are 0. With lambda_0..lambda_d the barycentric coordinates of the point in the entity, in the order of the entity’s vertices (an edge’s from the edge-to-vertex adjacency, a face’s or region’s from the element-to-vertex adjacency), the entries are (lambda_1, …, lambda_d): the point is x_0 + sum_j parametric[j] * (x_{j+1} - x_0). For a point outside the mesh it is approximate: the barycentric coordinates of the nearest candidate element on the nearest entity, negative ones clamped to 0 and renormalized, not a projection onto the entity.

Public Static Functions

static inline constexpr LO OutsideId(LO id)

entity of a point outside the mesh whose nearest entity is id.