GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
ODES.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2002-2025 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_ODES_h)
27#define octave_ODES_h 1
28
29#include "octave-config.h"
30
31#include "ODESFunc.h"
32#include "base-de.h"
33
34class ODES : public base_diff_eqn, public ODESFunc
35{
36public:
37
39 : base_diff_eqn (), ODESFunc (), m_xdot (), m_theta () { }
40
41 ODES (const ColumnVector& s, double tm, ODESFunc& f)
42 : base_diff_eqn (s, tm), ODESFunc (f), m_xdot (s.numel (), 0.0), m_theta ()
43 { }
44
45 ODES (const ColumnVector& s, const ColumnVector& xtheta, double tm,
46 ODESFunc& f)
47 : base_diff_eqn (s, tm), ODESFunc (f), m_xdot (s.numel (), 0.0),
48 m_theta (xtheta) { }
49
50 ODES (const ODES& a)
52 { }
53
55 {
56 if (this != &a)
57 {
60
61 m_xdot = a.m_xdot;
62 m_theta = a.m_theta;
63 }
64 return *this;
65 }
66
67 ~ODES () = default;
68
70
71 OCTAVE_API void initialize (const ColumnVector& x, double t);
72
73 OCTAVE_API void
74 initialize (const ColumnVector& x, double t, const ColumnVector& theta);
75
76protected:
77
78 // State vector time derivatives.
80
81 // Parameter vector.
83};
84
85#endif
ODESFunc & operator=(const ODESFunc &a)
Definition ODESFunc.h:69
Definition ODES.h:35
ColumnVector parameter_vector()
Definition ODES.h:69
ColumnVector m_xdot
Definition ODES.h:79
ODES & operator=(const ODES &a)
Definition ODES.h:54
ColumnVector m_theta
Definition ODES.h:82
ODES()
Definition ODES.h:38
ODES(const ColumnVector &s, double tm, ODESFunc &f)
Definition ODES.h:41
~ODES()=default
ODES(const ColumnVector &s, const ColumnVector &xtheta, double tm, ODESFunc &f)
Definition ODES.h:45
ODES(const ODES &a)
Definition ODES.h:50
base_diff_eqn & operator=(const base_diff_eqn &a)
Definition base-de.h:53
F77_RET_T const F77_DBLE * x
F77_RET_T const F77_DBLE const F77_DBLE * f
#define OCTAVE_API
Definition main.in.cc:55
T::size_type numel(const T &str)
Definition oct-string.cc:74