dune-localfunctions  2.2.0
raviartthomas2q2d.hh
Go to the documentation of this file.
00001 #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2Q2DLOCALFINITEELEMENT_HH
00002 #define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2Q2DLOCALFINITEELEMENT_HH
00003 
00004 #include <dune/geometry/type.hh>
00005 
00006 #include "../common/localfiniteelementtraits.hh"
00007 #include "raviartthomas2q2d/raviartthomas2q2dlocalbasis.hh"
00008 #include "raviartthomas2q2d/raviartthomas2q2dlocalcoefficients.hh"
00009 #include "raviartthomas2q2d/raviartthomas2q2dlocalinterpolation.hh"
00010 
00011 namespace Dune 
00012 {
00019   template<class D, class R>
00020   class RT2Q2DLocalFiniteElement 
00021   {
00022   
00023 public:
00024     typedef LocalFiniteElementTraits<RT2Q2DLocalBasis<D,R>,RT2Q2DLocalCoefficients,
00025                                      RT2Q2DLocalInterpolation<RT2Q2DLocalBasis<D,R> > > Traits;
00026 
00028     RT2Q2DLocalFiniteElement ()
00029     {
00030       gt.makeQuadrilateral();
00031     }
00032 
00038     RT2Q2DLocalFiniteElement (int s) : basis(s), interpolation(s)
00039     {
00040       gt.makeQuadrilateral();
00041     }
00042 
00043     const typename Traits::LocalBasisType& localBasis () const
00044     {
00045       return basis;
00046     }
00047     
00048     const typename Traits::LocalCoefficientsType& localCoefficients () const
00049     {
00050       return coefficients;
00051     }
00052     
00053     const typename Traits::LocalInterpolationType& localInterpolation () const
00054     {
00055       return interpolation;
00056     }
00057     
00058     GeometryType type () const
00059     {
00060       return gt;
00061     }
00062 
00063 private:
00064     RT2Q2DLocalBasis<D,R> basis;
00065     RT2Q2DLocalCoefficients coefficients;
00066     RT2Q2DLocalInterpolation<RT2Q2DLocalBasis<D,R> > interpolation;
00067     GeometryType gt;
00068   };
00069 }
00070 #endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2Q2DLOCALFINITEELEMENT_HH