TAPs 0.7.7.3
TAPsODESolverRungeKutta4.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsODESolverRungeKutta4.hpp
00003 ******************************************************************************/
00029 /******************************************************************************
00030 SUKITTI PUNAK   (07/10/2005)
00031 UPDATE          (08/18/2010)
00032 ******************************************************************************/
00033 #ifndef TAPs_ODE_SOLVER_RUNGE_KUTTA_4_HPP
00034 #define TAPs_ODE_SOLVER_RUNGE_KUTTA_4_HPP
00035 
00036 #include "TAPsODESolver.hpp"
00037 
00038 BEGIN_NAMESPACE_TAPs__Simulation
00039 //=============================================================================
00040 //-----------------------------------------------------------------------------
00041 template <typename T, typename T_SET = T>
00042 class ODESolverRungeKutta4 : public ODESolver<T, T_SET>
00043 {
00044 public:
00045 
00046     ODESolverRungeKutta4 ();
00047 
00048     virtual ~ODESolverRungeKutta4 ();
00049 
00050     virtual void SetSize ( int vectorSize );    // set data size
00051 
00052     virtual void Solve ( 
00053         VectorSet<T_SET> &x0,   // i/p: x(t_0) an initial state vector
00054         VectorSet<T_SET> &xEnd, // o/p: x(t_1) an end state vector
00055         T t0, T t1,             // i/p: starting and ending times
00056         DerivFunc dxdt,         // i/p: a derivative function
00057         void *userData          // o/p: array of user data
00058     );
00059 
00060     //virtual void Solve_ForPtrData ( 
00061     //  VectorSetPtr<T_SET,T> &x0,      // i/p: x(t_0) an initial state vector
00062     //  VectorSetPtr<T_SET,T> &xEnd,    // o/p: x(t_1) an end state vector
00063     //  T t0, T t1,                     // i/p: starting and ending times
00064     //  DerivFunc_ForPtrData dxdt,      // i/p: a derivative function
00065     //  void *userData                  // o/p: array of user data
00066     //);
00067 
00068 private:
00069     // temp VectorSets used by the RungeKutta4 ode solver
00070     VectorSet<T_SET> vK1, vK2, vK3, vK4;
00071 };
00072 //-----------------------------------------------------------------------------
00073 //=============================================================================
00074 END_NAMESPACE_TAPs__Simulation
00075 //-----------------------------------------------------------------------------
00076 // Include definition if TAPs_USE_EXPORT is not defined
00077 //#if !defined( TAPs_USE_EXPORT )
00078     #include "TAPsODESolverRungeKutta4.cpp"
00079 //#endif
00080 //-----------------------------------------------------------------------------
00081 #endif
00082 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00083 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines