From a3baa1fedaceb589ada52e6f156a2e81b4ac961d Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Tue, 3 Sep 2013 16:30:41 +0000 Subject: [PATCH] Use 'double' instead of 'T' for the convexityRadius field When using the classes with ADOL-C, T becomes an 'adouble', which is a non-trivial type. However, the convexityField is constexpr (and with a reason -- otherwise we could write the initialization together with the declaration), and constexpr and non-trivial types don't work together. [[Imported from SVN: r9444]] --- dune/gfe/realtuple.hh | 2 +- dune/gfe/rigidbodymotion.hh | 2 +- dune/gfe/rotation.hh | 4 ++-- dune/gfe/unitvector.hh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dune/gfe/realtuple.hh b/dune/gfe/realtuple.hh index a67b71d5..afd7396a 100644 --- a/dune/gfe/realtuple.hh +++ b/dune/gfe/realtuple.hh @@ -32,7 +32,7 @@ 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(); + static constexpr double convexityRadius = std::numeric_limits<double>::infinity(); /** \brief Default constructor */ RealTuple() diff --git a/dune/gfe/rigidbodymotion.hh b/dune/gfe/rigidbodymotion.hh index e51f6e49..fa8f9529 100644 --- a/dune/gfe/rigidbodymotion.hh +++ b/dune/gfe/rigidbodymotion.hh @@ -31,7 +31,7 @@ public: typedef Dune::FieldVector<T,embeddedDim> CoordinateType; /** \brief The global convexity radius of the rigid body motions */ - static constexpr T convexityRadius = Rotation<T,N>::convexityRadius; + static constexpr double convexityRadius = Rotation<T,N>::convexityRadius; /** \brief Default constructor */ RigidBodyMotion() diff --git a/dune/gfe/rotation.hh b/dune/gfe/rotation.hh index 95bc5207..055de5ff 100644 --- a/dune/gfe/rotation.hh +++ b/dune/gfe/rotation.hh @@ -46,7 +46,7 @@ public: typedef Dune::FieldVector<T,1> EmbeddedTangentVector; /** \brief The global convexity radius of the rotation group */ - static constexpr T convexityRadius = 0.5 * M_PI; + static constexpr double convexityRadius = 0.5 * M_PI; /** \brief Default constructor, create the identity rotation */ Rotation() @@ -176,7 +176,7 @@ public: typedef Quaternion<T> EmbeddedTangentVector; /** \brief The global convexity radius of the rotation group */ - static constexpr T convexityRadius = 0.5 * M_PI; + static constexpr double convexityRadius = 0.5 * M_PI; /** \brief Default constructor creates the identity element */ Rotation() diff --git a/dune/gfe/unitvector.hh b/dune/gfe/unitvector.hh index 838c92bd..87ab28f2 100644 --- a/dune/gfe/unitvector.hh +++ b/dune/gfe/unitvector.hh @@ -79,7 +79,7 @@ public: typedef Dune::FieldVector<T,N> EmbeddedTangentVector; /** \brief The global convexity radius of the unit sphere */ - static constexpr T convexityRadius = 0.5*M_PI; + static constexpr double convexityRadius = 0.5*M_PI; /** \brief Default constructor */ UnitVector() -- GitLab