5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH
10#include <dune/localfunctions/common/localinterpolation.hh>
35 typedef typename LB::Traits::RangeFieldType
Scalar;
37 for (
size_t i=0; i<5; i++)
38 sign[i] = (s[i]) ? -1.0 : 1.0;
42 n[0] = { 0.0, 0.0, -1.0};
43 n[1] = {-1.0, 0.0, 0.0};
45 n[3] = { 0.0, -1.0, 0.0};
50 c[2] = 1/2.0 * std::sqrt(2);
52 c[4] = 1/2.0 * std::sqrt(2);
54 m[0] = { 0.5, 0.5, 0.0};
55 m[1] = { 0.0, 1/3.0, 1/3.0};
56 m[2] = { 2/3.0, 1/3.0, 1/3.0};
57 m[3] = { 1/3.0, 0.0, 1/3.0};
58 m[4] = { 1/3.0, 2/3.0, 1/3.0};
69 template<
class F,
class C>
72 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
75 for(
int i=0; i<5; i++)
76 out[i] = f(m[i]).dot(n[i]) * c[i] * sign[i];
81 std::array<typename LB::Traits::RangeFieldType, 5> sign;
83 std::array<typename LB::Traits::RangeFieldType, 5> c;
86 std::array<typename LB::Traits::DomainType, 5> n;
88 std::array<typename LB::Traits::DomainType, 5> m;
First order Raviart-Thomas shape functions on the reference hexahedron.
Definition: raviartthomas0pyramidlocalinterpolation.hh:24
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition: raviartthomas0pyramidlocalinterpolation.hh:70
RT0PyramidLocalInterpolation(std::bitset< 5 > s=0)
Make set number s, where 0 <= s < 32.
Definition: raviartthomas0pyramidlocalinterpolation.hh:33
typename Overloads::ScalarType< std::decay_t< V > >::type Scalar
Element type of some SIMD type.
Definition: interface.hh:235
Dune namespace.
Definition: alignedallocator.hh:13