5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH
16 class RT03DLocalInterpolation
28 for (std::size_t i=0; i<sign_.size(); i++)
29 sign_[i] = (s[i]) ? -1.0 : 1.0;
31 m_[0] = {1/3.0, 1/3.0, 0.0};
32 m_[1] = {1/3.0, 0.0, 1/3.0};
33 m_[2] = { 0.0, 1/3.0, 1/3.0};
34 m_[3] = {1/3.0, 1/3.0, 1/3.0};
35 n_[0] = { 0.0, 0.0, -1.0};
36 n_[1] = { 0.0, -1.0, 0.0};
37 n_[2] = { -1.0, 0.0, 0.0};
38 n_[3] = {1.0/sqrt(3.0), 1.0/sqrt(3.0), 1.0/sqrt(3.0)};
42 c_[3] = sqrt(2.0)/sqrt(3.0);
45 template<
typename F,
typename C>
46 void interpolate (
const F& f, std::vector<C>& out)
const
52 for (
int i=0; i<4; i++)
55 out[i] = (y[0]*n_[i][0]+y[1]*n_[i][1]+y[2]*n_[i][2])*sign_[i]/c_[i];
61 std::array<typename LB::Traits::RangeFieldType,4> sign_;
63 std::array<typename LB::Traits::DomainType,4> m_;
65 std::array<typename LB::Traits::DomainType,4> n_;
67 std::array<typename LB::Traits::RangeFieldType,4> c_;
RT03DLocalInterpolation(std::bitset< 4 > s=0)
Constructor with given set of face orientations.
Definition: raviartthomas03dlocalinterpolation.hh:25
Dune namespace.
Definition: alignedallocator.hh:13