GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DASRT.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2002-2013 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 3 of the License, or (at your
10 option) any 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, see
19 <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if !defined (octave_DASRT_h)
24 #define octave_DASRT_h 1
25 
26 #include <cfloat>
27 
28 #include "DASRT-opts.h"
29 #include "lo-math.h"
30 
31 class
33 {
34 public:
35 
36  DASRT_result (void)
37  : x (), xdot (), t () { }
38 
39  DASRT_result (const Matrix& xx, const Matrix& xxdot, const ColumnVector& tt)
40  : x (xx), xdot (xxdot), t (tt) { }
41 
43  : x (r.x), xdot (r.xdot), t (r.t) { }
44 
46  {
47  if (this != &r)
48  {
49  x = r.x;
50  xdot = r.xdot;
51  t = r.t;
52  }
53  return *this;
54  }
55 
56  ~DASRT_result (void) { }
57 
58  Matrix state (void) const { return x; }
59  Matrix deriv (void) const { return xdot; }
60  ColumnVector times (void) const { return t; }
61 
62 private:
63 
67 };
68 
69 class
70 OCTAVE_API
71 DASRT : public DAERT, public DASRT_options
72 {
73 public:
74 
75  DASRT (void)
76  : DAERT (), DASRT_options (), initialized (false),
77  liw (0), lrw (0), ng (0), info (), iwork (), jroot (), rwork (),
78  abs_tol (), rel_tol ()
79  { }
80 
81  DASRT (const ColumnVector& s, double tm, DAERTFunc& f)
82  : DAERT (s, tm, f), DASRT_options (), initialized (false),
83  liw (0), lrw (0), ng (0), info (), iwork (), jroot (), rwork (),
84  abs_tol (), rel_tol ()
85  { }
86 
87  DASRT (const ColumnVector& s, const ColumnVector& deriv,
88  double tm, DAERTFunc& f)
89  : DAERT (s, deriv, tm, f), DASRT_options (), initialized (false),
90  liw (0), lrw (0), ng (0), info (), iwork (), jroot (), rwork (),
91  abs_tol (), rel_tol ()
92  { }
93 
94  ~DASRT (void) { }
95 
96  DASRT_result integrate (const ColumnVector& tout);
97 
98  DASRT_result integrate (const ColumnVector& tout,
99  const ColumnVector& tcrit);
100 
101  std::string error_message (void) const;
102 
103 private:
104 
106 
109 
111 
115 
117 
120 
121  void integrate (double t);
122 };
123 
124 #endif