diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-10-06 14:38:22 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-10-06 14:38:22 -0400 |
commit | 2e25da27f14566000fb34d3859bfb470bf5fd1da (patch) | |
tree | c3514b8a1b2c79f7c2bfecac1fa26b234867e5d2 /src/vZ/Simple.hpp | |
parent | 3d8acfbde5f4eb4b612da36c136f9e8904f0c09d (diff) | |
download | vz-2e25da27f14566000fb34d3859bfb470bf5fd1da.tar.xz |
Add a new RKIntegrator base class.
Diffstat (limited to 'src/vZ/Simple.hpp')
-rw-r--r-- | src/vZ/Simple.hpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/vZ/Simple.hpp b/src/vZ/Simple.hpp index 706b52c..103357e 100644 --- a/src/vZ/Simple.hpp +++ b/src/vZ/Simple.hpp @@ -27,22 +27,20 @@ namespace vZ { // Base class for non-adaptive RK-style algorithms template <typename T> - class GenericSimpleIntegrator : public GenericIntegrator<T> + class GenericSimpleIntegrator : public GenericRKIntegrator<T> { - protected: - // Coefficients in the tableau representation of the RK algorithm - typedef std::vector<std::vector<T> > ACoefficients; - typedef std::vector<T> BCoefficients; - public: typedef typename GenericIntegrator<T>::Function Function; + protected: + typedef typename GenericRKIntegrator<T>::ACoefficients ACoefficients; + typedef typename GenericRKIntegrator<T>::BCoefficients BCoefficients; + GenericSimpleIntegrator(Function f, T dt, ACoefficients a, BCoefficients b) : GenericIntegrator<T>(f, dt), m_a(a), m_b(b) { } virtual ~GenericSimpleIntegrator() { } - protected: virtual void step(T& t, T& dt); private: @@ -52,6 +50,14 @@ namespace vZ // Type alias typedef GenericSimpleIntegrator<double> SimpleIntegrator; + + // Implementations + + template <typename T> + void + GenericSimpleIntegrator<T>::step(T& t, T& dt) + { + } } #endif // VZ_SIMPLE_HPP |