dune-localfunctions  2.2.1
q22dlocalinterpolation.hh
Go to the documentation of this file.
1 #ifndef DUNE_Q22DLOCALINTERPOLATION_HH
2 #define DUNE_Q22DLOCALINTERPOLATION_HH
3 
4 #warning This file is deprecated and will be removed after Dune 2.2. \
5  Please use q2localinterpolation.hh instead!
6 
7 #include <vector>
8 
9 namespace Dune
10 {
11  template<class LB>
13  {
14  public:
15 
17  template<typename F, typename C>
18  void interpolate (const F& f, std::vector<C>& out) const
19  {
20  typename LB::Traits::DomainType x;
21  typename LB::Traits::RangeType y;
22 
23  out.resize(9);
24  x[0] = 0.0; x[1] = 0.0; f.evaluate(x,y); out[0] = y;
25  x[0] = 1.0; x[1] = 0.0; f.evaluate(x,y); out[1] = y;
26  x[0] = 0.0; x[1] = 1.0; f.evaluate(x,y); out[2] = y;
27  x[0] = 1.0; x[1] = 1.0; f.evaluate(x,y); out[3] = y;
28  x[0] = 0.0; x[1] = 0.5; f.evaluate(x,y); out[4] = y;
29  x[0] = 1.0; x[1] = 0.5; f.evaluate(x,y); out[5] = y;
30  x[0] = 0.5; x[1] = 0.0; f.evaluate(x,y); out[6] = y;
31  x[0] = 0.5; x[1] = 1.0; f.evaluate(x,y); out[7] = y;
32  x[0] = 0.5; x[1] = 0.5; f.evaluate(x,y); out[8] = y;
33 
34  }
35  };
36 }
37 
38 #endif