dune-localfunctions  2.2.0
brezzidouglasmarini12d.hh
Go to the documentation of this file.
00001 #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI12DLOCALFINITEELEMENT_HH
00002 #define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI12DLOCALFINITEELEMENT_HH
00003 
00004 #include <dune/geometry/type.hh>
00005 
00006 #include "../common/localfiniteelementtraits.hh"
00007 #include "brezzidouglasmarini12d/brezzidouglasmarini12dlocalbasis.hh"
00008 #include "brezzidouglasmarini12d/brezzidouglasmarini12dlocalcoefficients.hh"
00009 #include "brezzidouglasmarini12d/brezzidouglasmarini12dlocalinterpolation.hh"
00010 
00011 namespace Dune 
00012 {
00013 
00020   template<class D, class R>
00021   class BDM12DLocalFiniteElement
00022   {
00023     
00024 public:
00025     typedef LocalFiniteElementTraits<BDM12DLocalBasis<D,R>,BDM12DLocalCoefficients,
00026                                      BDM12DLocalInterpolation<BDM12DLocalBasis<D,R> > > Traits;
00027 
00029     BDM12DLocalFiniteElement ()
00030     {
00031       gt.makeTriangle();
00032     }
00033 
00039     BDM12DLocalFiniteElement (int s) : basis(s), interpolation(s)
00040     {
00041       gt.makeTriangle();
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     BDM12DLocalBasis<D,R> basis;
00066     BDM12DLocalCoefficients coefficients;
00067     BDM12DLocalInterpolation<BDM12DLocalBasis<D,R> > interpolation;
00068     GeometryType gt;
00069   };
00070 }
00071 #endif // DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI12DLOCALFINITEELEMENT_HH