From ca9342c0f365c8da9690a41ee8e517bb11c5903a Mon Sep 17 00:00:00 2001 From: Oliver Sander <oliver.sander@tu-dresden.de> Date: Tue, 15 Mar 2016 15:21:46 +0100 Subject: [PATCH] Specialize FieldTraits for MultiTypeBlockVector This allows other code to access field_type and real_type for a MultiTypeBlockVector using the FieldTraits class. Caveat: in principle, individual entries of a MultiTypeBlockVector could use different field_types. The implementation always returns the first one. --- dune/istl/multitypeblockvector.hh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dune/istl/multitypeblockvector.hh b/dune/istl/multitypeblockvector.hh index 367699f49..d718cb3f5 100644 --- a/dune/istl/multitypeblockvector.hh +++ b/dune/istl/multitypeblockvector.hh @@ -290,6 +290,19 @@ namespace Dune { } }; + /** @addtogroup DenseMatVec + @{ + */ + template <typename Arg0, typename... Args> + struct FieldTraits< MultiTypeBlockVector<Arg0, Args...> > + { + typedef typename FieldTraits<Arg0>::field_type field_type; + typedef typename FieldTraits<Arg0>::real_type real_type; + }; + /** + @} + */ + /** @brief A Vector class to support different block types -- GitLab