hp3D::SingularEdge Class Reference
Class for storing a singular edge with coordinates of its corners. More...
#include <singularSet.hh>
Public Member Functions | |
Real | distance (const concepts::Real3d point, const Hexahedron *elm) const |
Returns the square of the distance from the edge to a point inside elm . More... | |
Real | distanceV0 (const concepts::Real3d point, const Hexahedron *elm) const |
Returns the the square of the distance of point to vtx0_ . More... | |
Real | distanceV1 (const concepts::Real3d point, const Hexahedron *elm) const |
Returns the the square of the distance of point to vtx1_ . More... | |
const concepts::Connector1 * | edge () const |
Returns a pointer to the edge object (topological, connector) More... | |
SingularEdge (const concepts::Connector1 *edge, const concepts::Real3d vtx0, const concepts::Real3d vtx1) | |
Constructor. More... | |
Private Attributes | |
concepts::Real3d | diffVector_ |
Difference vector between the 2 vertices: . More... | |
concepts::Real3d | diffVectorNormed_ |
Scaled difference vector: . More... | |
concepts::Real | diffVectorTimesVtx0Normed_ |
Scalar product of the scaled difference vector and the vector to the first vertex: More... | |
const concepts::Connector1 * | edge_ |
Pointer to the edge object (topological, connector) More... | |
const concepts::Real3d | vtx0_ |
Coordinates of the vertices of the edge ( and ) More... | |
const concepts::Real3d | vtx1_ |
Friends | |
std::ostream & | operator<< (std::ostream &os, const SingularEdge &s) |
Detailed Description
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.
Constructor & Destructor Documentation
◆ SingularEdge()
|
inline |
Constructor.
Precomputes diffVector_
, diffVectorNormed_
and diffVectorTimesVtx0Normed_
to allow fast computations in the distance
function.
- Parameters
-
edge Edge object vtx0,vtx1 Coordinates of the corners of the edge
Definition at line 40 of file singularSet.hh.
Member Function Documentation
◆ distance()
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
.
- Parameters
-
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.
◆ distanceV0()
Real hp3D::SingularEdge::distanceV0 | ( | const concepts::Real3d | point, |
const Hexahedron * | elm | ||
) | const |
Returns the the square of the distance of point
to vtx0_
.
◆ distanceV1()
Real hp3D::SingularEdge::distanceV1 | ( | const concepts::Real3d | point, |
const Hexahedron * | elm | ||
) | const |
Returns the the square of the distance of point
to vtx1_
.
◆ edge()
|
inline |
Returns a pointer to the edge object (topological, connector)
Definition at line 48 of file singularSet.hh.
Friends And Related Function Documentation
◆ operator<<
|
friend |
Member Data Documentation
◆ diffVector_
|
private |
Difference vector between the 2 vertices: .
Definition at line 86 of file singularSet.hh.
◆ diffVectorNormed_
|
private |
Scaled difference vector: .
Definition at line 88 of file singularSet.hh.
◆ diffVectorTimesVtx0Normed_
|
private |
Scalar product of the scaled difference vector and the vector to the first vertex:
Definition at line 92 of file singularSet.hh.
◆ edge_
|
private |
Pointer to the edge object (topological, connector)
Definition at line 82 of file singularSet.hh.
◆ vtx0_
|
private |
Coordinates of the vertices of the edge ( and )
Definition at line 84 of file singularSet.hh.
◆ vtx1_
|
private |
Definition at line 84 of file singularSet.hh.
The documentation for this class was generated from the following file:
- hp3D/singularSet.hh