GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
DASRT.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2002-2018 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
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License 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 <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if ! defined (octave_DASRT_h)
24 #define octave_DASRT_h 1
25 
26 #include "octave-config.h"
27 
28 #include <string>
29 
30 #include "Array.h"
31 #include "DASRT-opts.h"
32 #include "dMatrix.h"
33 
34 class
36 {
37 public:
38 
39  DASRT_result (void)
40  : x (), xdot (), t () { }
41 
42  DASRT_result (const Matrix& xx, const Matrix& xxdot, const ColumnVector& tt)
43  : x (xx), xdot (xxdot), t (tt) { }
44 
46  : x (r.x), xdot (r.xdot), t (r.t) { }
47 
49  {
50  if (this != &r)
51  {
52  x = r.x;
53  xdot = r.xdot;
54  t = r.t;
55  }
56  return *this;
57  }
58 
59  ~DASRT_result (void) = default;
60 
61  Matrix state (void) const { return x; }
62  Matrix deriv (void) const { return xdot; }
63  ColumnVector times (void) const { return t; }
64 
65 private:
66 
70 };
71 
72 class
73 OCTAVE_API
74 DASRT : public DAERT, public DASRT_options
75 {
76 public:
77 
78  DASRT (void)
80  liw (0), lrw (0), ng (0), info (), iwork (), jroot (), rwork (),
81  abs_tol (), rel_tol ()
82  { }
83 
84  DASRT (const ColumnVector& s, double tm, DAERTFunc& f)
85  : DAERT (s, tm, f), DASRT_options (), initialized (false),
86  liw (0), lrw (0), ng (0), info (), iwork (), jroot (), rwork (),
87  abs_tol (), rel_tol ()
88  { }
89 
90  DASRT (const ColumnVector& s, const ColumnVector& deriv,
91  double tm, DAERTFunc& f)
92  : DAERT (s, deriv, tm, f), DASRT_options (), initialized (false),
93  liw (0), lrw (0), ng (0), info (), iwork (), jroot (), rwork (),
94  abs_tol (), rel_tol ()
95  { }
96 
97  ~DASRT (void) = default;
98 
99  DASRT_result integrate (const ColumnVector& tout);
100 
101  DASRT_result integrate (const ColumnVector& tout,
102  const ColumnVector& tcrit);
103 
104  std::string error_message (void) const;
105 
106 private:
107 
109 
110  octave_f77_int_type liw;
111  octave_f77_int_type lrw;
112 
113  octave_f77_int_type ng;
114 
118 
120 
123 
124  void integrate (double t);
125 };
126 
127 #endif
Definition: DAERT.h:32
Definition: DASRT.h:72
Matrix deriv(void) const
Definition: DASRT.h:62
bool initialized
Definition: DASRT.h:108
Array< octave_f77_int_type > iwork
Definition: DASRT.h:116
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE * f
NDArray & operator=(const NDArray &a)
Definition: dNDArray.h:69
Matrix x
Definition: DASRT.h:67
Array< double > rel_tol
Definition: DASRT.h:122
Array< octave_f77_int_type > jroot
Definition: DASRT.h:117
DASRT_result(const Matrix &xx, const Matrix &xxdot, const ColumnVector &tt)
Definition: DASRT.h:42
DASRT_result(void)
Definition: DASRT.h:39
ColumnVector times(void) const
Definition: DASRT.h:63
Matrix xdot
Definition: DASRT.h:68
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
Definition: ov-usr-fcn.cc:997
Array< octave_f77_int_type > info
Definition: DASRT.h:115
DASRT(void)
Definition: DASRT.h:78
s
Definition: file-io.cc:2729
octave_f77_int_type lrw
Definition: DASRT.h:111
DASRT(const ColumnVector &s, const ColumnVector &deriv, double tm, DAERTFunc &f)
Definition: DASRT.h:90
is false
Definition: cellfun.cc:400
Definition: dMatrix.h:36
static bool initialized
Definition: defaults.cc:48
ColumnVector t
Definition: DASRT.h:69
Array< double > rwork
Definition: DASRT.h:119
DASRT(const ColumnVector &s, double tm, DAERTFunc &f)
Definition: DASRT.h:84
Array< double > abs_tol
Definition: DASRT.h:121
DASRT_result(const DASRT_result &r)
Definition: DASRT.h:45
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Definition: utils.cc:888
Matrix state(void) const
Definition: DASRT.h:61
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE * x
octave_f77_int_type liw
Definition: DASRT.h:110
octave_f77_int_type ng
Definition: DASRT.h:113