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;
36 "incompatible keys between BasisCreator and CoefficientsCreator" );
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_ );
60 finiteElement_.release();
67 return *(finiteElement_.basis_);
74 return *(finiteElement_.coeff_);
81 return *(finiteElement_.interpol_);
88 return GeometryType(topologyId_,
dimDomain);
105 FiniteElement() : basis_(0), coeff_(0), interpol_(0) {}
106 template <
class Topology>
107 void create(
const Key &key )
110 basis_ = BasisF::template create<Topology>(key);
111 coeff_ = CoeffF::template create<Topology>(key);
112 interpol_ = InterpolF::template create<Topology>(key);
117 BasisF::release(basis_);
119 CoeffF::release(coeff_);
121 InterpolF::release(interpol_);
126 template<
class Topology >
129 static void apply (
const Key &key, FiniteElement &finiteElement )
131 finiteElement.template create<Topology>(key);
138 unsigned int topologyId_;
140 FiniteElement finiteElement_;
152 DGLocalCoefficientsFactory< typename FE::BasisFactory >,
153 typename FE::InterpolationFactory>
157 typename FE::InterpolationFactory>
Base;
177 DGLocalCoefficientsFactory< typename FE::BasisFactory >,
178 LocalL2InterpolationFactory< typename FE::BasisFactory, false > >
dune_static_assert((Conversion< Key, typename CoeffF::Key >::sameType),"incompatible keys between BasisCreator and CoefficientsCreator")
traits helper struct
Definition: localfiniteelementtraits.hh:10
Base::Traits Traits
Definition: localfiniteelement.hh:159
DGLocalFiniteElement(const GeometryType >, const typename Base::Key &key)
Definition: localfiniteelement.hh:163
GenericLocalFiniteElement< typename FE::BasisFactory, DGLocalCoefficientsFactory< typename FE::BasisFactory >, typename FE::InterpolationFactory > Base
Definition: localfiniteelement.hh:157
GenericLocalFiniteElement(const GeometryType >, const Key &key)
Definition: localfiniteelement.hh:41
L2LocalFiniteElement(const GeometryType >, const typename Base::Key &key)
Definition: localfiniteelement.hh:188
Base::Traits Traits
Definition: localfiniteelement.hh:184
GeometryType type() const
Definition: localfiniteelement.hh:86
Takes the basis and interpolation factory from a given LocalFiniteElement (derived from GenericLocalF...
Definition: localfiniteelement.hh:150
A LocalFiniteElement implementation based on three TopologyFactories providing the LocalBasis...
Definition: localfiniteelement.hh:21
Takes the basis factory from a given LocalFiniteElement (derived from GenericLocalFiniteElement) and ...
Definition: localfiniteelement.hh:175
GenericLocalFiniteElement< BasisF, CoeffF, InterpolF > This
Definition: localfiniteelement.hh:23
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: localfiniteelement.hh:72
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:22
const Traits::LocalInterpolationType & localInterpolation() const
Definition: localfiniteelement.hh:79
InterpolF InterpolationFactory
Definition: localfiniteelement.hh:33
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:18
BasisF::Key Key
Definition: localfiniteelement.hh:28
static const unsigned int dimDomain
Definition: localfiniteelement.hh:29
~GenericLocalFiniteElement()
Definition: localfiniteelement.hh:58
Definition: localfiniteelement.hh:127
LB LocalBasisType
Definition: localfiniteelementtraits.hh:14
BasisF BasisFactory
Definition: localfiniteelement.hh:31
CoeffF CoefficientFactory
Definition: localfiniteelement.hh:32
A factory class for the dg local coefficients.
Definition: dglocalcoefficients.hh:57
GenericLocalFiniteElement< typename FE::BasisFactory, DGLocalCoefficientsFactory< typename FE::BasisFactory >, LocalL2InterpolationFactory< typename FE::BasisFactory, false > > Base
Definition: localfiniteelement.hh:182
static void apply(const Key &key, FiniteElement &finiteElement)
Definition: localfiniteelement.hh:129
A factory class for the local l2 interpolations taking a basis factory and using GenericGeometry::Qua...
Definition: l2interpolation.hh:169
const Traits::LocalBasisType & localBasis() const
Definition: localfiniteelement.hh:65
unsigned int topologyId() const
Definition: localfiniteelement.hh:98
LocalFiniteElementTraits< typename BasisF::Object, typename CoeffF::Object, typename InterpolF::Object > Traits
Definition: localfiniteelement.hh:26
GenericLocalFiniteElement(const GenericLocalFiniteElement &other)
Definition: localfiniteelement.hh:50