// $Header:$ #ifndef GF_HH #define GF_HH #include #include #include #include #include "bbox.hh" #include "bboxset.hh" #include "data.hh" #include "defs.hh" #include "dh.hh" #include "ggf.hh" #include "th.hh" #include "vect.hh" using namespace std; // A real grid function template class gf: public ggf { // Types typedef vect ivect; typedef bbox ibbox; typedef bboxset ibset; typedef list iblist; typedef vector iblistvect; typedef data* tdata; // data ... typedef vector mdata; // ... for each multigrid level typedef vector cdata; // ... for each component typedef vector rdata; // ... for each refinement level typedef vector fdata; // ... for each time level public: // Constructors gf (const int varindex, const operator_type transport_operator, th& t, dh& d, const int tmin, const int tmax, const int prolongation_order_time, const int vectorlength, const int vectorindex, gf* const vectorleader); // Destructors virtual ~gf (); // Helpers protected: virtual gdata* typed_data (int tl, int rl, int c, int ml) { return new data(this->varindex, this->transport_operator, this->vectorlength, this->vectorindex, this->vectorleader ? (data*)(*this->vectorleader)(tl,rl,c,ml) : NULL); } // Access to the data public: virtual const data* operator() (int tl, int rl, int c, int ml) const; virtual data* operator() (int tl, int rl, int c, int ml); // Output virtual ostream& output (ostream& os) const; }; #endif // GF_HH