5#ifndef DUNE_LOCALFUNCTIONS_ENRICHED_SIMPLEXP1BUBBLE_LOCALINTERPOLATION_HH
6#define DUNE_LOCALFUNCTIONS_ENRICHED_SIMPLEXP1BUBBLE_LOCALINTERPOLATION_HH
35 static const int dim = LB::dimension;
36 static const int numVertices = dim+1;
38 using DomainType =
typename LB::Traits::DomainType;
39 using RangeType =
typename LB::Traits::RangeType;
49 template<
class F,
class C,
50 class R = std::invoke_result_t<F, DomainType>,
51 std::enable_if_t<std::is_convertible_v<R, C>,
int> = 0>
52 static constexpr void interpolate (
const F& f, std::vector<C>& out)
54 out.resize(numVertices+1);
60 for (
int i = 0; i < dim; ++i) {
71 std::vector<RangeType> sfValues;
72 LB::evaluateFunction(x, sfValues);
75 for (
int i = 0; i < numVertices; ++i)
76 out[numVertices] -= out[i]*sfValues[i];
Interpolation into the SimplexP1BubbleLocalBasis.
Definition: localinterpolation.hh:34
static constexpr void interpolate(const F &f, std::vector< C > &out)
Local interpolation of the function f.
Definition: localinterpolation.hh:52
Dune namespace.
Definition: alignedallocator.hh:13