#include <singularSet.hh>
Public Member Functions | |
SingularEdge (const concepts::Connector1 *edge, const concepts::Real3d vtx0, const concepts::Real3d vtx1) | |
const concepts::Connector1 * | edge () const |
Returns a pointer to the edge object (topological, connector) | |
Real | distance (const concepts::Real3d point, const Hexahedron *elm) const |
Real | distanceV0 (const concepts::Real3d point, const Hexahedron *elm) const |
Returns the the square of the distance of point to vtx0_ . | |
Real | distanceV1 (const concepts::Real3d point, const Hexahedron *elm) const |
Returns the the square of the distance of point to vtx1_ . | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const SingularEdge &s) |
Class for storing a singular edge with coordinates of its corners. The class also provides methods to compute a distance from a given point (in local coordinates in an element) to the edge. The returned results are the Euclidiean distance squared.
Definition at line 30 of file singularSet.hh.
|
inline |
Constructor. Precomputes diffVector_
, diffVectorNormed_
and diffVectorTimesVtx0Normed_
to allow fast computations in the distance
function.
edge | Edge object |
vtx0,vtx1 | Coordinates of the corners of the edge |
Definition at line 40 of file singularSet.hh.
Real hp3D::SingularEdge::distance | ( | const concepts::Real3d | point, |
const Hexahedron * | elm | ||
) | const |
Returns the square of the distance from the edge to a point
inside elm
point | Point in reference coordinates |
elm | Hexahedron in which the point is located |
Let be a straight line along the edge, in parameters:
where and are the corners of the edge.
To determine the root point of ( is in physical coordinates) on , compute
where = diffVectorNormed_
and = diffVectorTimesVtx0Normed_
respectively.
If , the closest point on the edge is not one of the corners and the distance is computed. Otherwise, the distance to the closer corner is computed.
|
inline |
Returns a pointer to the edge object (topological, connector)
Definition at line 48 of file singularSet.hh.