1841
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
1841
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
20 |
|
21 */ |
|
22 |
|
23 #if !defined (octave_DASSL_h) |
|
24 #define octave_DASSL_h 1 |
|
25 |
|
26 #if defined (__GNUG__) |
|
27 #pragma interface |
|
28 #endif |
|
29 |
1871
|
30 #include <cfloat> |
1868
|
31 #include <cmath> |
|
32 |
1841
|
33 #include "DAE.h" |
|
34 |
3998
|
35 #include "DASSL-opts.h" |
1841
|
36 |
1868
|
37 class |
|
38 DASSL : public DAE, public DASSL_options |
1841
|
39 { |
|
40 public: |
|
41 |
|
42 DASSL (void); |
|
43 |
3992
|
44 DASSL (const ColumnVector& state, double time, DAEFunc& f); |
1841
|
45 |
3992
|
46 DASSL (const ColumnVector& state, const ColumnVector& xdot, |
1841
|
47 double time, DAEFunc& f); |
|
48 |
1945
|
49 ~DASSL (void) { } |
1841
|
50 |
|
51 ColumnVector do_integrate (double t); |
|
52 |
|
53 Matrix do_integrate (const ColumnVector& tout); |
|
54 |
3519
|
55 Matrix do_integrate (const ColumnVector& tout, const ColumnVector& tcrit); |
|
56 |
1841
|
57 Matrix integrate (const ColumnVector& tout, Matrix& xdot_out); |
|
58 |
|
59 Matrix integrate (const ColumnVector& tout, Matrix& xdot_out, |
|
60 const ColumnVector& tcrit); |
|
61 |
3995
|
62 std::string error_message (void) const; |
|
63 |
1841
|
64 private: |
|
65 |
3488
|
66 int n; |
1841
|
67 int liw; |
|
68 int lrw; |
3995
|
69 bool sanity_checked; |
1945
|
70 Array<int> info; |
|
71 Array<int> iwork; |
|
72 Array<double> rwork; |
1841
|
73 |
|
74 friend int ddassl_j (double *time, double *state, double *deriv, |
|
75 double *pd, double *cj, double *rpar, int *ipar); |
|
76 |
|
77 friend int ddassl_f (double *time, double *state, double *deriv, |
|
78 double *delta, int *ires, double *rpar, int *ipar); |
|
79 |
|
80 }; |
|
81 |
|
82 #endif |
|
83 |
|
84 /* |
|
85 ;;; Local Variables: *** |
|
86 ;;; mode: C++ *** |
|
87 ;;; End: *** |
|
88 */ |