GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
ODESFunc.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_ODESFunc_h)
27#define octave_ODESFunc_h 1
28
29#include "octave-config.h"
30
31#include "mx-fwd.h"
32
33#include "dMatrix.h"
34
36{
37public:
38
39 struct DAEJac
40 {
43 };
44
46 const ColumnVector& theta);
47
49 const ColumnVector& theta, int column);
50
51 typedef Matrix (*ODES_jsub) (const ColumnVector& x, double,
52 const ColumnVector& theta);
53
55 : m_fsub (nullptr), m_bsub (nullptr), m_jsub (nullptr) { }
56
58 : m_fsub (f), m_bsub (nullptr), m_jsub (nullptr) { }
59
61 : m_fsub (f), m_bsub (b), m_jsub (nullptr) { }
62
64 : m_fsub (f), m_bsub (b), m_jsub (j) { }
65
66 ODESFunc (const ODESFunc& a)
67 : m_fsub (a.m_fsub), m_bsub (a.m_bsub), m_jsub (a.m_jsub) { }
68
70 {
71 if (this != &a)
72 {
73 m_fsub = a.m_fsub;
74 m_bsub = a.m_bsub;
75 m_jsub = a.m_jsub;
76 }
77 return *this;
78 }
79
80 virtual ~ODESFunc () = default;
81
82 ODES_fsub fsub_function () const { return m_fsub; }
83
85 {
86 m_fsub = f;
87 return *this;
88 }
89
90 ODES_bsub bsub_function () const { return m_bsub; }
91
93 {
94 m_bsub = b;
95 return *this;
96 }
97
98 ODES_jsub jsub_function () const { return m_jsub; }
99
101 {
102 m_jsub = j;
103 return *this;
104 }
105
106protected:
107
111};
112
113#endif
ODESFunc & set_bsub_function(ODES_bsub b)
Definition ODESFunc.h:92
ODESFunc & set_fsub_function(ODES_fsub f)
Definition ODESFunc.h:84
ODESFunc(ODES_fsub f)
Definition ODESFunc.h:57
ODESFunc(ODES_fsub f, ODES_bsub b)
Definition ODESFunc.h:60
ODESFunc(const ODESFunc &a)
Definition ODESFunc.h:66
ODESFunc(ODES_fsub f, ODES_bsub b, ODES_jsub j)
Definition ODESFunc.h:63
ODESFunc()
Definition ODESFunc.h:54
ODES_jsub m_jsub
Definition ODESFunc.h:110
ColumnVector(* ODES_bsub)(const ColumnVector &x, double, const ColumnVector &theta, int column)
Definition ODESFunc.h:48
ColumnVector(* ODES_fsub)(const ColumnVector &x, double, const ColumnVector &theta)
Definition ODESFunc.h:45
ODES_jsub jsub_function() const
Definition ODESFunc.h:98
Matrix(* ODES_jsub)(const ColumnVector &x, double, const ColumnVector &theta)
Definition ODESFunc.h:51
virtual ~ODESFunc()=default
ODESFunc & operator=(const ODESFunc &a)
Definition ODESFunc.h:69
ODES_fsub fsub_function() const
Definition ODESFunc.h:82
ODESFunc & set_jsub_function(ODES_jsub j)
Definition ODESFunc.h:100
ODES_bsub bsub_function() const
Definition ODESFunc.h:90
ODES_bsub m_bsub
Definition ODESFunc.h:109
ODES_fsub m_fsub
Definition ODESFunc.h:108
F77_RET_T const F77_DBLE * x
F77_RET_T const F77_DBLE const F77_DBLE * f
Matrix * dfdx
Definition ODESFunc.h:42
Matrix * dfdxdot
Definition ODESFunc.h:41