From 2e25da27f14566000fb34d3859bfb470bf5fd1da Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 6 Oct 2010 14:38:22 -0400 Subject: Add a new RKIntegrator base class. --- src/vZ/Simple.hpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/vZ/Simple.hpp') 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 - class GenericSimpleIntegrator : public GenericIntegrator + class GenericSimpleIntegrator : public GenericRKIntegrator { - protected: - // Coefficients in the tableau representation of the RK algorithm - typedef std::vector > ACoefficients; - typedef std::vector BCoefficients; - public: typedef typename GenericIntegrator::Function Function; + protected: + typedef typename GenericRKIntegrator::ACoefficients ACoefficients; + typedef typename GenericRKIntegrator::BCoefficients BCoefficients; + GenericSimpleIntegrator(Function f, T dt, ACoefficients a, BCoefficients b) : GenericIntegrator(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 SimpleIntegrator; + + // Implementations + + template + void + GenericSimpleIntegrator::step(T& t, T& dt) + { + } } #endif // VZ_SIMPLE_HPP -- cgit v1.2.3