rannacherturek2dlocalinterpolation.hh

Go to the documentation of this file.
00001 #ifndef DUNE_RANNACHER_TUREK2DLOCALINTERPOLATION_HH
00002 #define DUNE_RANNACHER_TUREK2DLOCALINTERPOLATION_HH
00003 
00004 #include <vector>
00005 
00006 
00007 namespace Dune {
00008 
00009   template<class LB>
00010   class RannacherTurek2DLocalInterpolation
00011   {
00012   public:
00013 
00015     template<typename F, typename C>
00016     void interpolate (const F& f, std::vector<C>& out) const {
00017       typename LB::Traits::DomainType x;
00018       typename LB::Traits::RangeType y;
00019     
00020       out.resize(4);
00021       x[0] = 0.0; x[1] = 0.5; f.evaluate(x,y); out[0] = y;
00022       x[0] = 1.0; x[1] = 0.5; f.evaluate(x,y); out[1] = y;
00023       x[0] = 0.5; x[1] = 0.0; f.evaluate(x,y); out[2] = y;
00024       x[0] = 0.5; x[1] = 1.0; f.evaluate(x,y); out[3] = y;
00025     }
00026   };
00027 
00028 } // namespace Dune
00029 
00030 #endif // DUNE_RANNACHER_TUREK2DLOCALINTERPOLATION_HH
Generated on Sat Apr 24 11:15:35 2010 for dune-localfunctions by  doxygen 1.6.3