dune-localfunctions  2.2.1
monomlocalcoefficients.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil -*-
2 #ifndef DUNE_MONOMLOCALCOEFFICIENTS_HH
3 #define DUNE_MONOMLOCALCOEFFICIENTS_HH
4 
5 #include <cstddef>
6 #include <iostream>
7 #include <vector>
8 
9 #include"../common/localkey.hh"
10 
11 namespace Dune
12 {
13 
20  template<int static_size>
22  {
23  public:
26  : index(static_size, LocalKey(0,0,0))
27  {
28  for(int i = 0; i < static_size; ++i)
29  index[i].index(i);
30  }
31 
33  std::size_t size () const
34  {
35  return static_size;
36  }
37 
39  const LocalKey& localKey (std::size_t i) const
40  {
41  return index[i];
42  }
43 
44  private:
45  std::vector<LocalKey> index;
46  };
47 
48 }
49 #endif //DUNE_MONOMLOCALCOEFFICIENTS_HH