3 #ifndef DUNE_GENERIC_LOCALFINITEELEMENT_HH
4 #define DUNE_GENERIC_LOCALFINITEELEMENT_HH
6 #include <dune/geometry/type.hh>
20 template<
class BasisF,
class CoeffF,
class InterpolF>
25 typename CoeffF::Object,
28 typedef typename BasisF::Key
Key;
29 static const unsigned int dimDomain = BasisF::dimension;
35 static_assert(Conversion<Key, typename CoeffF::Key>::sameType,
36 "incompatible keys between BasisCreator and CoefficientsCreator");
37 static_assert(Conversion<Key, typename InterpolF::Key>::sameType,
38 "incompatible keys between BasisCreator and InterpolationCreator" );
42 : topologyId_( gt.id() ),
46 GenericGeometry::IfTopology< FiniteElement::template Maker, dimDomain >::apply( topologyId_, key_, finiteElement_ );
51 : topologyId_( other.topologyId_ ),
55 GenericGeometry::IfTopology< FiniteElement::template Maker, dimDomain >::apply( topologyId_, key_, finiteElement_ );
58 ~GenericLocalFiniteElement()
60 finiteElement_.release();
67 return *(finiteElement_.basis_);
74 return *(finiteElement_.coeff_);
81 return *(finiteElement_.interpol_);
85 unsigned int size ()
const
87 return finiteElement_.basis_->size();
92 GeometryType type ()
const
94 return GeometryType(topologyId_,dimDomain);
99 unsigned int topologyId ()
const
106 FiniteElement() : basis_(0), coeff_(0), interpol_(0) {}
107 template <
class Topology>
108 void create(
const Key &key )
111 basis_ = BasisF::template create<Topology>(key);
112 coeff_ = CoeffF::template create<Topology>(key);
113 interpol_ = InterpolF::template create<Topology>(key);
118 BasisF::release(basis_);
120 CoeffF::release(coeff_);
122 InterpolF::release(interpol_);
127 template<
class Topology >
130 static void apply (
const Key &key, FiniteElement &finiteElement )
132 finiteElement.template create<Topology>(key);
139 unsigned int topologyId_;
141 FiniteElement finiteElement_;
153 DGLocalCoefficientsFactory< typename FE::BasisFactory >,
154 typename FE::InterpolationFactory>
158 typename FE::InterpolationFactory>
Base;
178 DGLocalCoefficientsFactory< typename FE::BasisFactory >,
179 LocalL2InterpolationFactory< typename FE::BasisFactory, false > >
InterpolF InterpolationFactory
Definition: localfiniteelement.hh:33
BasisF BasisFactory
Definition: localfiniteelement.hh:31
Definition: brezzidouglasmarini1cube2dlocalbasis.hh:14
L2LocalFiniteElement(const GeometryType >, const typename Base::Key &key)
Definition: localfiniteelement.hh:189
CoeffF CoefficientFactory
Definition: localfiniteelement.hh:32
Base::Traits Traits
Definition: localfiniteelement.hh:185
A factory class for the dg local coefficients.
Definition: dglocalcoefficients.hh:57
static const unsigned int dimDomain
Definition: localfiniteelement.hh:29
BasisF::Key Key
Definition: localfiniteelement.hh:28
DGLocalFiniteElement(const GeometryType >, const typename Base::Key &key)
Definition: localfiniteelement.hh:164
A factory class for the local l2 interpolations taking a basis factory and using GenericGeometry::Qua...
Definition: l2interpolation.hh:169
traits helper struct
Definition: localfiniteelementtraits.hh:10
GenericLocalFiniteElement< typename FE::BasisFactory, DGLocalCoefficientsFactory< typename FE::BasisFactory >, LocalL2InterpolationFactory< typename FE::BasisFactory, false > > Base
Definition: localfiniteelement.hh:183
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:22
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:18
Takes the basis and interpolation factory from a given LocalFiniteElement (derived from GenericLocalF...
Definition: localfiniteelement.hh:151
Base::Traits Traits
Definition: localfiniteelement.hh:160
A LocalFiniteElement implementation based on three TopologyFactories providing the LocalBasis...
Definition: localfiniteelement.hh:21
LB LocalBasisType
Definition: localfiniteelementtraits.hh:14
GenericLocalFiniteElement< typename FE::BasisFactory, DGLocalCoefficientsFactory< typename FE::BasisFactory >, typename FE::InterpolationFactory > Base
Definition: localfiniteelement.hh:158
LocalFiniteElementTraits< typename BasisF::Object, typename CoeffF::Object, typename InterpolF::Object > Traits
Definition: localfiniteelement.hh:26
GenericLocalFiniteElement< BasisF, CoeffF, InterpolF > This
Definition: localfiniteelement.hh:23
Takes the basis factory from a given LocalFiniteElement (derived from GenericLocalFiniteElement) and ...
Definition: localfiniteelement.hh:176