00001 //************************************************************************************// 00002 // Module : ext.hpp 00003 // Date : 11/8/04 (DLR) 00004 // Copyright : 2004-2006 Copyright University Corporation for Atmospheric 00005 // Research 00006 // Description : Encapsulates the methods and data associated with 00007 // specifying and computing coefficients in an 00008 // extrapolation-based scheme with variable timestep. 00009 // Derived From : none. 00010 // Modifications: 00011 //************************************************************************************// 00012 #if !defined(EXT_HPP) 00013 #define EXT_HPP 00014 00015 #include "gtbuffer.hpp" 00016 00017 00018 class EXT 00019 { 00020 public: 00021 EXT(GSHORT iorder=2); 00022 ~EXT(); 00023 EXT(const EXT &a); 00024 00025 void SetOrder(GSHORT iorder); 00026 void SetTimestepHistory(GDBuffer *dthist); 00027 GDBuffer *GetCoeffs(); 00028 GDBuffer *GetTimestepHistory(); 00029 void ComputeCoeffs(); 00030 friend ostream& operator<<(ostream&, EXT &); // Output stream operator 00031 GDOUBLE &operator()(const GSHORT i); 00032 GDOUBLE &operator[](const GSHORT i); 00033 00034 00035 00036 private: 00037 // Private methods: 00038 00039 // Private data: 00040 GSHORT iorder_; // specified EXT order 00041 GSHORT maxorder_; // max EXT order allowed by class 00042 GDBuffer coeffs_; // buffer of EXT coeffs 00043 GDBuffer *dthist_; // timestep history pointer, managed outside of class 00044 }; 00045 #endif 00046