dune-localfunctions  2.3.1
brezzidouglasmarini2simplex2dlocalcoefficients.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_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH
4 #define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH
5 
6 #include <cstddef>
7 #include <vector>
8 
9 #include "../../common/localkey.hh"
10 
11 namespace Dune
12 {
13 
22  {
23 
24  public:
27  {
28  for (std::size_t i = 0; i < 3; ++i)
29  {
30  li[3 * i] = LocalKey(i,1,0);
31  li[3 * i + 1] = LocalKey(i,1,1);
32  li[3 * i + 2] = LocalKey(i,1,2);
33  }
34 
35  // last DOFs are associated with the cell (codim=0)
36  li[9] = LocalKey(0,0,0);
37  li[10] = LocalKey(0,0,1);
38  li[11] = LocalKey(0,0,2);
39  }
40 
42  std::size_t size() const
43  {
44  return 12;
45  }
46 
48  const LocalKey& localKey(std::size_t i) const
49  {
50  return li[i];
51  }
52 
53  private:
54  std::vector<LocalKey> li;
55  };
56 } // end namespace Dune
57 #endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI2_SIMPLEX2D_LOCALCOEFFICIENTS_HH