p0.hh
Go to the documentation of this file.00001
00002
00003 #ifndef DUNE_P0LOCALFINITEELEMENT_HH
00004 #define DUNE_P0LOCALFINITEELEMENT_HH
00005
00006 #include <dune/common/geometrytype.hh>
00007
00008 #include <dune/localfunctions/common/localfiniteelementtraits.hh>
00009 #include "p0/p0localbasis.hh"
00010 #include "p0/p0localcoefficients.hh"
00011 #include "p0/p0localinterpolation.hh"
00012
00013 namespace Dune
00014 {
00015
00018 template<class D, class R, int d>
00019 class P0LocalFiniteElement
00020 {
00021 public:
00024 typedef LocalFiniteElementTraits<P0LocalBasis<D,R,d>, P0LocalCoefficients,
00025 P0LocalInterpolation<P0LocalBasis<D,R,d> > > Traits;
00026
00027
00030 P0LocalFiniteElement (GeometryType::BasicType basicType)
00031 : interpolation(basicType,d), gt(basicType,d)
00032 {}
00033
00036 const typename Traits::LocalBasisType& localBasis () const
00037 {
00038 return basis;
00039 }
00040
00043 const typename Traits::LocalCoefficientsType& localCoefficients () const
00044 {
00045 return coefficients;
00046 }
00047
00050 const typename Traits::LocalInterpolationType& localInterpolation () const
00051 {
00052 return interpolation;
00053 }
00054
00057 GeometryType type () const
00058 {
00059 return gt;
00060 }
00061
00062 P0LocalFiniteElement* clone () const
00063 {
00064 return new P0LocalFiniteElement(*this);
00065 }
00066
00067 private:
00068 P0LocalBasis<D,R,d> basis;
00069 P0LocalCoefficients coefficients;
00070 P0LocalInterpolation<P0LocalBasis<D,R,d> > interpolation;
00071 GeometryType gt;
00072 };
00073
00074 }
00075
00076 #endif