UserDef.h

00001 #ifndef gridripper_amr1d_initcond_UserDef_h
00002 #define gridripper_amr1d_initcond_UserDef_h
00003 
00004 #include <gridripper/amr1d/FuncInitCond.h>
00005 #include <gridripper/util/GrrProperties.h>
00006 #include <gridripper/Parameters.h>
00007 #include <gridripper/math/expr/FnCollection.h>
00008 #include <gridripper/lang/IllegalArgumentException.h>
00009 #include <map>
00010 
00011 namespace gridripper { namespace amr1d {
00012 
00013 class PDE;
00014 
00015 namespace initcond {
00016 
00017 using namespace gridripper;
00018 using namespace gridripper::util;
00019 using namespace gridripper::math::expr;
00020 
00028 class UserDef: public FuncInitCond
00029 {
00030 private:
00031     tvector<const Evaluator::Function*> functions;
00032 
00034     FnCollection* fnCollection;
00035 
00036     double time;
00037 
00038 public:
00045     UserDef(string& args, const Parameters* p, const PDE& pde)
00046         throw(InitCond::Exception&);
00047 
00048     ~UserDef();
00049 
00055     virtual GReal_t getTime() const {
00056         return time;
00057     }
00058 
00059 protected:
00066     void init(PDE* pde, GReal_t x, FieldWrapper& phi)
00067         throw(InitCond::Exception&);
00068 
00069 private:
00070     void parseArgs(const Parameters*, const PDE&, string& args)
00071         throw(IllegalArgumentException&);
00072 
00073     void destruct();
00074 };
00075 
00076 } } } // namespace gridripper::amr1d::initcond
00077 
00078 #endif /* gridripper_amr1d_initcond_UserDef_h */

Generated on Wed Jun 17 18:46:47 2009 for GridRipper by  doxygen 1.5.6