From 2a7d650685a819920a4a7f55d51dfaf9ee27433d Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Fri, 22 Aug 2014 09:36:41 +0000 Subject: [PATCH] Implement assignment from FieldVector<T,4> [[Imported from SVN: r9846]] --- dune/gfe/rotation.hh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dune/gfe/rotation.hh b/dune/gfe/rotation.hh index a392d625..c8dfe194 100644 --- a/dune/gfe/rotation.hh +++ b/dune/gfe/rotation.hh @@ -224,6 +224,14 @@ public: typedef Rotation<U,3> other; }; + Rotation& operator= (const Dune::FieldVector<T,4>& other) + { + for (int i=0; i<4; i++) + (*this)[i] = other[i]; + *this /= this->two_norm(); + return *this; + } + /** \brief Assigment from RigidBodyMotion with different type -- used for automatic differentiation with ADOL-C */ template <class T2> Rotation& operator <<= (const Rotation<T2,3>& other) { -- GitLab