dune-localfunctions  2.2.0
q22dlocalinterpolation.hh
Go to the documentation of this file.
00001 #ifndef DUNE_Q22DLOCALINTERPOLATION_HH
00002 #define DUNE_Q22DLOCALINTERPOLATION_HH
00003 
00004 #warning This file is deprecated and will be removed after Dune 2.2.  \
00005          Please use q2localinterpolation.hh instead!
00006 
00007 #include <vector>
00008 
00009 namespace Dune 
00010 {
00011   template<class LB>
00012   class Q22DLocalInterpolation 
00013   {
00014   public:
00015 
00017         template<typename F, typename C>
00018         void interpolate (const F& f, std::vector<C>& out) const
00019         {
00020           typename LB::Traits::DomainType x;
00021           typename LB::Traits::RangeType y;
00022           
00023           out.resize(9);
00024           x[0] = 0.0; x[1] = 0.0; f.evaluate(x,y); out[0] = y;
00025           x[0] = 1.0; x[1] = 0.0; f.evaluate(x,y); out[1] = y;
00026           x[0] = 0.0; x[1] = 1.0; f.evaluate(x,y); out[2] = y;
00027           x[0] = 1.0; x[1] = 1.0; f.evaluate(x,y); out[3] = y;
00028           x[0] = 0.0; x[1] = 0.5; f.evaluate(x,y); out[4] = y;
00029           x[0] = 1.0; x[1] = 0.5; f.evaluate(x,y); out[5] = y;
00030           x[0] = 0.5; x[1] = 0.0; f.evaluate(x,y); out[6] = y;
00031           x[0] = 0.5; x[1] = 1.0; f.evaluate(x,y); out[7] = y;
00032           x[0] = 0.5; x[1] = 0.5; f.evaluate(x,y); out[8] = y;
00033 
00034         }
00035   };
00036 }
00037 
00038 #endif