- Home
- About DUNE
- Download
- Documentation
- Community
- Development
00001 #ifndef DUNE_Q22DLOCALINTERPOLATION_HH 00002 #define DUNE_Q22DLOCALINTERPOLATION_HH 00003 00004 #include <vector> 00005 00006 namespace Dune 00007 { 00008 template<class LB> 00009 class Q22DLocalInterpolation 00010 { 00011 public: 00012 00014 template<typename F, typename C> 00015 void interpolate (const F& f, std::vector<C>& out) const 00016 { 00017 typename LB::Traits::DomainType x; 00018 typename LB::Traits::RangeType y; 00019 00020 out.resize(9); 00021 x[0] = 0.0; x[1] = 0.0; f.evaluate(x,y); out[0] = y; 00022 x[0] = 1.0; x[1] = 0.0; f.evaluate(x,y); out[1] = y; 00023 x[0] = 0.0; x[1] = 1.0; f.evaluate(x,y); out[2] = y; 00024 x[0] = 1.0; x[1] = 1.0; f.evaluate(x,y); out[3] = y; 00025 x[0] = 0.0; x[1] = 0.5; f.evaluate(x,y); out[4] = y; 00026 x[0] = 1.0; x[1] = 0.5; f.evaluate(x,y); out[5] = y; 00027 x[0] = 0.5; x[1] = 0.0; f.evaluate(x,y); out[6] = y; 00028 x[0] = 0.5; x[1] = 1.0; f.evaluate(x,y); out[7] = y; 00029 x[0] = 0.5; x[1] = 0.5; f.evaluate(x,y); out[8] = y; 00030 00031 } 00032 }; 00033 } 00034 00035 #endif
Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].