4#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH
5#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH
10#include <dune/localfunctions/whitney/edges0.5/common.hh>
26 template<
class Geometry,
class Traits_>
29 typename Traits_::DomainField>
32 typedef Traits_ Traits;
35 static const std::size_t dim = Traits::dimDomainLocal;
40 std::vector<typename Traits::DomainGlobal> edgev;
50 template<
typename VertexOrder>
52 const VertexOrder& vertexOrder) :
55 for(std::size_t i = 0; i < s; ++i) {
56 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim);
57 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim);
60 edgev[i] -= geo.
corner(i0);
63 const typename VertexOrder::iterator& edgeVertexOrder =
64 vertexOrder.begin(dim-1, i);
65 if(edgeVertexOrder[0] > edgeVertexOrder[1])
71 template<
typename F,
typename C>
73 typename Traits::Range y;
77 for(std::size_t i = 0; i < s; ++i) {
78 f.evaluate(refelem.position(i,dim-1), y);
80 out[i] = y * edgev[i];
FieldTraits< value_type >::real_type two_norm() const
two norm sqrt(sum over squared values of entries)
Definition: densevector.hh:590
Interpolation for lowest order edge elements on simplices.
Definition: interpolation.hh:30
void interpolate(const F &f, std::vector< C > &out) const
Interpolation of a function.
Definition: interpolation.hh:72
EdgeS0_5Interpolation(const Geometry &geo, const VertexOrder &vertexOrder)
constructor
Definition: interpolation.hh:51
Wrapper class for geometries.
Definition: geometry.hh:67
GlobalCoordinate corner(int i) const
Obtain a corner of the geometry.
Definition: geometry.hh:153
Dune namespace.
Definition: alignedallocator.hh:10
Common base class for edge elements.
Definition: common.hh:17
RefElem refelem
The reference element for this edge element.
Definition: common.hh:24
std::size_t s
The number of base functions.
Definition: common.hh:32