dune-pdelab 2.10-git
Loading...
Searching...
No Matches
simpledofindex.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_COMMON_SIMPLEDOFINDEX_HH
4#define DUNE_PDELAB_COMMON_SIMPLEDOFINDEX_HH
5
7#include <dune/common/hash.hh>
8
9namespace Dune {
10 namespace PDELab {
11
12
13 template<typename F>
15 : public FieldVector<F,1>
16 {
17
20
21 SimpleDOFIndex(const F& v)
22 : FieldVector<F,1>(v)
23 {}
24
25 F& back()
26 {
27 return (*this)[0];
28 }
29
30 const F& back() const
31 {
32 return (*this)[0];
33 }
34
35 };
36
37
38 template<typename F>
40 : public FieldVector<F,1>
41 {
42
45
47 : FieldVector<F,1>(v)
48 {}
49
50 F& back()
51 {
52 return (*this)[0];
53 }
54
55 const F& back() const
56 {
57 return (*this)[0];
58 }
59
60 };
61
62 template<typename F>
64 {
65 return di.back();
66 }
67
68 } // namespace PDELab
69} // namespace Dune
70
72
73
74#endif // DUNE_PDELAB_COMMON_SIMPLEDOFINDEX_HH
#define DUNE_DEFINE_HASH(template_args, type)
#define DUNE_HASH_TYPE(...)
#define DUNE_HASH_TEMPLATE_ARGS(...)
std::size_t hash_value(const DOFIndex< T, n1, n2 > &di)
Definition dofindex.hh:334
For backward compatibility – Do not use this!
Definition simpledofindex.hh:16
SimpleDOFIndex()
Definition simpledofindex.hh:18
SimpleDOFIndex(const F &v)
Definition simpledofindex.hh:21
F & back()
Definition simpledofindex.hh:25
const F & back() const
Definition simpledofindex.hh:30
Definition simpledofindex.hh:41
const F & back() const
Definition simpledofindex.hh:55
SimpleContainerIndex(const F &v)
Definition simpledofindex.hh:46
F & back()
Definition simpledofindex.hh:50
SimpleContainerIndex()
Definition simpledofindex.hh:43