dune-localfunctions  2.2.1
raviartthomas2q2dlocalcoefficients.hh
Go to the documentation of this file.
1 #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2Q2DLOCALCOEFFICIENTS_HH
2 #define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2Q2DLOCALCOEFFICIENTS_HH
3 
4 #include <cstddef>
5 #include <vector>
6 
7 #include "../../common/localkey.hh"
8 
9 namespace Dune
10 {
19  {
20 
21 public:
24  {
25  for (std::size_t i = 0; i < 4; i++)
26  {
27  li[3*i] = LocalKey(i,1,0);
28  li[3*i + 1] = LocalKey(i,1,1);
29  li[3*i + 2] = LocalKey(i,1,2);
30  }
31 
32  for (std::size_t i=0; i<12; i++)
33  {
34  li[12 + i] = LocalKey(0,0,i);
35  }
36  }
37 
39  std::size_t size () const
40  {
41  return 24;
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_RAVIARTTHOMAS2Q2DLOCALCOEFFICIENTS_HH