dune-localfunctions  2.2.0
raviartthomas12dlocalcoefficients.hh
Go to the documentation of this file.
00001 #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH
00002 #define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH
00003 
00004 #include <cstddef>
00005 #include <vector>
00006 
00007 #include "../../common/localkey.hh"
00008 
00009 namespace Dune 
00010 {
00011 
00018   class RT12DLocalCoefficients 
00019   {
00020 
00021 public:
00023     RT12DLocalCoefficients () : li(8)
00024     {
00025       for (std::size_t i = 0; i < 3; i++)
00026       {
00027         li[i] = LocalKey(i,1,0);
00028         li[3 + i] = LocalKey(i,1,1);
00029       }
00030 
00031       // last two DOF are associated with the cell (codim = 0)
00032       li[6] = LocalKey(0,0,0);
00033       li[7] = LocalKey(0,0,1);
00034     }
00035 
00037     std::size_t size () const
00038     {
00039       return 8;
00040     }
00041 
00043     const LocalKey& localKey (std::size_t i) const
00044     {
00045       return li[i];
00046     } 
00047 
00048 private:
00049     std::vector<LocalKey> li;
00050   };
00051 }
00052 #endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH