dune-localfunctions  2.2.0
raviartthomas2q2dlocalcoefficients.hh
Go to the documentation of this file.
00001 #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2Q2DLOCALCOEFFICIENTS_HH
00002 #define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2Q2DLOCALCOEFFICIENTS_HH
00003 
00004 #include <cstddef>
00005 #include <vector>
00006 
00007 #include "../../common/localkey.hh"
00008 
00009 namespace Dune 
00010 {
00018   class RT2Q2DLocalCoefficients 
00019   {
00020   
00021 public:
00023     RT2Q2DLocalCoefficients () : li(24)
00024     {
00025       for (std::size_t i = 0; i < 4; i++)
00026       {
00027         li[3*i] = LocalKey(i,1,0);
00028         li[3*i + 1] = LocalKey(i,1,1);
00029         li[3*i + 2] = LocalKey(i,1,2);
00030       }
00031         
00032       for (std::size_t i=0; i<12; i++)
00033       {
00034         li[12 + i] = LocalKey(0,0,i);
00035       }
00036     }
00037 
00039     std::size_t size () const
00040     {
00041       return 24;
00042     }
00043 
00045     const LocalKey& localKey (std::size_t i) const
00046     {
00047       return li[i];
00048     } 
00049 
00050 private:
00051     std::vector<LocalKey> li;
00052   };
00053 }
00054 #endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2Q2DLOCALCOEFFICIENTS_HH