00001 // rdRKF_fixed.h 00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00003 // Copyright 2003 Realistic Dynamics, Inc. 00004 // All rights reserved. 00005 // 00006 // Please do not read, copy, distribute, or use without permission. 00007 // Contact: Frank C. Anderson, fca@RealisticDynamics.com 00008 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00009 #ifndef __rdRKF_fixed_h__ 00010 #define __rdRKF_fixed_h__ 00011 00012 // INCLUDES 00013 #include "rdIntegrator.h" 00014 #include <rdModel.h> 00015 #include "rdRKF.h" 00016 00017 00018 //============================================================================= 00019 //============================================================================= 00030 class RDSIMULATION_API rdRKF_fixed 00031 { 00032 //============================================================================= 00033 // DATA 00034 //============================================================================= 00035 protected: 00036 rdModel *_model; 00037 int _ny; 00038 double *_yv,*_dy; 00039 double *_k1,*_k2,*_k3,*_k4,*_k5; 00040 00041 //============================================================================= 00042 // METHODS 00043 //============================================================================= 00044 //-------------------------------------------------------------------------- 00045 // CONSTRUCTION 00046 //-------------------------------------------------------------------------- 00047 public: 00048 rdRKF_fixed(rdModel *aModel); 00049 virtual ~rdRKF_fixed(); 00050 00051 //-------------------------------------------------------------------------- 00052 // MEMORY 00053 //-------------------------------------------------------------------------- 00054 private: 00055 int allocateMemory(); 00056 int freeMemory(); 00057 00058 //-------------------------------------------------------------------------- 00059 // GET AND SET 00060 //-------------------------------------------------------------------------- 00061 public: 00062 // SET AND GET 00063 rdModel* getModel(); 00064 int getNY(); 00065 00066 //-------------------------------------------------------------------------- 00067 // INTEGRATION 00068 //-------------------------------------------------------------------------- 00069 int step(double dt,double t,double *xt,double *y); 00070 00071 //============================================================================= 00072 }; // END class rdRKF_fixed 00073 //============================================================================= 00074 //============================================================================= 00075 00076 #endif // __rdRKF_fixed_h__
1.3