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
ODES.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_ODES_h)
24 #define octave_ODES_h 1
25 
26 #include "ODESFunc.h"
27 #include "base-de.h"
28 
29 class
30 ODES : public base_diff_eqn, public ODESFunc
31 {
32 public:
33 
34  ODES (void)
35  : base_diff_eqn (), ODESFunc (), xdot (), theta () { }
36 
37  ODES (const ColumnVector& s, double tm, ODESFunc& f)
38  : base_diff_eqn (s, tm), ODESFunc (f), xdot (s.length (), 0.0), theta () { }
39 
40  ODES (const ColumnVector& s, const ColumnVector& xtheta, double tm,
41  ODESFunc& f)
42  : base_diff_eqn (s, tm), ODESFunc (f), xdot (s.length (), 0.0),
43  theta (xtheta) { }
44 
45  ODES (const ODES& a)
46  : base_diff_eqn (a), ODESFunc (a), xdot (a.xdot), theta (a.theta) { }
47 
48  ODES& operator = (const ODES& a)
49  {
50  if (this != &a)
51  {
54 
55  xdot = a.xdot;
56  theta = a.theta;
57  }
58  return *this;
59  }
60 
61  ~ODES (void) { }
62 
63  ColumnVector parameter_vector (void) { return theta; }
64 
65  void initialize (const ColumnVector& x, double t);
66 
67  void initialize (const ColumnVector& x, double t,
68  const ColumnVector& theta);
69 
70 protected:
71 
72  // State vector time derivatives.
74 
75  // Parameter vector.
77 };
78 
79 #endif
ODES(const ODES &a)
Definition: ODES.h:45
ODES(const ColumnVector &s, double tm, ODESFunc &f)
Definition: ODES.h:37
ColumnVector theta
Definition: ODES.h:76
ColumnVector & operator=(const ColumnVector &a)
Definition: dColVector.h:53
F77_RET_T const double const double * f
base_diff_eqn & operator=(const base_diff_eqn &a)
Definition: base-de.h:50
~ODES(void)
Definition: ODES.h:61
ColumnVector xdot
Definition: ODES.h:73
Definition: ODES.h:29
ODES(const ColumnVector &s, const ColumnVector &xtheta, double tm, ODESFunc &f)
Definition: ODES.h:40
ODES(void)
Definition: ODES.h:34
ColumnVector parameter_vector(void)
Definition: ODES.h:63
static void initialize(void)
Definition: mkoctfile.cc:111
ODESFunc & operator=(const ODESFunc &a)
Definition: ODESFunc.h:63
F77_RET_T const double * x