3 #ifndef DUNE_PDELAB_BACKEND_EIGEN_DESCRIPTORS_HH
4 #define DUNE_PDELAB_BACKEND_EIGEN_DESCRIPTORS_HH
10 #include <Eigen/Dense>
11 #include <Eigen/Sparse>
20 template<
typename GFS,
typename E>
21 class VectorContainer;
23 template<
typename GFSV,
typename GFSU,
typename ET,
int _Options>
24 class MatrixContainer;
27 struct MatrixPatternInserter;
37 struct EigenVectorBackend
39 typedef std::size_t size_type;
43 static const size_type max_blocking_depth = 0;
46 template<
typename GFS>
47 bool blocked(
const GFS& gfs)
const
54 template<
int _Options = Eigen::RowMajor>
55 struct EigenMatrixBackend
58 typedef std::size_t size_type;
60 #if HAVE_TEMPLATE_ALIASES || DOXYGEN
63 template<
typename Matrix,
typename GFSV,
typename GFSU>
64 using Pattern = EIGEN::MatrixPatternInserter<typename Matrix::Container>;
66 #else // HAVE_TEMPLATE_ALIASES
68 template<
typename Matrix,
typename GFSV,
typename GFSU>
70 :
public EIGEN::MatrixPatternInserter<typename Matrix::Container>
73 typedef EIGEN::MatrixPatternInserter<typename Matrix::Container> BaseT;
81 #endif // HAVE_TEMPLATE_ALIASES
83 template<
typename VV,
typename VU,
typename E>
86 typedef EIGEN::MatrixContainer<typename VV::GridFunctionSpace,typename VU::GridFunctionSpace, E, _Options> type;
94 #error You need Eigen to use the Eigen backend
97 #endif // DUNE_PDELAB_BACKEND_EIGEN_DESCRIPTORS_HH