hierarchicalp2withelementbubble.hh
Go to the documentation of this file.00001 #ifndef DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH
00002 #define DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH
00003
00004 #include <dune/common/geometrytype.hh>
00005
00006 #include <dune/localfunctions/common/localfiniteelementtraits.hh>
00007 #include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>
00008
00009
00010 namespace Dune
00011 {
00012
00015 template<class D, class R, int dim>
00016 class HierarchicalP2WithElementBubbleLocalFiniteElement
00017 {
00018
00019 dune_static_assert(dim==2, "HierarchicalP2WithElementBubbleLocalFiniteElement only implemented for dim==2.");
00020
00021 public:
00024 typedef LocalFiniteElementTraits<HierarchicalSimplexP2WithElementBubbleLocalBasis<D,R,dim>,
00025 HierarchicalSimplexP2WithElementBubbleLocalCoefficients<dim>,
00026 HierarchicalSimplexP2WithElementBubbleLocalInterpolation<HierarchicalSimplexP2WithElementBubbleLocalBasis<D,R,dim> > > Traits;
00027
00030 HierarchicalP2WithElementBubbleLocalFiniteElement ()
00031 {
00032 gt_.makeTriangle();
00033 }
00034
00037 const typename Traits::LocalBasisType& localBasis () const
00038 {
00039 return basis_;
00040 }
00041
00044 const typename Traits::LocalCoefficientsType& localCoefficients () const
00045 {
00046 return coefficients_;
00047 }
00048
00051 const typename Traits::LocalInterpolationType& localInterpolation () const
00052 {
00053 return interpolation_;
00054 }
00055
00058 GeometryType type () const
00059 {
00060 return gt_;
00061 }
00062
00063 HierarchicalP2WithElementBubbleLocalFiniteElement* clone () const
00064 {
00065 return new HierarchicalP2WithElementBubbleLocalFiniteElement(*this);
00066 }
00067
00068 private:
00069 HierarchicalSimplexP2WithElementBubbleLocalBasis<D,R,dim> basis_;
00070
00071 HierarchicalSimplexP2WithElementBubbleLocalCoefficients<dim> coefficients_;
00072
00073 HierarchicalSimplexP2WithElementBubbleLocalInterpolation<HierarchicalSimplexP2WithElementBubbleLocalBasis<D,R,dim> > interpolation_;
00074
00075 GeometryType gt_;
00076 };
00077
00078 }
00079
00080 #endif