dune-localfunctions  2.1.1
mimetic.hh
Go to the documentation of this file.
00001 // -*- tab-width: 4; indent-tabs-mode: nil -*-
00002 #ifndef DUNE_MIMETICLOCALFINITEELEMENT_HH
00003 #define DUNE_MIMETICLOCALFINITEELEMENT_HH
00004 
00005 #include <dune/common/geometrytype.hh>
00006 
00007 #include "common/localfiniteelementtraits.hh"
00008 #include "mimetic/mimeticall.hh"
00009 
00010 namespace Dune 
00011 {
00012   template<class D, class R, int dim>
00013   class MimeticLocalFiniteElement
00014   {
00015         Dune::GeometryType gt;
00016         MimeticLocalBasis<D,R,dim> basis;
00017         MimeticLocalCoefficients coefficients;
00018         MimeticLocalInterpolation<MimeticLocalBasis<D,R,dim> > interpolation;
00019         
00020   public:
00021         typedef Dune::LocalFiniteElementTraits<MimeticLocalBasis<D,R,dim>,
00022                                                                                    MimeticLocalCoefficients,
00023                                                                                    MimeticLocalInterpolation<MimeticLocalBasis<D,R,dim> > > Traits;
00024 
00025         MimeticLocalFiniteElement () 
00026         {}
00027         
00028         MimeticLocalFiniteElement (Dune::GeometryType::BasicType basicType) 
00029           : gt(basicType,dim)
00030         {}
00031         
00032         MimeticLocalFiniteElement (Dune::GeometryType::BasicType basicType, unsigned int variant) 
00033           : gt(basicType,dim), basis(variant), coefficients(variant)
00034         {}
00035         
00036         const typename Traits::LocalBasisType& localBasis () const 
00037         {
00038           return basis;
00039         }
00040         
00041         const typename Traits::LocalCoefficientsType& localCoefficients () const 
00042         {
00043           return coefficients;
00044         }
00045         
00046         const typename Traits::LocalInterpolationType& localInterpolation () const 
00047         {
00048           return interpolation;
00049         }
00050         
00051         Dune::GeometryType type () const { return gt; }
00052   };
00053 }
00054 
00055 #endif