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