75 typedef typename LB::Traits::RangeFieldType Scalar;
76 typedef typename LB::Traits::DomainFieldType Vector;
77 typename F::Traits::RangeType y;
80 fill(out.begin(), out.end(), 0.0);
82 const int qOrder1 = 4;
83 const Dune::QuadratureRule<Scalar,1>& rule1 = Dune::QuadratureRules<Scalar,1>::rule(Dune::GeometryType(Dune::GeometryType::simplex,1), qOrder1);
85 for (
typename Dune::QuadratureRule<Scalar,1>::const_iterator it = rule1.begin();
86 it != rule1.end(); ++it)
88 Scalar qPos = it->position();
89 typename LB::Traits::DomainType localPos;
93 f.evaluate(localPos, y);
94 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0/c0;
95 out[3] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight()/c0;
99 f.evaluate(localPos, y);
100 out[1] += (y[0]*n1[0] + y[1]*n1[1])*it->weight()*sign1/c1;
101 out[4] += (y[0]*n1[0] + y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight()/c1;
103 localPos[0] = 1.0 - qPos;
105 f.evaluate(localPos, y);
106 out[2] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2/c2;
107 out[5] += (y[0]*n2[0] + y[1]*n2[1])*(2.0*qPos - 1.0)*it->weight()/c2;
110 const int qOrder2 = 8;
111 const Dune::QuadratureRule<Vector,2>& rule2 = Dune::QuadratureRules<Vector,2>::rule(Dune::GeometryType(Dune::GeometryType::simplex,2), qOrder2);
113 for (
typename Dune::QuadratureRule<Vector,2>::const_iterator it = rule2.begin();
114 it != rule2.end(); ++it)
116 Dune::FieldVector<double,2> qPos = it->position();
119 out[6] += y[0]*it->weight();
120 out[7] += y[1]*it->weight();