dune-localfunctions  2.2.1
q1localcoefficients.hh
Go to the documentation of this file.
1 #ifndef DUNE_Q1_LOCALCOEFFICIENTS_HH
2 #define DUNE_Q1_LOCALCOEFFICIENTS_HH
3 
4 #include <cstddef>
5 #include <iostream>
6 #include <vector>
7 
9 
10 namespace Dune
11 {
12 
19  template <int dim>
21  {
22  public:
24  Q1LocalCoefficients () : li(1<<dim)
25  {
26  for (std::size_t i=0; i<(1<<dim); i++)
27  li[i] = LocalKey(i,dim,0);
28  }
29 
31  std::size_t size () const
32  {
33  return 1<<dim;
34  }
35 
37  const LocalKey& localKey (std::size_t i) const
38  {
39  return li[i];
40  }
41 
42  private:
43  std::vector<LocalKey> li;
44  };
45 
46 }
47 
48 #endif