Class OmegaHGeometry
Defined in File omega_h_geometry.hpp
Inheritance Relationships
Base Type
public Geometry
Class Documentation
-
class OmegaHGeometry : public Geometry
Geometry of a 2D or 3D Omega_h simplex mesh with straight-sided elements. The containing-element search over the mesh is built by the first Bind or Neighbourhood, which costs about as much as a bind: create one geometry per mesh and share it, so that every layout and space on the mesh is on the same entities. Create it with CreateGeometry.
Public Functions
Own it by std::shared_ptr, as CreateGeometry (pcms/backends/omega_h/omega_h.hpp) does: Bind uses shared_from_this().
- Throws:
pcms_error – if the options’ owned mask is not empty and does not have one entry per mesh vertex
-
inline const std::shared_ptr<const CoordinateSystem> &GetCoordinateSystem() const noexcept override
-
inline Omega_h::Mesh &GetMesh() const noexcept
-
inline const std::string &GetGlobalIdName() const noexcept
- Returns:
the name of the tag that holds the global entity ids the layouts on this geometry use
-
inline Omega_h::Read<Omega_h::I8> GetOwnedMask() const noexcept
- Returns:
the per-vertex ownership override, empty if the mesh’s own ownership applies
-
Kokkos::View<const LO*, DeviceMemorySpace> FindElementSeeds(Kokkos::View<const Real**, DeviceMemorySpace> points, Kokkos::View<const LO*, DeviceMemorySpace> guesses = {}) const
One source element per query point, to seed adjacency searches. Points must be in the mesh’s native coordinate system.
guesses, empty or an element per point (-1 for none), makes the search start there, see GridPointSearch::Locate(points, guesses, results); they are verified and do not change the result. An outside point uses the nearest entity reported by the grid search, lifted to an element; -1 means the search cell has no candidate. Unlike Bind, this preserves outside-point seeds: an outside target centroid can still belong to an element that overlaps the mesh.
-
SupportResults Neighbourhood(CoordinateView<DeviceMemorySpace> coords, int site_dim, const NeighbourhoodOptions &options, const OwnerHints &owners = {}) const override
Supports among the mesh vertices (
site_dim0) or the centroids of its elements (site_dimthe mesh dimension), by the mesh-adjacency search from the element Bind’s search finds for each point, which starts from the cell or vertex hint of this geometry when there is one (verified, see OwnerHints: a bad hint is corrected). A point outside the mesh starts from the element nearest it, so it gets supports near the boundary; a point whose search cell holds no element gets none.- Throws:
pcms_error – if
site_dimis neither 0 nor the mesh dimension
-
DifferentialView Differential(const BoundPoints &bound) const override
The per-element constant Jacobian of the affine simplex map, computed for all elements on the first call.
Protected Functions
-
std::shared_ptr<BoundPoints> BindImpl(const BindRequest &request) const override