00001 // QualityControlRungeKuttaMover.h: interface for the QualityControlRungeKuttaMover class. 00002 // 00004 00005 #if !defined(AFX_QUALITYCONTROLRUNGEKUTTAMOVER_H__5466FBF7_4694_4098_8D01_F8D84335A75B__INCLUDED_) 00006 #define AFX_QUALITYCONTROLRUNGEKUTTAMOVER_H__5466FBF7_4694_4098_8D01_F8D84335A75B__INCLUDED_ 00007 00008 #if _MSC_VER > 1000 00009 #pragma once 00010 #endif // _MSC_VER > 1000 00011 00012 #include <cmath> 00013 #include <stdio.h> 00014 #include <fstream> 00015 #include <iostream> 00016 #include "RK4Mover.h" 00017 using namespace std; 00018 00019 00020 class CQualityControlRungeKuttaMover : public CRK4Mover 00021 { 00022 public: 00023 CQualityControlRungeKuttaMover(double frequency, double stepSize, double eps=1.0e-05); 00024 virtual ~CQualityControlRungeKuttaMover(); 00025 void Stepper(int nRHS, double *y, double *dydt); 00026 void Move(double xInitial, double xFinal, ReactionNetwork *pReactionNetwork); 00027 void ResetStepSize(); 00028 double GetStepSize() const; 00029 void SetStepSize(double newSize); 00030 protected: 00031 double m_dEps; 00032 double m_dLastStep,m_dNextStep,m_dInitialStepSize; 00033 double *m_pdScale; 00034 static const double m_scdPGROW; 00035 static const double m_scdPSHRINK; 00036 static const double m_scdFCOR; 00037 static const double m_scdSAFETY; 00038 static const double m_scdERRCON; 00039 static const double m_scdTINY; 00040 }; 00041 00042 #endif // !defined(AFX_QUALITYCONTROLRUNGEKUTTAMOVER_H__5466FBF7_4694_4098_8D01_F8D84335A75B__INCLUDED_) 00043 00044