dune-localfunctions  2.4.1-rc2
raviartthomas4cube2dlocalcoefficients.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_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH
4 #define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH
5 
6 #include <cstddef>
7 #include <vector>
8 
9 #include "../../common/localkey.hh"
10 
11 namespace Dune
12 {
21  {
22 
23  public:
26  {
27  for (std::size_t i = 0; i < 4; i++)
28  {
29  li[5*i] = LocalKey(i,1,0);
30  li[5*i + 1] = LocalKey(i,1,1);
31  li[5*i + 2] = LocalKey(i,1,2);
32  li[5*i + 3] = LocalKey(i,1,3);
33  li[5*i + 4] = LocalKey(i,1,4);
34  }
35 
36  for (std::size_t i=0; i<40; i++)
37  {
38  li[20 + i] = LocalKey(0,0,i);
39  }
40  }
41 
43  std::size_t size () const
44  {
45  return 60;
46  }
47 
49  const LocalKey& localKey (std::size_t i) const
50  {
51  return li[i];
52  }
53 
54  private:
55  std::vector<LocalKey> li;
56  };
57 }
58 #endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH
std::size_t size() const
number of coefficients
Definition: raviartthomas4cube2dlocalcoefficients.hh:43
Describe position of one degree of freedom.
Definition: localkey.hh:21
Definition: brezzidouglasmarini1cube2dlocalbasis.hh:14
RT4Cube2DLocalCoefficients()
Standard constructor.
Definition: raviartthomas4cube2dlocalcoefficients.hh:25
const LocalKey & localKey(std::size_t i) const
get i&#39;th index
Definition: raviartthomas4cube2dlocalcoefficients.hh:49
Layout map for Raviart-Thomas-4 elements on quadrilaterals.
Definition: raviartthomas4cube2dlocalcoefficients.hh:20