diff --git a/istl/bcrsmatrix.hh b/istl/bcrsmatrix.hh index c88efcf5457c2f94086450320c43f4467c105572..22e569dc79fb7e835b76f21f1837534279619e58 100644 --- a/istl/bcrsmatrix.hh +++ b/istl/bcrsmatrix.hh @@ -52,8 +52,13 @@ namespace Dune { Setting the compile time switch DUNE_ISTL_WITH_CHECKING enables error checking. */ +#ifdef DUNE_EXPRESSIONTEMPLATES + template<class B, class A> + class BCRSMatrix : public ExprTmpl::Matrix< BCRSMatrix<B,A> > +#else template<class B, class A=ISTLAllocator> class BCRSMatrix +#endif { public: @@ -1282,6 +1287,25 @@ namespace Dune { }; +#ifdef DUNE_EXPRESSIONTEMPLATES + template <class B, class A> + struct FieldType< BCRSMatrix<B,A> > + { + typedef typename FieldType<B>::type type; + }; + + template <class B, class A> + struct BlockType< BCRSMatrix<B,A> > + { + typedef B type; + }; + template <class B, class A> + struct RowType< BCRSMatrix<B,A> > + { + typedef CompressedBlockVectorWindow<B,A> type; + }; +#endif + /** @} end documentation */ } // end namespace diff --git a/istl/bvector.hh b/istl/bvector.hh index 07da9b6a8b9294dc0e8bcdb79447ffc2f1d7eed6..9b6eec2be23efe8cec1aed06dd7dfffe93a6865d 100644 --- a/istl/bvector.hh +++ b/istl/bvector.hh @@ -222,10 +222,13 @@ namespace Dune { Setting the compile time switch DUNE_ISTL_WITH_CHECKING enables error checking. */ +#ifdef DUNE_EXPRESSIONTEMPLATES + template<class B, class A> + class BlockVector : public block_vector_unmanaged<B,A> , + public Dune::ExprTmpl::Vector< Dune::BlockVector<B,A> > +#else template<class B, class A=ISTLAllocator> class BlockVector : public block_vector_unmanaged<B,A> -#ifdef DUNE_EXPRESSIONTEMPLATES - , public Dune::ExprTmpl::Vector< Dune::BlockVector<B,A> > #endif { public: