dune-localfunctions  2.3.1-rc1
monomlocalcoefficients.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_MONOMLOCALCOEFFICIENTS_HH
4 #define DUNE_MONOMLOCALCOEFFICIENTS_HH
5 
6 #include <cstddef>
7 #include <iostream>
8 #include <vector>
9 
10 #include "../common/localkey.hh"
11 
12 namespace Dune
13 {
14 
21  template<int static_size>
23  {
24  public:
27  : index(static_size, LocalKey(0,0,0))
28  {
29  for(int i = 0; i < static_size; ++i)
30  index[i].index(i);
31  }
32 
34  std::size_t size () const
35  {
36  return static_size;
37  }
38 
40  const LocalKey& localKey (std::size_t i) const
41  {
42  return index[i];
43  }
44 
45  private:
46  std::vector<LocalKey> index;
47  };
48 
49 }
50 #endif //DUNE_MONOMLOCALCOEFFICIENTS_HH
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition: monomlocalcoefficients.hh:40
MonomLocalCoefficients()
Standard constructor.
Definition: monomlocalcoefficients.hh:26
Describe position of one degree of freedom.
Definition: localkey.hh:20
std::size_t size() const
number of coefficients
Definition: monomlocalcoefficients.hh:34
Layout map for Monom elements.
Definition: monomlocalcoefficients.hh:22