Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Public Member Functions | Private Attributes | Friends
hp3D::SingularEdge Class Reference

Class for storing a singular edge with coordinates of its corners. More...

#include <singularSet.hh>

Collaboration diagram for hp3D::SingularEdge:
Collaboration graph
[legend]

List of all members.

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::Connector1edge () 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: $x_c - x_{c'}$.
concepts::Real3d diffVectorNormed_
 Scaled difference vector: $(x_c - x_{c'})/|x_c - x_{c'}|^2$.
concepts::Real diffVectorTimesVtx0Normed_
 Scalar product of the scaled difference vector and the vector to the first vertex: $(x_c - x_{c'}) \cdot x_c /|x_c - x_{c'}|^2$.
const concepts::Connector1edge_
 Pointer to the edge object (topological, connector)
const concepts::Real3d vtx0_
 Coordinates of the vertices of the edge ( $x_c$ and $x_{c'}$)
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.

Author:
Kersten Schmidt, 2002

Definition at line 28 of file singularSet.hh.


Constructor & Destructor Documentation

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.

Parameters:
edgeEdge object
vtx0,vtx1Coordinates of the corners of the edge

Definition at line 38 of file singularSet.hh.

Here is the call graph for this function:


Member Function Documentation

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:
pointPoint in reference coordinates $\xi \in [0,1]^3$
elmHexahedron in which the point is located

Let $k$ be a straight line along the edge, in parameters:

\[ k(t) := x_c + (x_{c'}- x_c) \cdot t = x_c + x_D \cdot t \]

where $x_c$ and $x_{c'}$ are the corners of the edge.

To determine the root point $k(t)$ of $x$ ( $x$ is $\xi$ in physical coordinates) on $k$, compute

\[ t = x \cdot\frac{x_D}{|x_D|^2} - \frac{x_c\cdot x_D}{|x_D|^2} = x \cdot a - b \]

where $a$ = diffVectorNormed_ and $b$ = diffVectorTimesVtx0Normed_ respectively.

If $0 < t < 1$, the closest point on the edge is not one of the corners and the distance $x - k(t)$ 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.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const SingularEdge s 
) [friend]

Member Data Documentation

Difference vector between the 2 vertices: $x_c - x_{c'}$.

Definition at line 84 of file singularSet.hh.

Scaled difference vector: $(x_c - x_{c'})/|x_c - x_{c'}|^2$.

Definition at line 86 of file singularSet.hh.

Scalar product of the scaled difference vector and the vector to the first vertex: $(x_c - x_{c'}) \cdot x_c /|x_c - x_{c'}|^2$.

Definition at line 90 of file singularSet.hh.

Pointer to the edge object (topological, connector)

Definition at line 80 of file singularSet.hh.

Coordinates of the vertices of the edge ( $x_c$ and $x_{c'}$)

Definition at line 82 of file singularSet.hh.

Definition at line 82 of file singularSet.hh.


The documentation for this class was generated from the following file:

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)