5 #ifndef DUNE_GENERIC_LOCALFINITEELEMENT_HH 6 #define DUNE_GENERIC_LOCALFINITEELEMENT_HH 8 #include <dune/geometry/type.hh> 9 #include <dune/geometry/typeindex.hh> 23 template<
class BasisF,
class CoeffF,
class InterpolF>
28 typename CoeffF::Object,
31 typedef typename BasisF::Key
Key;
32 static const unsigned int dimDomain = BasisF::dimension;
39 "incompatible keys between BasisCreator and CoefficientsCreator");
41 "incompatible keys between BasisCreator and InterpolationCreator" );
49 Impl::toGeometryTypeIdConstant<dimDomain>(
type(), [&](
auto geometryTypeId) {
50 finiteElement_.template create<decltype(geometryTypeId)::value>(key_);
56 : geometry_( other.
type() ),
60 Impl::toGeometryTypeIdConstant<dimDomain>(
type(), [&](
auto geometryTypeId) {
61 finiteElement_.template create<decltype(geometryTypeId)::value>(key_);
67 finiteElement_.release();
74 return *(finiteElement_.basis_);
81 return *(finiteElement_.coeff_);
88 return *(finiteElement_.interpol_);
94 return finiteElement_.basis_->size();
106 FiniteElement() : basis_(0), coeff_(0), interpol_(0) {}
108 template < GeometryType::Id geometryId >
109 void create(
const Key &key )
112 basis_ = BasisF::template create<geometryId>(key);
113 coeff_ = CoeffF::template create<geometryId>(key);
114 interpol_ = InterpolF::template create<geometryId>(key);
119 BasisF::release(basis_);
121 CoeffF::release(coeff_);
123 InterpolF::release(interpol_);
132 GeometryType geometry_;
134 FiniteElement finiteElement_;
146 DGLocalCoefficientsFactory< typename FE::BasisFactory >,
147 typename FE::InterpolationFactory>
151 typename FE::InterpolationFactory>
Base;
171 DGLocalCoefficientsFactory< typename FE::BasisFactory >,
172 LocalL2InterpolationFactory< typename FE::BasisFactory, false > >
BasisF BasisFactory
Definition: localfunctions/utility/localfiniteelement.hh:34
traits helper struct
Definition: localfiniteelementtraits.hh:12
A factory class for the dg local coefficients.
Definition: dglocalcoefficients.hh:58
InterpolF InterpolationFactory
Definition: localfunctions/utility/localfiniteelement.hh:36
Takes the basis and interpolation factory from a given LocalFiniteElement (derived from GenericLocalF...
Definition: localfunctions/utility/localfiniteelement.hh:144
Definition: tensor.hh:176
A factory class for the local l2 interpolations taking a basis factory.
Definition: l2interpolation.hh:162
DGLocalFiniteElement(const GeometryType >, const typename Base::Key &key)
Definition: localfunctions/utility/localfiniteelement.hh:157
GeometryType type() const
Definition: localfunctions/utility/localfiniteelement.hh:99
unsigned int size() const
Number of shape functions in this finite element.
Definition: localfunctions/utility/localfiniteelement.hh:92
BasisF::Key Key
Definition: localfunctions/utility/localfiniteelement.hh:31
LC LocalCoefficientsType
Definition: localfiniteelementtraits.hh:20
LocalFiniteElementTraits< typename BasisF::Object, typename CoeffF::Object, typename InterpolF::Object > Traits
Definition: localfunctions/utility/localfiniteelement.hh:29
GenericLocalFiniteElement< BasisF, CoeffF, InterpolF > This
Definition: localfunctions/utility/localfiniteelement.hh:26
const Traits::LocalInterpolationType & localInterpolation() const
Definition: localfunctions/utility/localfiniteelement.hh:86
Definition: bdfmcube.hh:17
CoeffF CoefficientFactory
Definition: localfunctions/utility/localfiniteelement.hh:35
static const unsigned int dimDomain
Definition: localfunctions/utility/localfiniteelement.hh:32
~GenericLocalFiniteElement()
Definition: localfunctions/utility/localfiniteelement.hh:65
Base::Traits Traits
Definition: localfunctions/utility/localfiniteelement.hh:153
L2LocalFiniteElement(const GeometryType >, const typename Base::Key &key)
Definition: localfunctions/utility/localfiniteelement.hh:182
LI LocalInterpolationType
Definition: localfiniteelementtraits.hh:24
LB LocalBasisType
Definition: localfiniteelementtraits.hh:16
GenericLocalFiniteElement< typename FE::BasisFactory, DGLocalCoefficientsFactory< typename FE::BasisFactory >, LocalL2InterpolationFactory< typename FE::BasisFactory, false > > Base
Definition: localfunctions/utility/localfiniteelement.hh:176
Takes the basis factory from a given LocalFiniteElement (derived from GenericLocalFiniteElement) and ...
Definition: localfunctions/utility/localfiniteelement.hh:169
GenericLocalFiniteElement< typename FE::BasisFactory, DGLocalCoefficientsFactory< typename FE::BasisFactory >, typename FE::InterpolationFactory > Base
Definition: localfunctions/utility/localfiniteelement.hh:151
const Traits::LocalBasisType & localBasis() const
Definition: localfunctions/utility/localfiniteelement.hh:72
const Traits::LocalCoefficientsType & localCoefficients() const
Definition: localfunctions/utility/localfiniteelement.hh:79
GenericLocalFiniteElement(const GeometryType >, const Key &key)
Definition: localfunctions/utility/localfiniteelement.hh:44
A LocalFiniteElement implementation based on three TopologyFactories providing the LocalBasis...
Definition: localfunctions/utility/localfiniteelement.hh:24
Base::Traits Traits
Definition: localfunctions/utility/localfiniteelement.hh:178
GenericLocalFiniteElement(const GenericLocalFiniteElement &other)
Definition: localfunctions/utility/localfiniteelement.hh:55