5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH
33 typedef typename LB::Traits::RangeFieldType
Scalar;
35 for (
size_t i=0; i<5; i++)
36 sign_[i] = (s[i]) ? -1.0 : 1.0;
43 facetNormal_[0] = { 0.0, 0.0, -1.0};
44 facetNormal_[1] = {-1.0, 0.0, 0.0};
45 facetNormal_[2] = { r, 0.0, r};
46 facetNormal_[3] = { 0.0, -1.0, 0.0};
47 facetNormal_[4] = { 0.0, r, r};
48 facetNormal_[5] = { r, -r, 0.0};
51 facetArea_[1] = 1/2.0;
52 facetArea_[2] = 1/2.0 * std::sqrt(2);
53 facetArea_[3] = 1/2.0;
54 facetArea_[4] = 1/2.0 * std::sqrt(2);
55 facetArea_[5] = 1/2.0 * std::sqrt(2);
57 facetCenter_[0] = { 0.5, 0.5, 0.0};
58 facetCenter_[1] = { 0.0, 1/3.0, 1/3.0};
59 facetCenter_[2] = { 2/3.0, 1/3.0, 1/3.0};
60 facetCenter_[3] = { 1/3.0, 0.0, 1/3.0};
61 facetCenter_[4] = { 1/3.0, 2/3.0, 1/3.0};
62 facetCenter_[5] = { 1/3.0, 1/3.0, 1/3.0};
73 template<
class F,
class C>
77 for(
int i=0; i<6; i++)
78 out[i] = f(facetCenter_[i]).dot(facetNormal_[i]) * facetArea_[i] * sign_[i];
86 for(std::size_t i=1; i<5; ++i)
87 out[i] *= std::sqrt(2.0);
92 std::array<typename LB::Traits::RangeFieldType, 6> sign_;
94 std::array<typename LB::Traits::RangeFieldType, 6> facetArea_;
97 std::array<typename LB::Traits::DomainType, 6> facetNormal_;
99 std::array<typename LB::Traits::DomainType, 6> facetCenter_;
First order Raviart-Thomas shape functions on the reference hexahedron.
Definition: raviartthomas0pyramidlocalinterpolation.hh:22
RT0PyramidLocalInterpolation(std::bitset< 5 > s=0)
Make set number s, where 0 <= s < 32.
Definition: raviartthomas0pyramidlocalinterpolation.hh:31
void interpolate(const F &f, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition: raviartthomas0pyramidlocalinterpolation.hh:74
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