refinedp0localcoefficients.hh
Go to the documentation of this file.00001
00002
00003 #ifndef DUNE_REFINED_P0_LOCALCOEFFICIENTS_HH
00004 #define DUNE_REFINED_P0_LOCALCOEFFICIENTS_HH
00005
00006 #include <cstddef>
00007 #include <iostream>
00008 #include <vector>
00009
00010 #include <dune/localfunctions/common/localkey.hh>
00011
00012 namespace Dune
00013 {
00014
00021 template<unsigned int k>
00022 class RefinedP0LocalCoefficients
00023 {
00024
00025 enum {N = 1<<k};
00026
00027 public:
00028 RefinedP0LocalCoefficients () :
00029 localKeys_(N)
00030 {
00031
00032 for (int i = 0; i < N; ++i)
00033 localKeys_[i] = LocalKey(0,0,i);
00034 }
00035
00037 std::size_t size () const
00038 {
00039 return N;
00040 }
00041
00043 const LocalKey& localKey (std::size_t i) const
00044 {
00045 return localKeys_[i];
00046 }
00047
00048 private:
00049 std::vector<LocalKey> localKeys_;
00050
00051 };
00052
00053 }
00054
00055 #endif