5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH 
    6#define DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH 
   20    template<
typename F, 
typename C>
 
   21    void interpolate (
const F& f, std::vector<C>& out)
 const 
   23      typename LB::Traits::DomainType x;
 
   24      typename LB::Traits::RangeType y;
 
   26      static_assert(LB::Traits::dimDomain <= 3,
 
   27                    "LocalInterpolation for HierarchicalSimplexP2 finite elements" 
   28                    " is only implemented for dimDomain <=3!");
 
   30      switch ( 
int(LB::Traits::dimDomain))  {
 
   37        x[0] = 0.0;   out[0] = f(x);
 
   38        x[0] = 1.0;   out[2] = f(x);
 
   42        out[1] = y - 0.5*(out[0] + out[2]);
 
   52        x[0] = 0.0;    x[1] = 0.0;      out[0] = f(x);
 
   53        x[0] = 1.0;    x[1] = 0.0;      out[2] = f(x);
 
   54        x[0] = 0.0;    x[1] = 1.0;      out[5] = f(x);
 
   57        x[0] = 0.5;    x[1] = 0.0;      y = f(x);
 
   58        out[1] = y - 0.5*(out[0] + out[2]);
 
   60        x[0] = 0.0;    x[1] = 0.5;      y = f(x);
 
   61        out[3] = y - 0.5*(out[0] + out[5]);
 
   63        x[0] = 0.5;    x[1] = 0.5;      y = f(x);
 
   64        out[4] = y - 0.5*(out[2] + out[5]);
 
   73        x[0] = 0.0;    x[1] = 0.0;     x[2] = 0.0;    out[0] = f(x);
 
   74        x[0] = 1.0;    x[1] = 0.0;     x[2] = 0.0;    out[2] = f(x);
 
   75        x[0] = 0.0;    x[1] = 1.0;     x[2] = 0.0;    out[5] = f(x);
 
   76        x[0] = 0.0;    x[1] = 0.0;     x[2] = 1.0;    out[9] = f(x);
 
   79        x[0] = 0.5;    x[1] = 0.0;     x[2] = 0.0;    y = f(x);
 
   80        out[1] = y - 0.5*(out[0] + out[2]);
 
   82        x[0] = 0.0;    x[1] = 0.5;     x[2] = 0.0;    y = f(x);
 
   83        out[3] = y - 0.5*(out[0] + out[5]);
 
   85        x[0] = 0.5;    x[1] = 0.5;     x[2] = 0.0;    y = f(x);
 
   86        out[4] = y - 0.5*(out[2] + out[5]);
 
   88        x[0] = 0.0;    x[1] = 0.0;     x[2] = 0.5;    y = f(x);
 
   89        out[6] = y - 0.5*(out[0] + out[9]);
 
   91        x[0] = 0.5;    x[1] = 0.0;     x[2] = 0.5;    y = f(x);
 
   92        out[7] = y - 0.5*(out[2] + out[9]);
 
   94        x[0] = 0.0;    x[1] = 0.5;     x[2] = 0.5;    y = f(x);
 
   95        out[8] = y - 0.5*(out[5] + out[9]);
 
Definition: hierarchicalsimplexp2localinterpolation.hh:17
 
Dune namespace.
Definition: alignedallocator.hh:13