00001 #ifndef gridripper_phys_Hunch_h
00002 #define gridripper_phys_Hunch_h
00003
00004 #include <gridripper/Parameters.h>
00005 #include <gridripper/amr1d/FuncInitCond.h>
00006
00007 namespace gridripper { namespace phys {
00008
00009 using namespace gridripper::util;
00010 using namespace gridripper::amr1d;
00011 using namespace std;
00012
00020 class Hunch: public FuncInitCond
00021 {
00022 private:
00023 tvector<int> componentIndices;
00024
00025 protected:
00026 GReal_t x0;
00027 GReal_t deltaX;
00028 GReal_t c;
00029 GReal_t d;
00030
00031 private:
00032 void init(string& args, const Parameters* p, const PDE& pde,
00033 const string& x0name, const string& deltaXname)
00034 throw(IllegalArgumentException&);
00035
00036 protected:
00037 Hunch(string& args, const Parameters* p, const PDE& pde,
00038 const string& x0name, const string& deltaXname)
00039 throw(InitCond::Exception&, IllegalArgumentException&);
00040
00041 public:
00042 Hunch(string& args, const Parameters* p, const PDE& pde)
00043 throw(InitCond::Exception&, IllegalArgumentException&);
00044
00045 GReal_t getX0() const {
00046 return x0;
00047 }
00048
00049 virtual GReal_t function(GReal_t x) const;
00050
00051 void init(PDE* pde, GReal_t x, FieldWrapper& v) throw(InitCond::Exception&);
00052 };
00053
00054 } }
00055
00056 #endif