Mercurial > hg > octave-nkf
comparison liboctave/DAE.h @ 3990:46388d6a4e44
[project @ 2002-07-16 06:20:39 by jwe]
author | jwe |
---|---|
date | Tue, 16 Jul 2002 06:20:40 +0000 |
parents | a17e16bcd1ac |
children | 4c8a2e4e0717 |
comparison
equal
deleted
inserted
replaced
3989:bdde4f33221e | 3990:46388d6a4e44 |
---|---|
21 */ | 21 */ |
22 | 22 |
23 #if !defined (octave_DAE_h) | 23 #if !defined (octave_DAE_h) |
24 #define octave_DAE_h 1 | 24 #define octave_DAE_h 1 |
25 | 25 |
26 #if defined (__GNUG__) | |
27 #pragma interface | |
28 #endif | |
29 | |
30 #include "DAEFunc.h" | 26 #include "DAEFunc.h" |
31 #include "base-de.h" | 27 #include "base-dae.h" |
32 | 28 |
33 class | 29 class |
34 DAE : public base_diff_eqn, public DAEFunc | 30 DAE : public base_diff_alg_eqn, public DAEFunc |
35 { | 31 { |
36 public: | 32 public: |
37 | 33 |
38 DAE (void) | 34 DAE (void) |
39 : base_diff_eqn (), DAEFunc (), xdot () { } | 35 : base_diff_alg_eqn (), DAEFunc () { } |
40 | 36 |
41 DAE (const ColumnVector& xx, double tt, DAEFunc& f) | 37 DAE (const ColumnVector& xx, double tt, DAEFunc& f) |
42 : base_diff_eqn (xx, tt), DAEFunc (f), xdot (x.capacity (), 0.0) { } | 38 : base_diff_alg_eqn (xx, tt), DAEFunc (f) { } |
43 | 39 |
44 DAE (const ColumnVector& xx, const ColumnVector& xxdot, | 40 DAE (const ColumnVector& xx, const ColumnVector& xxdot, |
45 double tt, DAEFunc& f); | 41 double tt, DAEFunc& f) |
42 : base_diff_alg_eqn (xx, xxdot, tt), DAEFunc (f) { } | |
46 | 43 |
47 DAE (const DAE& a) | 44 DAE (const DAE& a) |
48 : base_diff_eqn (a), DAEFunc (a), xdot (a.xdot) { } | 45 : base_diff_alg_eqn (a), DAEFunc (a){ } |
49 | 46 |
50 DAE& operator = (const DAE& a) | 47 DAE& operator = (const DAE& a) |
51 { | 48 { |
52 if (this != &a) | 49 if (this != &a) |
53 { | 50 { |
54 base_diff_eqn::operator = (a); | 51 base_diff_alg_eqn::operator = (a); |
55 DAEFunc::operator = (a); | 52 DAEFunc::operator = (a); |
56 | |
57 xdot = a.xdot; | |
58 } | 53 } |
59 return *this; | 54 return *this; |
60 } | 55 } |
61 | 56 |
62 ~DAE (void) { } | 57 ~DAE (void) { } |
63 | |
64 ColumnVector state_derivative (void) { return xdot; } | |
65 | |
66 void initialize (const ColumnVector& xx, double tt); | |
67 | |
68 void initialize (const ColumnVector& xx, const ColumnVector& xxdot, | |
69 double tt); | |
70 | |
71 protected: | |
72 | |
73 ColumnVector xdot; | |
74 }; | 58 }; |
75 | 59 |
76 #endif | 60 #endif |
77 | 61 |
78 /* | 62 /* |