This class provides a lightweight logger.
Calculates the barycentric coordinates of a coordinate on the given vertex/edge/triangle and stores t...
double distance() const
Returns the projection distance.
An axis-aligned bounding box around a (partition of a) mesh.
Container and creator for meshes.
Class to query the index trees of the mesh.
mesh::BoundingBox getRtreeBounds()
std::vector< TetrahedronID > getEnclosingTetrahedra(const Eigen::VectorXd &location)
Return all the tetrahedra whose axis-aligned bounding box contains a vertex.
mesh::Mesh * _mesh
The indexed Mesh.
ProjectionMatch findCellOrProjection(const Eigen::VectorXd &location, int n)
VertexMatch getClosestVertex(const Eigen::VectorXd &sourceCoord)
Get the closest vertex to the given vertex.
ProjectionMatch findNearestProjection(const Eigen::VectorXd &location, int n)
Find the closest interpolation element to the given location. If exists, triangle or edge projection ...
bool isAnyVertexInsideBox(const mesh::Vertex ¢erVertex, double radius)
Returns.
std::unique_ptr< IndexImpl > _pimpl
std::vector< TriangleMatch > getClosestTriangles(const Eigen::VectorXd &sourceCoord, int n)
Get n number of closest triangles to the given vertex.
std::vector< VertexID > getVerticesInsideBox(const mesh::Vertex ¢erVertex, double radius)
Return all the vertices inside the box formed by vertex and radius (boundary exclusive)
void clear()
Clear the index.
ProjectionMatch findEdgeProjection(const Eigen::VectorXd &location, int n, ProjectionMatch closestVertex)
Find closest edge interpolation element. If cannot be found, it falls back to vertex projection.
ProjectionMatch findVertexProjection(const Eigen::VectorXd &location)
Closest vertex projection element is always the nearest neighbor.
Index(mesh::PtrMesh mesh)
std::vector< VertexID > getClosestVertices(const Eigen::VectorXd &sourceCoord, int n)
Get n number of closest vertices to the given vertex.
ProjectionMatch findTriangleProjection(const Eigen::VectorXd &location, int n, ProjectionMatch closestVertex)
Find closest face interpolation element. If cannot be found, it falls back to first edge interpolatio...
std::vector< EdgeMatch > getClosestEdges(const Eigen::VectorXd &sourceCoord, int n)
Get n number of closest edges to the given vertex.
static precice::logging::Logger _log
double Distance
Type used for the distance of a match to the queried point.
int MatchID
Type used for the IDs of matching entities.
constexpr double INVALID_DISTANCE
constexpr MatchID NO_MATCH
Main namespace of the precice library.
Struct to hold the index of a primitive match.
Struct representing a projection match.
mapping::Polation polation
ProjectionMatch(mapping::Polation &&p)
ProjectionMatch(const ProjectionMatch &other)=default
bool operator<(ProjectionMatch const &other) const
ProjectionMatch & operator=(ProjectionMatch &&other)=default
ProjectionMatch(ProjectionMatch &&other)=default
ProjectionMatch(const mapping::Polation &p)
ProjectionMatch & operator=(const ProjectionMatch &other)=default