p1localcoefficients.hh
Go to the documentation of this file.00001 #ifndef DUNE_P1_LOCALCOEFFICIENTS_HH
00002 #define DUNE_P1_LOCALCOEFFICIENTS_HH
00003
00004 #include <cstddef>
00005 #include <iostream>
00006 #include <vector>
00007
00008 #include <dune/localfunctions/common/localkey.hh>
00009
00010 namespace Dune
00011 {
00012
00018 template <int dim>
00019 class P1LocalCoefficients
00020 {
00021 public:
00023 P1LocalCoefficients () : li(size())
00024 {
00025 for (std::size_t i=0; i<size(); i++)
00026 li[i] = LocalKey(i,dim,0);
00027 }
00028
00030 std::size_t size () const
00031 {
00032 return dim+1;
00033 }
00034
00036 const LocalKey& localKey (std::size_t i) const
00037 {
00038 return li[i];
00039 }
00040
00041 private:
00042 std::vector<LocalKey> li;
00043 };
00044
00045 }
00046
00047 #endif