3
Copyright (C) 1996, 1997, 2000, 2002, 2003, 2005, 2007 John W. Eaton
5
This file is part of Octave.
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.
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
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/>.
23
#if !defined (octave_base_de_h)
24
#define octave_base_de_h 1
28
#include "dColVector.h"
37
: x (), t (0.0), stop_time (0.0), stop_time_set (false),
38
restart (true), integration_error (false), istate (0) { }
40
base_diff_eqn (const ColumnVector& xx, double tt)
41
: x (xx), t (tt), stop_time (0.0), stop_time_set (false),
42
restart (true), integration_error (false), istate (0) { }
44
base_diff_eqn (const base_diff_eqn& a)
45
: x (a.x), t (a.t), stop_time (0.0), stop_time_set (false),
46
restart (true), integration_error (false), istate (0) { }
48
virtual ~base_diff_eqn (void) { }
50
base_diff_eqn& operator = (const base_diff_eqn& a)
56
stop_time = a.stop_time;
57
stop_time_set = a.stop_time_set;
59
integration_error = a.integration_error;
66
void initialize (const ColumnVector& x0, double t0)
70
integration_error = false;
75
octave_idx_type size (void) const { return x.capacity (); }
77
ColumnVector state (void) const { return x; }
79
double time (void) const { return t; }
81
void set_stop_time (double tt)
88
void clear_stop_time (void)
90
stop_time_set = false;
94
virtual void force_restart (void) { restart = true; }
96
bool integration_ok (void) const { return ! integration_error; }
98
octave_idx_type integration_state (void) const { return istate; }
100
virtual std::string error_message (void) const = 0;
114
bool integration_error;
116
octave_idx_type istate;
122
;;; Local Variables: ***