dune-localfunctions
2.2.0
|
00001 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- 00002 // vi: set et ts=4 sw=2 sts=2: 00003 00004 #ifndef DUNE_Q22DLOCALFINITEELEMENT_HH 00005 #define DUNE_Q22DLOCALFINITEELEMENT_HH 00006 00007 #warning This file is deprecated and will be removed after Dune 2.2. \ 00008 Please use q2.hh instead! 00009 00010 #include <dune/geometry/type.hh> 00011 00012 #include <dune/localfunctions/common/localfiniteelementtraits.hh> 00013 #include <dune/localfunctions/common/localtoglobaladaptors.hh> 00014 #include "q22d/q22dlocalbasis.hh" 00015 #include "q22d/q22dlocalcoefficients.hh" 00016 #include "q22d/q22dlocalinterpolation.hh" 00017 00018 namespace Dune 00019 { 00020 00023 template<class D, class R> 00024 class Q22DLocalFiniteElement 00025 { 00026 public: 00029 typedef LocalFiniteElementTraits<Q22DLocalBasis<D,R>,Q22DLocalCoefficients, 00030 Q22DLocalInterpolation<Q22DLocalBasis<D,R> > > Traits; 00031 00034 Q22DLocalFiniteElement () 00035 { 00036 gt.makeQuadrilateral(); 00037 } 00038 00041 const typename Traits::LocalBasisType& localBasis () const 00042 { 00043 return basis; 00044 } 00045 00048 const typename Traits::LocalCoefficientsType& localCoefficients () const 00049 { 00050 return coefficients; 00051 } 00052 00055 const typename Traits::LocalInterpolationType& localInterpolation () const 00056 { 00057 return interpolation; 00058 } 00059 00062 GeometryType type () const 00063 { 00064 return gt; 00065 } 00066 00067 private: 00068 Q22DLocalBasis<D,R> basis; 00069 Q22DLocalCoefficients coefficients; 00070 Q22DLocalInterpolation<Q22DLocalBasis<D,R> > interpolation; 00071 GeometryType gt; 00072 }; 00073 00075 00080 template<class Geometry, class RF> 00081 class Q22DFiniteElementFactory : 00082 public ScalarLocalToGlobalFiniteElementAdaptorFactory< 00083 Q22DLocalFiniteElement<typename Geometry::ctype, RF>, Geometry 00084 > 00085 { 00086 typedef Q22DLocalFiniteElement<typename Geometry::ctype, RF> LFE; 00087 typedef ScalarLocalToGlobalFiniteElementAdaptorFactory<LFE, Geometry> Base; 00088 00089 static const LFE lfe; 00090 00091 public: 00093 Q22DFiniteElementFactory() : Base(lfe) {} 00094 }; 00095 00096 template<class Geometry, class RF> 00097 const typename Q22DFiniteElementFactory<Geometry, RF>::LFE 00098 Q22DFiniteElementFactory<Geometry, RF>::lfe; 00099 } 00100 00101 #endif