3912
|
1 /* |
|
2 |
|
3 Copyright (C) 1996, 1997, 2002 John W. Eaton |
|
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_DASPK_h) |
|
24 #define octave_DASPK_h 1 |
|
25 |
4192
|
26 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION) |
3912
|
27 #pragma interface |
|
28 #endif |
|
29 |
|
30 #include <cfloat> |
|
31 #include <cmath> |
|
32 |
3998
|
33 #include "DASPK-opts.h" |
3912
|
34 |
|
35 class |
|
36 DASPK : public DAE, public DASPK_options |
|
37 { |
|
38 public: |
|
39 |
4049
|
40 DASPK (void) : DAE (), DASPK_options (), initialized (false) { } |
3912
|
41 |
4049
|
42 DASPK (const ColumnVector& state, double time, DAEFunc& f) |
|
43 : DAE (state, time, f), DASPK_options (), initialized (false) { } |
3912
|
44 |
4049
|
45 DASPK (const ColumnVector& state, const ColumnVector& deriv, |
|
46 double time, DAEFunc& f) |
|
47 : DAE (state, deriv, time, f), DASPK_options (), initialized (false) { } |
3912
|
48 |
|
49 ~DASPK (void) { } |
|
50 |
|
51 ColumnVector do_integrate (double t); |
|
52 |
|
53 Matrix do_integrate (const ColumnVector& tout); |
|
54 |
|
55 Matrix do_integrate (const ColumnVector& tout, const ColumnVector& tcrit); |
|
56 |
|
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 |
3912
|
64 private: |
|
65 |
4049
|
66 bool initialized; |
|
67 |
3912
|
68 int liw; |
|
69 int lrw; |
4049
|
70 |
3912
|
71 Array<int> info; |
|
72 Array<int> iwork; |
4049
|
73 |
3912
|
74 Array<double> rwork; |
|
75 |
4049
|
76 Array<double> abs_tol; |
|
77 Array<double> rel_tol; |
3912
|
78 |
4049
|
79 double *px; |
|
80 double *pxdot; |
|
81 double *pabs_tol; |
|
82 double *prel_tol; |
|
83 int *pinfo; |
|
84 int *piwork; |
|
85 double *prwork; |
3912
|
86 }; |
|
87 |
|
88 #endif |
|
89 |
|
90 /* |
|
91 ;;; Local Variables: *** |
|
92 ;;; mode: C++ *** |
|
93 ;;; End: *** |
|
94 */ |