p0.hh

Go to the documentation of this file.
00001 // -*- tab-width: 4; indent-tabs-mode: nil -*-
00002 // vi: set ts=4 sw=2 et sts=2:
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 
00021   template<class D, class R, int d>
00022   class P0LocalFiniteElement 
00023   {
00024   public:
00027         typedef LocalFiniteElementTraits<P0LocalBasis<D,R,d>, P0LocalCoefficients,
00028                                                                          P0LocalInterpolation<P0LocalBasis<D,R,d> > > Traits;
00029 
00032     P0LocalFiniteElement (const GeometryType& type) 
00033       : interpolation(type), gt(type)
00034     {}
00035     
00038         P0LocalFiniteElement (GeometryType::BasicType basicType) DUNE_DEPRECATED
00039           : interpolation(GeometryType(basicType,d)), gt(basicType,d)
00040         {}
00041 
00044         const typename Traits::LocalBasisType& localBasis () const
00045         {
00046           return basis;
00047         }
00048         
00051         const typename Traits::LocalCoefficientsType& localCoefficients () const
00052         {
00053           return coefficients;
00054         }
00055         
00058         const typename Traits::LocalInterpolationType& localInterpolation () const
00059         {
00060           return interpolation;
00061         }
00062         
00065         GeometryType type () const
00066         {
00067           return gt;
00068         }
00069 
00070     P0LocalFiniteElement* clone () const
00071     {
00072       return new P0LocalFiniteElement(*this);
00073     }
00074 
00075   private:
00076         P0LocalBasis<D,R,d> basis;
00077         P0LocalCoefficients coefficients;
00078         P0LocalInterpolation<P0LocalBasis<D,R,d> > interpolation;
00079         GeometryType gt;
00080   };
00081 
00082 }
00083 
00084 #endif

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].