dune-localfunctions  2.6-git
q1localcoefficients.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_Q1_LOCALCOEFFICIENTS_HH
4 #define DUNE_Q1_LOCALCOEFFICIENTS_HH
5 
6 #include <cstddef>
7 #include <iostream>
8 #include <vector>
9 
11 
12 namespace Dune
13 {
14 
21  template <int dim>
23  {
24  public:
26  Q1LocalCoefficients () : li(1<<dim)
27  {
28  for (std::size_t i=0; i<(1<<dim); i++)
29  li[i] = LocalKey(i,dim,0);
30  }
31 
33  std::size_t size () const
34  {
35  return 1<<dim;
36  }
37 
39  const LocalKey& localKey (std::size_t i) const
40  {
41  return li[i];
42  }
43 
44  private:
45  std::vector<LocalKey> li;
46  };
47 
48 }
49 
50 #endif
localkey.hh
Dune::Q1LocalCoefficients
Layout map for Q1 elements.
Definition: q1localcoefficients.hh:22
Dune::Q1LocalCoefficients::Q1LocalCoefficients
Q1LocalCoefficients()
Standard constructor.
Definition: q1localcoefficients.hh:26
Dune::Q1LocalCoefficients::size
std::size_t size() const
number of coefficients
Definition: q1localcoefficients.hh:33
Dune::Q1LocalCoefficients::localKey
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition: q1localcoefficients.hh:39
Dune::LocalKey
Describe position of one degree of freedom.
Definition: localkey.hh:20
Dune
Definition: brezzidouglasmarini1cube2dlocalbasis.hh:15