Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

stepctrl.h

Go to the documentation of this file.
00001 
00002 // FILE stepctrl.h 
00003 
00004 #ifndef  INCLUDED_STEPCTRL_H
00005 #define  INCLUDED_STEPCTRL_H
00006 
00007 
00008 #include "odenum.h"
00009 #include "datarepr.h"
00010 
00011 
00017 class STEP_CTRL : private NAME
00018 {
00019   
00020 public:
00021   
00022   NAME::GetName;
00023   
00029   STEP_CTRL( const string & name );
00030   
00036   void SetStepSize( double h );
00037   
00041   double GetStepSize () const;
00042 
00054   virtual double PredictFirstStep( const PtrODENumeric ODE, 
00055                                  PtrDataRepr Data, 
00056                                  int order ) = 0;
00057   
00075   virtual bool PredictStep( double & hPred, double h, 
00076                             const PtrODENumeric    ODE, 
00077                             const INTERVAL_VECTOR  & LocErr, 
00078                             const INTERVAL_VECTOR  & Ytight, 
00079                             int order ) = 0;
00080   
00089   double CompMinStepSize( double t, double T );  
00090     
00101   double CompNextPoint( double h, double t, double T );
00102   
00107   double IfLastStep( double t, double h, double T );
00108   
00110   virtual void Init( const PtrODENumeric ODE ) = 0;  
00111 
00113   virtual ~STEP_CTRL() {};
00114   
00115 protected:
00116 
00117   STEP_CTRL() { hCur = 0; }
00118 
00119 private:
00120 
00122   double hCur; 
00123   
00124 };
00125 
00126 
00128 typedef STEP_CTRL* PtrStepCtrl;
00129 
00130 
00131 inline STEP_CTRL :: STEP_CTRL( const string & name )
00132   : NAME( name )
00133 { 
00134   ;
00135 }
00136 
00137 
00138 inline void STEP_CTRL :: SetStepSize( double h ) 
00139 { 
00140   assert( h != 0 );  
00141   hCur = fabs(h); 
00142 }
00143 
00144 
00145 inline double STEP_CTRL :: GetStepSize() const 
00146 { 
00147   return hCur; 
00148 }
00149 
00150 
00151 #endif 

Generated at Sun Oct 14 12:45:40 2001 for VNODE by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000