diff options
author | Tim Blechmann <timblech@users.sourceforge.net> | 2005-06-09 12:52:17 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 15:11:59 +0200 |
commit | 2434290915cda6ed855e4dc2249312153b995817 (patch) | |
tree | f6c2a4c5c5c82cfcfb931dd8fa91ebb16b982721 /chaos/src/chaos_base.hpp | |
parent | 5fda6973fd8d94872a61d99d264ee5902824139d (diff) |
changed initialisation
svn path=/trunk/externals/tb/; revision=3145
Diffstat (limited to 'chaos/src/chaos_base.hpp')
-rw-r--r-- | chaos/src/chaos_base.hpp | 26 |
1 files changed, 22 insertions, 4 deletions
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 <map> + +#define MAXDIMENSION 5 // this should be enough for the first class chaos_base { @@ -42,6 +45,9 @@ public: m_verify(); } + std::map<const t_symbol*,int> 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); |