1841
|
1 // DAE.cc -*- C++ -*- |
|
2 /* |
|
3 |
|
4 Copyright (C) 1996 John W. Eaton |
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
|
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
21 |
|
22 */ |
|
23 |
|
24 #if defined (__GNUG__) |
|
25 #pragma implementation |
|
26 #endif |
|
27 |
|
28 #ifdef HAVE_CONFIG_H |
|
29 #include <config.h> |
|
30 #endif |
|
31 |
|
32 #include "DAE.h" |
|
33 #include "lo-error.h" |
|
34 |
|
35 DAE::DAE (const ColumnVector& x, const ColumnVector& xxdot, |
|
36 double t, DAEFunc& f) |
|
37 : base_diff_eqn (x, t), DAEFunc (f), xdot (xxdot) |
|
38 { |
|
39 if (x.length () != xdot.length ()) |
|
40 ; // XXX FIXME XXX -- exception! |
|
41 } |
|
42 |
|
43 void |
|
44 DAE::initialize (const ColumnVector& xx, double t) |
|
45 { |
|
46 if (xx.length () != xdot.length ()) |
|
47 ; // XXX FIXME XXX -- exception! |
|
48 else |
|
49 base_diff_eqn::initialize (xx, t); |
|
50 } |
|
51 |
|
52 void |
|
53 DAE::initialize (const ColumnVector& xx, const ColumnVector& xxdot, |
|
54 double t) |
|
55 { |
|
56 if (xx.length () != xxdot.length ()) |
|
57 ; // XXX FIXME XXX -- exception! |
|
58 else |
|
59 { |
|
60 base_diff_eqn::initialize (xx, t); |
|
61 xdot = xxdot; |
|
62 } |
|
63 } |
|
64 |
|
65 /* |
|
66 ;;; Local Variables: *** |
|
67 ;;; mode: C++ *** |
|
68 ;;; page-delimiter: "^/\\*" *** |
|
69 ;;; End: *** |
|
70 */ |