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 |
|
26 #if defined (__GNUG__) |
|
27 #pragma interface |
|
28 #endif |
|
29 |
|
30 #include <cfloat> |
|
31 #include <cmath> |
|
32 |
|
33 #include "DAE.h" |
|
34 |
3998
|
35 #include "DASPK-opts.h" |
3912
|
36 |
|
37 class |
|
38 DASPK : public DAE, public DASPK_options |
|
39 { |
|
40 public: |
|
41 |
|
42 DASPK (void); |
|
43 |
|
44 DASPK (const ColumnVector& x, double time, DAEFunc& f); |
|
45 |
|
46 DASPK (const ColumnVector& x, const ColumnVector& xdot, |
|
47 double time, DAEFunc& f); |
|
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 |
|
66 int n; |
|
67 int liw; |
|
68 int lrw; |
|
69 int sanity_checked; |
|
70 Array<int> info; |
|
71 Array<int> iwork; |
|
72 Array<double> rwork; |
|
73 |
|
74 friend int ddaspk_j (double *time, double *state, double *deriv, |
|
75 double *pd, double *cj, double *rpar, int *ipar); |
|
76 |
|
77 friend int ddaspk_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 */ |