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