dune-localfunctions  2.2.1
raviartthomas1q2dlocalcoefficients.hh
Go to the documentation of this file.
1 #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1Q2DLOCALCOEFFICIENTS_HH
2 #define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1Q2DLOCALCOEFFICIENTS_HH
3 
4 #include <cstddef>
5 #include <vector>
6 
7 #include "../../common/localkey.hh"
8 
9 namespace Dune
10 {
11 
20  {
21 
22 public:
25  {
26  for (std::size_t i=0; i < 4; i++)
27  {
28  li[2*i] = LocalKey(i,1,0);
29  li[2*i + 1] = LocalKey(i,1,1);
30  }
31 
32  li[8] = LocalKey(0,0,0);
33  li[9] = LocalKey(0,0,1);
34  li[10] = LocalKey(0,0,2);
35  li[11] = LocalKey(0,0,3);
36  }
37 
39  std::size_t size () const
40  {
41  return 12;
42  }
43 
45  const LocalKey& localKey (std::size_t i) const
46  {
47  return li[i];
48  }
49 
50 private:
51  std::vector<LocalKey> li;
52  };
53 }
54 #endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1Q2DLOCALCOEFFICIENTS_HH