dune-pdelab  2.0.0
simple/descriptors.hh
Go to the documentation of this file.
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_SIMPLE_DESCRIPTORS_HH
4 #define DUNE_PDELAB_BACKEND_SIMPLE_DESCRIPTORS_HH
5 
6 #include <vector>
7 
9 
10 namespace Dune {
11  namespace PDELab {
12 
13 #ifndef DOXYGEN
14 
15  namespace simple {
16 
17  template<typename GFS, typename C>
18  class VectorContainer;
19 
20  template<typename GFSV, typename GFSU, typename C>
21  class MatrixContainer;
22 
23  template<typename GFSV, typename GFSU, template<typename> class C, typename ET, typename I>
24  class SparseMatrixContainer;
25 
26  template<typename _RowOrdering, typename _ColOrdering>
27  class SparseMatrixPattern;
28 
29  template<typename E>
30  using default_vector = std::vector<E>;
31 
32  }
33 
34 #endif // DOXYGEN
35 
36  template<template<typename> class Container = simple::default_vector>
38  {
39  template<typename E>
40  using vector_type = Container<E>;
41 
43 
44  struct Traits
45  {
46  static const size_type max_blocking_depth = 0;
47  };
48 
49  template<typename GFS>
50  bool blocked(const GFS& gfs) const
51  {
52  return false;
53  }
54 
55  };
56 
57  template<template<typename> class Container = simple::default_vector>
59  {
60 
61  typedef std::size_t size_type;
62 
63  template<typename Matrix, typename GFSV, typename GFSU>
64  struct Pattern
65  {};
66 
67  template<typename VV, typename VU, typename E>
68  struct MatrixHelper
69  {
71  };
72  };
73 
74  template<template<typename> class Container = simple::default_vector, typename IndexType = std::size_t>
76  {
77 
78  typedef IndexType size_type;
79 
80 #if HAVE_TEMPLATE_ALIASES || DOXYGEN
81 
83  template<typename Matrix, typename GFSV, typename GFSU>
86  typename GFSV::Ordering::Traits::DOFIndex,
87  typename GFSV::Ordering::Traits::ContainerIndex
88  >,
90  typename GFSU::Ordering::Traits::DOFIndex,
91  typename GFSU::Ordering::Traits::ContainerIndex> >;
92 
93 #else // HAVE_TEMPLATE_ALIASES
94 
95  template<typename Matrix, typename GFSV, typename GFSU>
96  struct Pattern
98  OrderingBase<
99  typename GFSV::Ordering::Traits::DOFIndex,
100  typename GFSV::Ordering::Traits::ContainerIndex
101  >,
102  OrderingBase<
103  typename GFSU::Ordering::Traits::DOFIndex,
104  typename GFSU::Ordering::Traits::ContainerIndex> >
105  {
106 
107  typedef SparseMatrixPattern<
108  typedef OrderingBase<
109  typename GFSV::Ordering::Traits::DOFIndex,
110  typename GFSV::Ordering::Traits::ContainerIndex
111  >,
112  OrderingBase<
113  typename GFSU::Ordering::Traits::DOFIndex,
114  typename GFSU::Ordering::Traits::ContainerIndex> > BaseT;
115 
116  typedef BaseT::RowOrdering RowOrdering;
117  typedef BaseT::ColOrdering ColOrdering;
118 
119  Pattern(const RowOrdering& row_ordering, const ColOrdering& col_ordering)
120  : BaseT(row_ordering,col_ordering)
121  {}
122 
123  };
124 
125 #endif // HAVE_TEMPLATE_ALIASES
126 
127  template<typename VV, typename VU, typename E>
129  {
131  };
132  };
133 
134  } // namespace PDELab
135 } // namespace Dune
136 
137 #endif // DUNE_PDELAB_BACKEND_SIMPLE_DESCRIPTORS_HH
_RowOrdering RowOrdering
Definition: sparse.hh:29
simple::MatrixContainer< typename VV::GridFunctionSpace, typename VU::GridFunctionSpace, Container< E > > type
Definition: simple/descriptors.hh:70
simple::SparseMatrixPattern< OrderingBase< typename GFSV::Ordering::Traits::DOFIndex, typename GFSV::Ordering::Traits::ContainerIndex >, OrderingBase< typename GFSU::Ordering::Traits::DOFIndex, typename GFSU::Ordering::Traits::ContainerIndex > > Pattern
The type of the pattern object passed to the GridOperator for pattern construction.
Definition: simple/descriptors.hh:91
SparseMatrixPattern(const RowOrdering &row_ordering, const ColOrdering &col_ordering)
Definition: sparse.hh:41
Definition: orderingbase.hh:22
Definition: simple/descriptors.hh:58
bool blocked(const GFS &gfs) const
Definition: simple/descriptors.hh:50
Definition: simple/matrix.hh:22
Definition: simple/descriptors.hh:64
Definition: simple/descriptors.hh:75
IndexType size_type
Definition: simple/descriptors.hh:78
Definition: simple/descriptors.hh:128
static const size_type max_blocking_depth
Definition: simple/descriptors.hh:46
simple::SparseMatrixContainer< typename VV::GridFunctionSpace, typename VU::GridFunctionSpace, Container, E, size_type > type
Definition: simple/descriptors.hh:130
Definition: simple/descriptors.hh:37
Definition: simple/descriptors.hh:68
std::size_t size_type
Definition: simple/descriptors.hh:61
Definition: simple/descriptors.hh:44
vector_type< double >::size_type size_type
Definition: simple/descriptors.hh:42
_ColOrdering ColOrdering
Definition: sparse.hh:30
Container< E > vector_type
Definition: simple/descriptors.hh:40