- Home
- About DUNE
- Download
- Documentation
- Community
- Development
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 #include <dune/common/geometrytype.hh> 00008 00009 #include <dune/localfunctions/common/localfiniteelementtraits.hh> 00010 #include <dune/localfunctions/common/localtoglobaladaptors.hh> 00011 #include "q22d/q22dlocalbasis.hh" 00012 #include "q22d/q22dlocalcoefficients.hh" 00013 #include "q22d/q22dlocalinterpolation.hh" 00014 00015 namespace Dune 00016 { 00017 00020 template<class D, class R> 00021 class Q22DLocalFiniteElement 00022 { 00023 public: 00026 typedef LocalFiniteElementTraits<Q22DLocalBasis<D,R>,Q22DLocalCoefficients, 00027 Q22DLocalInterpolation<Q22DLocalBasis<D,R> > > Traits; 00028 00031 Q22DLocalFiniteElement () 00032 { 00033 gt.makeQuadrilateral(); 00034 } 00035 00038 const typename Traits::LocalBasisType& localBasis () const 00039 { 00040 return basis; 00041 } 00042 00045 const typename Traits::LocalCoefficientsType& localCoefficients () const 00046 { 00047 return coefficients; 00048 } 00049 00052 const typename Traits::LocalInterpolationType& localInterpolation () const 00053 { 00054 return interpolation; 00055 } 00056 00059 GeometryType type () const 00060 { 00061 return gt; 00062 } 00063 00064 private: 00065 Q22DLocalBasis<D,R> basis; 00066 Q22DLocalCoefficients coefficients; 00067 Q22DLocalInterpolation<Q22DLocalBasis<D,R> > interpolation; 00068 GeometryType gt; 00069 }; 00070 00072 00077 template<class Geometry, class RF> 00078 class Q22DFiniteElementFactory : 00079 public ScalarLocalToGlobalFiniteElementAdaptorFactory< 00080 Q22DLocalFiniteElement<typename Geometry::ctype, RF>, Geometry 00081 > 00082 { 00083 typedef Q22DLocalFiniteElement<typename Geometry::ctype, RF> LFE; 00084 typedef ScalarLocalToGlobalFiniteElementAdaptorFactory<LFE, Geometry> Base; 00085 00086 static const LFE lfe; 00087 00088 public: 00090 Q22DFiniteElementFactory() : Base(lfe) {} 00091 }; 00092 00093 template<class Geometry, class RF> 00094 const typename Q22DFiniteElementFactory<Geometry, RF>::LFE 00095 Q22DFiniteElementFactory<Geometry, RF>::lfe; 00096 } 00097 00098 #endif
Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].