GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
base-dae.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_base_dae_h)
27#define octave_base_dae_h 1
28
29#include "octave-config.h"
30
31#include "base-de.h"
32
34{
35public:
36
39
40 base_diff_alg_eqn (const ColumnVector& xx, double tt)
41 : base_diff_eqn (xx, tt), m_xdot (xx.numel (), 0.0) { }
42
44 double tt)
45 : base_diff_eqn (xx, tt), m_xdot (xxdot) { }
46
49
50 virtual ~base_diff_alg_eqn () = default;
51
53 {
54 if (this != &a)
55 {
57 m_xdot = a.m_xdot;
58 }
59 return *this;
60 }
61
62 void initialize (const ColumnVector& x0, double t0)
63 {
65 m_xdot = ColumnVector (x0.numel (), 0.0);
66 }
67
68 void initialize (const ColumnVector& x0, const ColumnVector& xdot0,
69 double t0)
70 {
72 m_xdot = xdot0;
73 }
74
76
77protected:
78
80};
81
82#endif
octave_idx_type numel() const
Number of elements in the array.
Definition Array.h:418
void initialize(const ColumnVector &x0, double t0)
Definition base-dae.h:62
virtual ~base_diff_alg_eqn()=default
ColumnVector m_xdot
Definition base-dae.h:79
void initialize(const ColumnVector &x0, const ColumnVector &xdot0, double t0)
Definition base-dae.h:68
base_diff_alg_eqn(const ColumnVector &xx, double tt)
Definition base-dae.h:40
base_diff_alg_eqn & operator=(const base_diff_alg_eqn &a)
Definition base-dae.h:52
base_diff_alg_eqn(const base_diff_alg_eqn &a)
Definition base-dae.h:47
base_diff_alg_eqn(const ColumnVector &xx, const ColumnVector &xxdot, double tt)
Definition base-dae.h:43
ColumnVector state_derivative()
Definition base-dae.h:75
void initialize(const ColumnVector &x0, double t0)
Definition base-de.h:69
base_diff_eqn & operator=(const base_diff_eqn &a)
Definition base-de.h:53
T::size_type numel(const T &str)
Definition oct-string.cc:74