3#ifndef DUNE_DGLOCALCOEFFICIENTS_HH
4#define DUNE_DGLOCALCOEFFICIENTS_HH
9#include <dune/geometry/topologyfactory.hh>
10#include <dune/localfunctions/common/localkey.hh>
30 for(
unsigned i = 0; i < n; ++i )
31 localKey_[ i ] =
LocalKey( 0, 0, i );
34 const LocalKey &localKey (
const unsigned int i )
const
37 return localKey_[ i ];
40 unsigned int size ()
const
42 return localKey_.size();
46 std::vector< LocalKey > localKey_;
56 template<
class BasisCreator >
57 struct DGLocalCoefficientsFactory;
58 template<
class BasisFactory >
59 struct DGLocalCoefficientsFactoryTraits
61 static const unsigned int dimension = BasisFactory::dimension;
62 typedef typename BasisFactory::Key Key;
63 typedef DGLocalCoefficients LocalCoefficients;
64 typedef const DGLocalCoefficients Object;
65 typedef DGLocalCoefficientsFactory<BasisFactory> Factory;
68 template<
class BasisFactory >
70 public TopologyFactory< DGLocalCoefficientsFactoryTraits<BasisFactory> >
72 typedef DGLocalCoefficientsFactoryTraits<BasisFactory> Traits;
74 static const unsigned int dimension = Traits::dimension;
75 typedef typename Traits::Key Key;
78 template<
class Topology >
79 static Object *createObject (
const Key &key )
81 const typename BasisFactory::Object *basis
82 = BasisFactory::template create< Topology >( key );
84 BasisFactory::release( basis );
A class providing local coefficients for dg spaces.
Definition: dglocalcoefficients.hh:22
DGLocalCoefficients(const unsigned int n)
construct local keys for n basis functions
Definition: dglocalcoefficients.hh:27
Describe position of one degree of freedom.
Definition: localkey.hh:21
Dune namespace.
Definition: alignedallocator.hh:10
A factory class for the dg local coefficients.
Definition: dglocalcoefficients.hh:71
Provide a factory over the generic topologies.
Definition: topologyfactory.hh:39