4 #ifndef DUNE_LOCALFUNCTIONS_QKLOCALINTERPOLATION_HH
5 #define DUNE_LOCALFUNCTIONS_QKLOCALINTERPOLATION_HH
7 #include <dune/common/fvector.hh>
8 #include <dune/common/power.hh>
10 #include <dune/geometry/type.hh>
19 template<
int k,
int d,
class LB>
24 static Dune::FieldVector<int,d> multiindex (
int i)
26 Dune::FieldVector<int,d> alpha;
27 for (
int j=0; j<d; j++)
38 template<
typename F,
typename C>
41 typename LB::Traits::DomainType x;
42 typename LB::Traits::RangeType y;
44 out.resize(StaticPower<k+1,d>::power);
46 for (
int i=0; i<StaticPower<k+1,d>::power; i++)
49 Dune::FieldVector<int,d> alpha(multiindex(i));
52 for (
int j=0; j<d; j++)
53 x[j] = (1.0*alpha[j])/k;
55 f.evaluate(x,y); out[i] = y;
61 template<
int d,
class LB>
66 template<
typename F,
typename C>
69 typename LB::Traits::DomainType x(0);
70 typename LB::Traits::RangeType y;