dune-localfunctions  2.2.0
pyramidp2.hh
Go to the documentation of this file.
00001 // -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00002 // vi: set et ts=2 sw=2 sts=2:
00003 #ifndef DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH
00004 #define DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH
00005 
00006 #include <dune/geometry/type.hh>
00007 
00008 #include <dune/localfunctions/common/localfiniteelementtraits.hh>
00009 #include "pyramidp2/pyramidp2localbasis.hh"
00010 #include "pyramidp2/pyramidp2localcoefficients.hh"
00011 #include "pyramidp2/pyramidp2localinterpolation.hh"
00012 
00013 namespace Dune 
00014 {
00015 
00018   template<class D, class R>
00019   class PyramidP2LocalFiniteElement
00020   {
00021   public:
00024     typedef LocalFiniteElementTraits<PyramidP2LocalBasis<D,R>,
00025                                      PyramidP2LocalCoefficients,
00026                                      PyramidP2LocalInterpolation<PyramidP2LocalBasis<D,R> > > Traits;
00027     
00030     PyramidP2LocalFiniteElement ()
00031     {
00032       gt.makePyramid();
00033     }
00034     
00037     const typename Traits::LocalBasisType& localBasis () const
00038     {
00039       return basis;
00040     }
00041     
00044     const typename Traits::LocalCoefficientsType& localCoefficients () const
00045     {
00046       return coefficients;
00047     }
00048     
00051     const typename Traits::LocalInterpolationType& localInterpolation () const
00052     {
00053       return interpolation;
00054     }
00055     
00058     GeometryType type () const
00059     {
00060       return gt;
00061     }
00062     
00063     PyramidP2LocalFiniteElement* clone () const
00064     {
00065       return new PyramidP2LocalFiniteElement(*this);
00066     }
00067     
00068   private:
00069     PyramidP2LocalBasis<D,R> basis;
00070     PyramidP2LocalCoefficients coefficients;
00071     PyramidP2LocalInterpolation<PyramidP2LocalBasis<D,R> > interpolation;
00072     GeometryType gt;
00073   };
00074   
00075 }
00076 
00077 #endif