diff --git a/dune/gfe/hyperbolichalfspacepoint.hh b/dune/gfe/hyperbolichalfspacepoint.hh index 3c11048f64ce495a4358c3aa0225ca1f88fd11ab..185c6fab7ca9bf57bcb4327f7f0e6bdd9d5585c5 100644 --- a/dune/gfe/hyperbolichalfspacepoint.hh +++ b/dune/gfe/hyperbolichalfspacepoint.hh @@ -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() {} diff --git a/dune/gfe/realtuple.hh b/dune/gfe/realtuple.hh index 99fd8dbbf0737ab2990f1d91b7ba955165cebf51..e6e59739e4707ebacb8f9e7a57138cd5a378f866 100644 --- a/dune/gfe/realtuple.hh +++ b/dune/gfe/realtuple.hh @@ -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() {} diff --git a/dune/gfe/rigidbodymotion.hh b/dune/gfe/rigidbodymotion.hh index 8945d17861146c33499da0d67520a64ae8b4fb55..5653059e126f6b790a5e54dc6dcd29ce3b04590f 100644 --- a/dune/gfe/rigidbodymotion.hh +++ b/dune/gfe/rigidbodymotion.hh @@ -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() {} diff --git a/dune/gfe/rotation.hh b/dune/gfe/rotation.hh index e23a0cd000ac0db0131af6ca96af2bc4875d4a56..4b6556989b2a3d2695388c3a5c14d681d9d1c838 100644 --- a/dune/gfe/rotation.hh +++ b/dune/gfe/rotation.hh @@ -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) diff --git a/dune/gfe/unitvector.hh b/dune/gfe/unitvector.hh index 060ef86597c4f935c809e77612bdd68bcc759d61..33ec628d62116cdc4d724702fe3b53b4033c3bf7 100644 --- a/dune/gfe/unitvector.hh +++ b/dune/gfe/unitvector.hh @@ -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() {} diff --git a/test/targetspacetest.cc b/test/targetspacetest.cc index ab6a0a0d59b3cecc78acaeb0d271434908b4333d..971ef9c96cbfc6a62806f30d0c4dd8a39f06b1d6 100644 --- a/test/targetspacetest.cc +++ b/test/targetspacetest.cc @@ -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]);