dune-localfunctions  2.6-git
raviartthomas12dlocalcoefficients.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_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH
4 #define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH
5 
6 #include <cstddef>
7 #include <vector>
8 
9 #include "../../common/localkey.hh"
10 
11 namespace Dune
12 {
13 
21  {
22 
23  public:
26  {
27  for (std::size_t i = 0; i < 3; i++)
28  {
29  li[i] = LocalKey(i,1,0);
30  li[3 + i] = LocalKey(i,1,1);
31  }
32 
33  // last two DOF are associated with the cell (codim = 0)
34  li[6] = LocalKey(0,0,0);
35  li[7] = LocalKey(0,0,1);
36  }
37 
39  std::size_t size () const
40  {
41  return 8;
42  }
43 
45  const LocalKey& localKey (std::size_t i) const
46  {
47  return li[i];
48  }
49 
50  private:
51  std::vector<LocalKey> li;
52  };
53 }
54 #endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH
Dune::RT12DLocalCoefficients::localKey
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition: raviartthomas12dlocalcoefficients.hh:45
Dune::RT12DLocalCoefficients
Layout map for Raviart-Thomas-1 elements on the reference triangle.
Definition: raviartthomas12dlocalcoefficients.hh:20
Dune::RT12DLocalCoefficients::RT12DLocalCoefficients
RT12DLocalCoefficients()
Standard constructor.
Definition: raviartthomas12dlocalcoefficients.hh:25
Dune::RT12DLocalCoefficients::size
std::size_t size() const
number of coefficients
Definition: raviartthomas12dlocalcoefficients.hh:39
Dune::LocalKey
Describe position of one degree of freedom.
Definition: localkey.hh:20
Dune
Definition: brezzidouglasmarini1cube2dlocalbasis.hh:15