aboutsummaryrefslogtreecommitdiff
path: root/chaos/src/ode_base.hpp
diff options
context:
space:
mode:
authorTim Blechmann <timblech@users.sourceforge.net>2004-12-24 23:20:22 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 15:11:57 +0200
commit5c3670b6322b60b8bc5f60e22d891fe39b854e3e (patch)
treeb4eee08fb30434b237176822e9f959e90895e342 /chaos/src/ode_base.hpp
parent45932d6b4b33ecd4f4dc2e7eab9f210dfa46cc34 (diff)
more changes ... getting stable ...
svn path=/trunk/externals/tb/; revision=2428
Diffstat (limited to 'chaos/src/ode_base.hpp')
-rw-r--r--chaos/src/ode_base.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/chaos/src/ode_base.hpp b/chaos/src/ode_base.hpp
index 6fa7e27..cc526ae 100644
--- a/chaos/src/ode_base.hpp
+++ b/chaos/src/ode_base.hpp
@@ -49,6 +49,28 @@ public:
virtual void m_step();
+ void ode_base_alloc()
+ {
+ int dimension = get_num_eq();
+
+ for (int i = 0; i != 3; ++i)
+ {
+ m_k[i] = new data_t[dimension];
+ }
+
+ m_tmp = new data_t[dimension];
+ }
+
+ void ode_base_free()
+ {
+ for (int i = 0; i != 3; ++i)
+ {
+ delete m_k[i];
+ }
+
+ delete m_tmp;
+ }
+
protected:
unsigned char m_method; /* 0: rk1, 1: rk2, 3: rk4 */