p1.hh
Go to the documentation of this file.00001
00002
00003 #ifndef DUNE_P1LOCALFINITEELEMENT_HH
00004 #define DUNE_P1LOCALFINITEELEMENT_HH
00005
00006 #include <dune/common/geometrytype.hh>
00007
00008 #include <dune/localfunctions/common/localfiniteelementtraits.hh>
00009 #include "p1/p1localbasis.hh"
00010 #include "p1/p1localcoefficients.hh"
00011 #include "p1/p1localinterpolation.hh"
00012
00013 namespace Dune
00014 {
00015
00021 template<class D, class R, int dim>
00022 class P1LocalFiniteElement
00023 {
00024 public:
00027 typedef LocalFiniteElementTraits<P1LocalBasis<D,R,dim>,P1LocalCoefficients<dim>,
00028 P1LocalInterpolation<dim,P1LocalBasis<D,R,dim> > > Traits;
00029
00032 P1LocalFiniteElement ()
00033 {
00034 gt.makeSimplex(dim);
00035 }
00036
00039 const typename Traits::LocalBasisType& localBasis () const
00040 {
00041 return basis;
00042 }
00043
00046 const typename Traits::LocalCoefficientsType& localCoefficients () const
00047 {
00048 return coefficients;
00049 }
00050
00053 const typename Traits::LocalInterpolationType& localInterpolation () const
00054 {
00055 return interpolation;
00056 }
00057
00060 GeometryType type () const
00061 {
00062 return gt;
00063 }
00064
00065 P1LocalFiniteElement* clone () const
00066 {
00067 return new P1LocalFiniteElement(*this);
00068 }
00069
00070 private:
00071 P1LocalBasis<D,R,dim> basis;
00072 P1LocalCoefficients<dim> coefficients;
00073 P1LocalInterpolation<dim,P1LocalBasis<D,R,dim> > interpolation;
00074 GeometryType gt;
00075 };
00076
00077
00078
00079 }
00080
00081 #endif