00001 #ifndef __IW_STATE__
00002 #define __IW_STATE__
00003
00004 #include "alg.hh"
00005 #include "revolve.h"
00006 #include "iwenv.hh"
00007 #include "iwsamp.hh"
00008 #include "iwtree.hh"
00009
00010 namespace TSOpt {
00011 using RVL::parse;
00012 using RVL::RVLException;
00013 using RVL::ProtectedDivision;
00014 using RVLAlg::Algorithm;
00015
00016 class IWaveSim: public Algorithm {
00017
00018 private:
00019 IWaveInfo const & ic;
00020 IWaveTree * w;
00021 std::vector<TASK_RELN *> t;
00022 std::vector<IWaveSampler *> s;
00023 grid g;
00024 bool fwd;
00025 FILE * stream;
00026
00027
00028
00029 int printact;
00030 int order;
00031 int snaps;
00032 int ndyn;
00033 RARR *** cps;
00034 int narr;
00035
00036 bool dryrun;
00037 ostream & drystr;
00038
00039 ostream & announce;
00040
00041 IWaveSim();
00042 IWaveSim(IWaveSim const &);
00043
00044 public:
00045 IWaveSim(int order,
00046 bool fwd,
00047 PARARRAY & par,
00048 FILE * stream,
00049 IWaveInfo const & _ic,
00050 int printact=-1,
00051 bool dryrun=false,
00052 ostream & drystr=cerr,
00053 ostream & announce=cerr);
00054 ~IWaveSim();
00055 void run();
00056 std::vector<IWAVE *> const & getStateArray() const { return w->getStateArray(); }
00057 std::vector<RDOM *> const & getRDOMArray() const { return w->getRDOMArray(); }
00058 void printgrid(FILE * fp) const;
00059 ostream & write(ostream & str) const;
00060 };
00061
00062 void IWaveApply(int argc, char ** argv);
00063
00064 }
00065
00066 #endif