DataInterpolation.h
00001 #ifndef gridripper_amr1d_interpolation_DataInterpolation_h
00002 #define gridripper_amr1d_interpolation_DataInterpolation_h
00003
00004
00005 #include <gridripper/tvalarray.h>
00006 #include <gridripper/config.h>
00007 #include <gridripper/lang/IllegalArgumentException.h>
00008
00009
00010 namespace gridripper { namespace amr1d {
00011
00012 class PDE;
00013
00014 namespace interpolation {
00015
00023 class DataInterpolation
00024 {
00025 private:
00026 tvalarray<int> outKxArray;
00027 tvalarray<GReal_t> outData;
00028
00029 public:
00030
00031 DataInterpolation(const tvalarray<GReal_t>& data, const tvalarray<int>& kxarr, int nc, GReal_t deltaX,
00032 int mul, int order, const PDE *pde, bool even)
00033 throw(IllegalArgumentException&);
00034
00035 ~DataInterpolation();
00036
00037 const tvalarray<GReal_t>& getData() const;
00038
00039 const tvalarray<int>& getKxArray() const;
00040
00041 private:
00042 static tvalarray<GReal_t> extend(const tvalarray<GReal_t>& data, int nc, GReal_t dx, int mul,
00043 int order, const PDE *pde, bool even);
00044
00045 static tvalarray<int> extend(const tvalarray<int>& kxarr, int mul, int order,
00046 const PDE *pde, bool even);
00047
00048 static tvalarray<GReal_t> restrict(const tvalarray<GReal_t>& data, int nc, int mul, int order,
00049 const PDE *pde, bool even);
00050
00051 static tvalarray<int> restrict(const tvalarray<int>& kxarr, int mul, int order,
00052 const PDE *pde, bool even);
00053
00054 static int getLeftMargin(const PDE *pde, bool even, int order);
00055
00056 static int getRightMargin(const PDE *pde, bool even, int order);
00057
00058 static int getMarginSize(int order) throw(IllegalArgumentException&);
00059 };
00060
00061
00062 } } }
00063
00064
00065 #endif