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_SIMPLE_DESCRIPTORS_HH
4#define DUNE_PDELAB_BACKEND_SIMPLE_DESCRIPTORS_HH
5
6#include <vector>
7
8#include <dune/pdelab/ordering/orderingbase.hh>
9
10namespace 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 class SparseMatrixPattern;
27
28 template<typename E>
29 using default_vector = std::vector<E>;
30
31 }
32
33#endif // DOXYGEN
34
35 namespace Simple {
36
37 template<template<typename> class Container = Simple::default_vector>
38 struct VectorBackend
39 {
40 template<typename E>
41 using vector_type = Container<E>;
42
43 typedef typename vector_type<double>::size_type size_type;
44
45 struct Traits
46 {
47 static const size_type max_blocking_depth = 0;
48 };
49
50 template<typename GFS>
51 bool blocked(const GFS& gfs) const
52 {
53 return false;
54 }
55
56 };
57
58 template<template<typename> class Container = Simple::default_vector>
59 struct MatrixBackend
60 {
61
62 typedef std::size_t size_type;
63
64 template<typename Matrix, typename GFSV, typename GFSU>
65 struct Pattern
66 {};
67
68 template<typename VV, typename VU, typename E>
69 struct MatrixHelper
70 {
71 typedef Simple::MatrixContainer<typename VV::GridFunctionSpace,typename VU::GridFunctionSpace,Container<E> > type;
72 };
73 };
74
75 template<template<typename> class Container = Simple::default_vector, typename IndexType = std::size_t>
76 struct SparseMatrixBackend
77 {
78
79 typedef IndexType size_type;
80
82 template<typename Matrix, typename GFSV, typename GFSU>
83 using Pattern = Simple::SparseMatrixPattern;
84
85 template<typename VV, typename VU, typename E>
86 struct MatrixHelper
87 {
88 typedef Simple::SparseMatrixContainer<typename VV::GridFunctionSpace,typename VU::GridFunctionSpace,Container, E, size_type> type;
89 };
90 };
91
92 } // namespace Simple
93
94 } // namespace PDELab
95} // namespace Dune
96
97#endif // DUNE_PDELAB_BACKEND_SIMPLE_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 12, 23:30, 2024)