ICN.h

00001 #ifndef gridripper_amr1d_gridint_ICN_h
00002 #define gridripper_amr1d_gridint_ICN_h
00003 
00004 #include <gridripper/amr1d/Integrator.h>
00005 #include <gridripper/amr1d/Dissipation.h>
00006 
00007 namespace gridripper { namespace amr1d {
00008 
00009 class Grid;
00010 class Grad;
00011 
00012 namespace gridint {
00013 
00014 using namespace std;
00015 
00023 class ICN: public Integrator
00024 {
00025 private:
00026     Grid* tmpg1;
00027     Grid* tmpg2;
00028     Grid* resultGrid;
00029     Grid* richardsonResultGrid1;
00030     Grid* richardsonResultGrid2;
00031     O4Dissipation dissipationOp;
00032 
00033 public:
00034     ICN(PDE& pde, const tvalarray<string>* opts, Sigma* sigma);
00035 
00036 protected:
00042     ICN(const ICN& gi, Grid& g);
00043 
00044 private:
00045     ICN(Grid* g, PDE& pde, Grad* d, Grad* d2, int deftype, Sigma* sigma);
00046 
00047 public:
00048     ~ICN();
00049 
00054     int getNumVelocity() const {
00055         return 6;
00056     }
00057 
00062     Grad& getGrad() const {
00063         return *gradOp;
00064     }
00065 
00066     void integrate(int ir);
00067 
00071     void richardson(const AMError& amerr, int ir);
00072 
00078     Integrator* createIntegrator(Grid& g, const Sigma* s) const;
00079 
00084     Integrator* cloneIntegrator(Grid& g) const;
00085 
00091     void getResult(int i, tvalarray<GReal_t>& w) const;
00092 
00093 private:
00094     void integrate(const Grid& g0, Grid& g1, Grid& g2, Grid& g3,
00095                    Grad& grad, Dissipation* dissip,
00096                    GReal_t dt, int ir);
00097 
00098     void step(GReal_t t, GReal_t dt, const Grid& g0, const Grid& gin,
00099               Grid& gout, Grad& grad, Dissipation* dissip, int ir);
00100 };
00101 
00102 } } } // namespace gridripper::amr1d::gridint
00103 
00104 #endif /* gridripper_amr1d_gridint_ICN_h */

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