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. | |
| 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_. | |
| const concepts::Connector1 * | edge () const |
| Returns a pointer to the edge object (topological, connector) | |
| SingularEdge (const concepts::Connector1 *edge, const concepts::Real3d vtx0, const concepts::Real3d vtx1) | |
| Constructor. | |
Private Attributes | |
| concepts::Real3d | diffVector_ |
Difference vector between the 2 vertices: . | |
| concepts::Real3d | diffVectorNormed_ |
Scaled difference vector: . | |
| concepts::Real | diffVectorTimesVtx0Normed_ |
Scalar product of the scaled difference vector and the vector to the first vertex: . | |
| const concepts::Connector1 * | edge_ |
| Pointer to the edge object (topological, connector) | |
| const concepts::Real3d | vtx0_ |
Coordinates of the vertices of the edge ( and ) | |
| const concepts::Real3d | 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 28 of file singularSet.hh.
| hp3D::SingularEdge::SingularEdge | ( | const concepts::Connector1 * | edge, |
| const concepts::Real3d | vtx0, | ||
| const concepts::Real3d | vtx1 | ||
| ) | [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 38 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.
| Real hp3D::SingularEdge::distanceV0 | ( | const concepts::Real3d | point, |
| const Hexahedron * | elm | ||
| ) | const |
Returns the the square of the distance of point to vtx0_.
| Real hp3D::SingularEdge::distanceV1 | ( | const concepts::Real3d | point, |
| const Hexahedron * | elm | ||
| ) | const |
Returns the the square of the distance of point to vtx1_.
| const concepts::Connector1* hp3D::SingularEdge::edge | ( | ) | const [inline] |
Returns a pointer to the edge object (topological, connector)
Definition at line 46 of file singularSet.hh.
| std::ostream& operator<< | ( | std::ostream & | os, |
| const SingularEdge & | s | ||
| ) | [friend] |
Difference vector between the 2 vertices:
.
Definition at line 84 of file singularSet.hh.
Scaled difference vector:
.
Definition at line 86 of file singularSet.hh.
Scalar product of the scaled difference vector and the vector to the first vertex:
.
Definition at line 90 of file singularSet.hh.
const concepts::Connector1* hp3D::SingularEdge::edge_ [private] |
Pointer to the edge object (topological, connector)
Definition at line 80 of file singularSet.hh.
const concepts::Real3d hp3D::SingularEdge::vtx0_ [private] |
Coordinates of the vertices of the edge (
and
)
Definition at line 82 of file singularSet.hh.
const concepts::Real3d hp3D::SingularEdge::vtx1_ [private] |
Definition at line 82 of file singularSet.hh.