From 2434290915cda6ed855e4dc2249312153b995817 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Thu, 9 Jun 2005 12:52:17 +0000 Subject: changed initialisation svn path=/trunk/externals/tb/; revision=3145 --- chaos/src/chaos_base.hpp | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'chaos/src/chaos_base.hpp') diff --git a/chaos/src/chaos_base.hpp b/chaos/src/chaos_base.hpp index 3e11201..959afdf 100644 --- a/chaos/src/chaos_base.hpp +++ b/chaos/src/chaos_base.hpp @@ -21,6 +21,9 @@ #ifndef __chaos_base_hpp #include "chaos.hpp" +#include + +#define MAXDIMENSION 5 // this should be enough for the first class chaos_base { @@ -42,6 +45,9 @@ public: m_verify(); } + std::map attr_ind; + + // check the integrity of the system virtual void m_verify() { for (int i = 0; i != get_num_eq(); ++i) @@ -52,14 +58,25 @@ public: #endif } }; - - data_t * m_data; // state of the system + + data_t m_data[MAXDIMENSION]; // state of the system protected: - virtual void m_step() = 0; - int m_num_eq; // number of equations of the system + virtual void m_step() = 0; // iteration + int m_num_eq; // number of equations of the system + flext::AtomList Parameter; // parameter + flext::AtomList System; // system }; +#define CHAOS_PRECONSTRUCTOR \ + /* dummy */ + +#define CHAOS_POSTCONSTRUCTOR \ +m_num_eq = System.Count(); + +#define CHAOS_DESTRUCTOR \ + + #define CHAOS_CALLBACKS \ public: \ @@ -69,6 +86,7 @@ void get_dimension(int &i) \ } \ FLEXT_CALLGET_I(get_dimension); + #define CHAOS_ATTRIBUTES \ FLEXT_ADDATTR_GET("dimension",get_dimension); -- cgit v1.2.1