5 #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH 6 #define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_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;
38 Scalar r = 1/std::sqrt(2);
40 n[0] = { 0.0, -1.0, 0.0};
41 n[1] = {-1.0, 0.0, 0.0};
43 n[3] = { 0.0, 0.0, -1.0};
44 n[4] = { 0.0, 0.0, 1.0};
52 m[0] = { 0.5, 0.0, 0.5};
53 m[1] = { 0.0, 0.5, 0.5};
54 m[2] = { 0.5, 0.5, 0.5};
55 m[3] = { 1/3.0, 1/3.0, 0.0};
56 m[4] = { 1/3.0, 1/3.0, 1.0};
67 template<
class F,
class C>
71 for(
int i=0; i<5; i++)
72 out[i] = f(m[i]).dot(n[i]) * c[i] * sign[i];
77 std::array<typename LB::Traits::RangeFieldType, 5> sign;
79 std::array<typename LB::Traits::RangeFieldType, 5> c;
82 std::array<typename LB::Traits::DomainType, 5> n;
84 std::array<typename LB::Traits::DomainType, 5> m;
87 #endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH void interpolate(const F &f, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition: raviartthomas0prismlocalinterpolation.hh:68
Definition: bdfmcube.hh:17
First order Raviart-Thomas shape functions on the reference prism.
Definition: raviartthomas0prismlocalinterpolation.hh:21
RT0PrismLocalInterpolation(std::bitset< 5 > s=0)
Make set number s, where 0 <= s < 32.
Definition: raviartthomas0prismlocalinterpolation.hh:31