annotate liboctave/DAE.cc @ 1880:cbdbec67ad60

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