dune-localfunctions  2.2.0
pyramidp1.hh
Go to the documentation of this file.
00001 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002 // vi: set et ts=4 sw=2 sts=2:
00003 
00004 #ifndef DUNE_PYRAMID_P1_LOCALFINITEELEMENT_HH
00005 #define DUNE_PYRAMID_P1_LOCALFINITEELEMENT_HH
00006 
00007 #include <dune/geometry/type.hh>
00008 
00009 #include <dune/localfunctions/common/localfiniteelementtraits.hh>
00010 
00011 #include "pyramidp1/pyramidp1localbasis.hh"
00012 #include "pyramidp1/pyramidp1localcoefficients.hh"
00013 #include "pyramidp1/pyramidp1localinterpolation.hh"
00014 
00015 namespace Dune 
00016 {
00017 
00020   template<class D, class R>
00021   class PyramidP1LocalFiniteElement 
00022   {
00023   public:
00026         typedef LocalFiniteElementTraits<PyramidP1LocalBasis<D,R>,PyramidP1LocalCoefficients,
00027                                                                          PyramidP1LocalInterpolation<PyramidP1LocalBasis<D,R> > > Traits;
00028         
00029 
00030 
00033         PyramidP1LocalFiniteElement ()
00034         {
00035           gt.makePyramid();
00036         }
00037         
00038 
00041         const typename Traits::LocalBasisType& localBasis () const
00042         {
00043           return basis;
00044         }
00045         
00048         const typename Traits::LocalCoefficientsType& localCoefficients () const
00049         {
00050           return coefficients;
00051         }
00052         
00055         const typename Traits::LocalInterpolationType& localInterpolation () const
00056         {
00057           return interpolation;
00058         }
00059         
00062         GeometryType type () const
00063         {
00064           return gt;
00065         }
00066 
00067     PyramidP1LocalFiniteElement* clone () const
00068     {
00069       return new PyramidP1LocalFiniteElement(*this);
00070     }
00071 
00072   private:
00073         PyramidP1LocalBasis<D,R> basis;
00074         PyramidP1LocalCoefficients coefficients;
00075         PyramidP1LocalInterpolation<PyramidP1LocalBasis<D,R> > interpolation;
00076         GeometryType gt;
00077   };
00078 
00079 }
00080 
00081 #endif