4#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH
5#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_INTERPOLATION_HH
27 template<
class Geometry,
class Traits_>
30 typename Traits_::DomainField>
36 static const std::size_t dim = Traits::dimDomainLocal;
41 std::vector<typename Traits::DomainGlobal> edgev;
51 template<
typename VertexOrder>
53 const VertexOrder& vertexOrder) :
56 for(std::size_t i = 0; i < s; ++i) {
57 const std::size_t i0 = refelem.subEntity(i,dim-1,0,dim);
58 const std::size_t i1 = refelem.subEntity(i,dim-1,1,dim);
60 edgev[i] = geo.corner(i1);
61 edgev[i] -= geo.corner(i0);
62 edgev[i] /= edgev[i].two_norm();
64 const typename VertexOrder::iterator& edgeVertexOrder =
65 vertexOrder.begin(dim-1, i);
66 if(edgeVertexOrder[0] > edgeVertexOrder[1])
72 template<
typename F,
typename C>
74 typename Traits::Range y;
76 auto&& f = Impl::makeFunctionWithCallOperator<std::decay_t<
decltype(refelem.position(0,dim-1))>>(ff);
80 for(std::size_t i = 0; i < s; ++i) {
81 y = f(refelem.position(i,dim-1));
83 out[i] = y * edgev[i];
Definition: bdfmcube.hh:16
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
Interpolation for lowest order edge elements on simplices.
Definition: whitney/edges0.5/interpolation.hh:31
void interpolate(const F &ff, std::vector< C > &out) const
Interpolation of a function.
Definition: whitney/edges0.5/interpolation.hh:73
Traits_ Traits
Definition: whitney/edges0.5/interpolation.hh:33
EdgeS0_5Interpolation(const Geometry &geo, const VertexOrder &vertexOrder)
constructor
Definition: whitney/edges0.5/interpolation.hh:52