00001 #ifndef gridripper_amr1d_interpolation_O5r2Interpolation_h
00002 #define gridripper_amr1d_interpolation_O5r2Interpolation_h
00003
00004 #include <gridripper/config.h>
00005 #include <gridripper/amr1d/GridInterpolator.h>
00006 #include <gridripper/lang/IllegalArgumentException.h>
00007 #include <gridripper/tvalarray.h>
00008 #include <iostream>
00009
00010 namespace gridripper { namespace amr1d {
00011
00012 class FieldWrapper;
00013
00014 namespace interpolation {
00015
00016 using namespace std;
00017
00024 class O5r2Interpolator: public GridInterpolator
00025 {
00026 public:
00027 void interpolateMargin(const Grid& p, Grid& g, const PDE& pde) const
00028 throw(IllegalArgumentException&);
00029
00030 void interpolate(const Grid& p, Grid& g, const PDE& pde) const
00031 throw(IllegalArgumentException&);
00032
00033 string toString() const {
00034 return "O5r2Interpolator";
00035 }
00036
00037 private:
00038 static bool interpol_3L_3R(const PDE& pde, const Grid& p, int k,
00039 FieldWrapper& fw0, FieldWrapper& fw1,
00040 FieldWrapper& fw2, FieldWrapper& fw3,
00041 FieldWrapper& fw4, FieldWrapper& fw5,
00042 FieldWrapper& fw);
00043
00044 static bool interpol_5L_1R(const PDE& pde, const Grid& p, int k, int nc,
00045 GReal_t* w0, GReal_t* w1,
00046 GReal_t* w2, GReal_t* w3,
00047 GReal_t* w4, GReal_t* w5,
00048 GReal_t* w);
00049
00050 static bool interpol_4L_2R(const PDE& pde, const Grid& p, int k, int nc,
00051 GReal_t* w0, GReal_t* w1,
00052 GReal_t* w2, GReal_t* w3,
00053 GReal_t* w4, GReal_t* w5,
00054 GReal_t* w);
00055
00056 static bool interpol_2L_4R(const PDE& pde, const Grid& p, int k, int nc,
00057 GReal_t* w0, GReal_t* w1,
00058 GReal_t* w2, GReal_t* w3,
00059 GReal_t* w4, GReal_t* w5,
00060 GReal_t* w);
00061
00062 static bool interpol_1L_5R(const PDE& pde, const Grid& p, int k, int nc,
00063 GReal_t* w0, GReal_t* w1,
00064 GReal_t* w2, GReal_t* w3,
00065 GReal_t* w4, GReal_t* w5,
00066 GReal_t* w);
00067
00068 static void appendB(ostream& out, int f, int n);
00069 };
00070
00071 } } }
00072
00073 #endif