q1.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_Q1_LOCALFINITEELEMENT_HH
00004 #define DUNE_Q1_LOCALFINITEELEMENT_HH
00005 
00006 #include <dune/common/geometrytype.hh>
00007 #include <dune/localfunctions/common/localfiniteelementtraits.hh>
00008 #include <dune/localfunctions/lagrange/q1/q1localbasis.hh>
00009 #include <dune/localfunctions/lagrange/q1/q1localcoefficients.hh>
00010 #include <dune/localfunctions/lagrange/q1/q1localinterpolation.hh>
00011 
00012 namespace Dune 
00013 {
00014 
00017   template<class D, class R, int dim>
00018   class Q1LocalFiniteElement
00019   {
00020   public:
00023       typedef LocalFiniteElementTraits<Q1LocalBasis<D,R,dim>,Q1LocalCoefficients<dim>,
00024           Q1LocalInterpolation<dim,Q1LocalBasis<D,R,dim> > > Traits;
00025 
00028         Q1LocalFiniteElement ()
00029         {
00030           gt.makeCube(dim);
00031         }
00032 
00035         const typename Traits::LocalBasisType& localBasis () const
00036         {
00037           return basis;
00038         }
00039         
00042         const typename Traits::LocalCoefficientsType& localCoefficients () const
00043         {
00044           return coefficients;
00045         }
00046         
00049         const typename Traits::LocalInterpolationType& localInterpolation () const
00050         {
00051           return interpolation;
00052         }
00053         
00056         GeometryType type () const
00057         {
00058           return gt;
00059         }
00060 
00061     Q1LocalFiniteElement* clone () const
00062     {
00063       return new Q1LocalFiniteElement(*this);
00064     }
00065 
00066   private:
00067         Q1LocalBasis<D,R,dim> basis;
00068         Q1LocalCoefficients<dim> coefficients;
00069         Q1LocalInterpolation<dim,Q1LocalBasis<D,R,dim> > interpolation;
00070         GeometryType gt;
00071   };
00072 
00073 }
00074 
00075 #endif
Generated on Sat Apr 24 11:15:35 2010 for dune-localfunctions by  doxygen 1.6.3