From 5541cb7962c7f51fe74bc1dd37cec20c1ed1a07a Mon Sep 17 00:00:00 2001
From: Oliver Sander <oliver.sander@tu-dresden.de>
Date: Thu, 25 Feb 2016 12:18:19 +0100
Subject: [PATCH] Specialize the FieldTraits class for Quaternions

This is needed to be able to multiply FieldMatrices with Quaternions.
---
 dune/gfe/quaternion.hh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dune/gfe/quaternion.hh b/dune/gfe/quaternion.hh
index a6580dfd..56c92b78 100644
--- a/dune/gfe/quaternion.hh
+++ b/dune/gfe/quaternion.hh
@@ -162,4 +162,15 @@ public:
 
 };
 
+namespace Dune
+{
+  /** \brief Specizalization needed to allow certain forms of matrix--quaternion multiplications */
+  template< class T >
+  struct FieldTraits< Quaternion<T> >
+  {
+    typedef typename FieldTraits<T>::field_type field_type;
+    typedef typename FieldTraits<T>::real_type real_type;
+  };
+}
+
 #endif
-- 
GitLab