Skip to content
Snippets Groups Projects
Commit 303de1de authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

Introduce a new member convexityRadius for target spaces.

And use it in the test.

This patch uses the new 'constexpr' macro.  Hence it is C++11 only.

[[Imported from SVN: r9195]]
parent b2852c77
Branches
No related tags found
No related merge requests found
......@@ -182,6 +182,9 @@ public:
/** \brief Type of a tangent vector in the embedding space */
typedef Dune::FieldVector<T,N> EmbeddedTangentVector;
/** \brief The global convexity radius of the hyberbolic plane */
static constexpr T convexityRadius = std::numeric_limits<T>::infinity();
/** \brief Default constructor */
HyperbolicHalfspacePoint()
{}
......
......@@ -28,6 +28,9 @@ public:
typedef Dune::FieldVector<T,N> TangentVector;
/** \brief The global convexity radius of the Euclidean space */
static constexpr T convexityRadius = std::numeric_limits<T>::infinity();
/** \brief Default constructor */
RealTuple()
{}
......
......@@ -30,6 +30,9 @@ public:
/** \brief The type used for global coordinates */
typedef Dune::FieldVector<T,embeddedDim> CoordinateType;
/** \brief The global convexity radius of the rigid body motions */
static constexpr T convexityRadius = Rotation<T,N>::convexityRadius;
/** \brief Default constructor */
RigidBodyMotion()
{}
......
......@@ -45,6 +45,9 @@ public:
This vector is not really embedded in anything. I have to make my notation more consistent! */
typedef Dune::FieldVector<T,1> EmbeddedTangentVector;
/** \brief The global convexity radius of the rotation group */
static constexpr T convexityRadius = 0.5 * M_PI;
/** \brief Default constructor, create the identity rotation */
Rotation()
: angle_(0)
......@@ -163,6 +166,9 @@ public:
/** \brief A tangent vector as a vector in the surrounding coordinate space */
typedef Quaternion<T> EmbeddedTangentVector;
/** \brief The global convexity radius of the rotation group */
static constexpr T convexityRadius = 0.5 * M_PI;
/** \brief Default constructor creates the identity element */
Rotation()
: Quaternion<T>(0,0,0,1)
......
......@@ -78,6 +78,9 @@ public:
typedef Dune::FieldVector<T,N> EmbeddedTangentVector;
/** \brief The global convexity radius of the unit sphere */
static constexpr T convexityRadius = 0.5*M_PI;
/** \brief Default constructor */
UnitVector()
{}
......
......@@ -352,7 +352,7 @@ void test()
std::vector<TargetSpace> testPointPair(2);
testPointPair[0] = testPoints[i];
testPointPair[1] = testPoints[j];
if (diameter(testPointPair) > 0.5*M_PI)
if (diameter(testPointPair) > TargetSpace::convexityRadius)
continue;
testDerivativesOfSquaredDistance<TargetSpace>(testPoints[i], testPoints[j]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment