GNU Octave  4.0.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-2015 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
Array< octave_idx_type > iwork
Definition: DASRT.h:113
Definition: DAERT.h:30
Definition: DASRT.h:69
Matrix state(void) const
Definition: DASRT.h:58
bool initialized
Definition: DASRT.h:105
octave_idx_type ng
Definition: DASRT.h:110
Matrix x
Definition: DASRT.h:64
Array< double > rel_tol
Definition: DASRT.h:119
DASRT_result(const Matrix &xx, const Matrix &xxdot, const ColumnVector &tt)
Definition: DASRT.h:39
DASRT_result(void)
Definition: DASRT.h:36
~DASRT(void)
Definition: DASRT.h:94
Matrix xdot
Definition: DASRT.h:65
Matrix deriv(void) const
Definition: DASRT.h:59
DASRT(void)
Definition: DASRT.h:75
ColumnVector & operator=(const ColumnVector &a)
Definition: dColVector.h:53
F77_RET_T const double const double * f
DASRT(const ColumnVector &s, const ColumnVector &deriv, double tm, DAERTFunc &f)
Definition: DASRT.h:87
Definition: dMatrix.h:35
ColumnVector times(void) const
Definition: DASRT.h:60
octave_idx_type lrw
Definition: DASRT.h:108
ColumnVector t
Definition: DASRT.h:66
Array< double > rwork
Definition: DASRT.h:116
~DASRT_result(void)
Definition: DASRT.h:56
Array< octave_idx_type > info
Definition: DASRT.h:112
Array< octave_idx_type > jroot
Definition: DASRT.h:114
DASRT(const ColumnVector &s, double tm, DAERTFunc &f)
Definition: DASRT.h:81
octave_idx_type liw
Definition: DASRT.h:107
Array< double > abs_tol
Definition: DASRT.h:118
DASRT_result(const DASRT_result &r)
Definition: DASRT.h:42
F77_RET_T const double * x