dune-localfunctions
2.2.0
|
00001 // -*- tab-width: 4; indent-tabs-mode: nil -*- 00002 // vi: set ts=4 sw=2 et sts=2: 00003 #ifndef DUNE_P2_3DLOCALFINITEELEMENT_HH 00004 #define DUNE_P2_3DLOCALFINITEELEMENT_HH 00005 00006 #include <dune/geometry/type.hh> 00007 00008 #include <dune/localfunctions/common/localfiniteelementtraits.hh> 00009 #include "p23d/p23dlocalbasis.hh" 00010 #include "p23d/p23dlocalcoefficients.hh" 00011 #include "p23d/p23dlocalinterpolation.hh" 00012 00013 namespace Dune 00014 { 00015 00018 template<class D, class R> 00019 class P23DLocalFiniteElement 00020 { 00021 public: 00024 typedef LocalFiniteElementTraits<P23DLocalBasis<D,R>, 00025 P23DLocalCoefficients, 00026 P23DLocalInterpolation<P23DLocalBasis<D,R> > > Traits; 00027 00030 P23DLocalFiniteElement () 00031 { 00032 gt.makeTetrahedron(); 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 P23DLocalFiniteElement* clone () const 00064 { 00065 return new P23DLocalFiniteElement(*this); 00066 } 00067 00068 private: 00069 P23DLocalBasis<D,R> basis; 00070 P23DLocalCoefficients coefficients; 00071 P23DLocalInterpolation<P23DLocalBasis<D,R> > interpolation; 00072 GeometryType gt; 00073 }; 00074 00075 } 00076 00077 #endif