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