DUNE PDELab (git)

descriptors.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_PDELAB_BACKEND_EIGEN_DESCRIPTORS_HH
4#define DUNE_PDELAB_BACKEND_EIGEN_DESCRIPTORS_HH
5
6#include <vector>
7
8#if HAVE_EIGEN
9
10#include <Eigen/Dense>
11#include <Eigen/Sparse>
12
13namespace Dune {
14 namespace PDELab {
15
16#ifndef DOXYGEN
17
18 namespace Eigen {
19
20 template<typename GFS, typename E>
21 class VectorContainer;
22
23 template<typename GFSV, typename GFSU, typename ET, int _Options>
24 class MatrixContainer;
25
26 template<typename M>
27 struct MatrixPatternInserter;
28
29 }
30
31#endif // DOXYGEN
32
33 namespace Eigen {
34
39 struct VectorBackend
40 {
41 typedef std::size_t size_type;
42
43 struct Traits
44 {
45 static const size_type max_blocking_depth = 0;
46 };
47
48 template<typename GFS>
49 bool blocked(const GFS& gfs) const
50 {
51 return false;
52 }
53
54 };
55
56 template<int _Options = ::Eigen::RowMajor>
57 struct MatrixBackend
58 {
59 typedef std::size_t size_type;
60
61 size_type avg_nz_per_row;
62
63 MatrixBackend(size_type avg_nz_per_row_) : avg_nz_per_row(avg_nz_per_row_)
64 {}
65
67 template<typename Matrix, typename GFSV, typename GFSU>
68 using Pattern = PDELab::Eigen::MatrixPatternInserter<typename Matrix::Container>;
69
70 template<typename VV, typename VU, typename E>
71 struct MatrixHelper
72 {
73 typedef PDELab::Eigen::MatrixContainer<typename VV::GridFunctionSpace,typename VU::GridFunctionSpace, E, _Options> type;
74 };
75 };
76
77 } // namespace Eigen
78
79 } // namespace PDELab
80} // namespace Dune
81
82#endif // HAVE_EIGEN
83
84#endif // DUNE_PDELAB_BACKEND_EIGEN_DESCRIPTORS_HH
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 24, 23:30, 2024)