annotate liboctave/numeric/DASSL.h @ 21218:2bb4e5a6290d

don't include lo-math.h in header files unnecessarily * DASPK.h, DASRT.h, DASSL.h, LSODE.h, Quad.h, oct-time.h: Don't include lo-math.h. * oct-time.cc (octave_time::octave_time (double)): Move definition here, from oct-time.h.
author John W. Eaton <jwe@octave.org>
date Sun, 07 Feb 2016 13:19:04 -0500
parents f7084eae3318
children 1473547f50f5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
1 /*
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
2
19697
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
3 Copyright (C) 1996-2015 John W. Eaton
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
4
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
6
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6108
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6108
diff changeset
10 option) any later version.
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
11
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
15 for more details.
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
16
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6108
diff changeset
18 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6108
diff changeset
19 <http://www.gnu.org/licenses/>.
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
20
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
21 */
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
22
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 19697
diff changeset
23 #if ! defined (octave_DASSL_h)
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
24 #define octave_DASSL_h 1
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
25
1871
bed9f3e11011 [project @ 1996-02-04 12:07:20 by jwe]
jwe
parents: 1868
diff changeset
26 #include <cfloat>
1868
6822f1ccec47 [project @ 1996-02-04 11:31:58 by jwe]
jwe
parents: 1841
diff changeset
27
3998
f6df65db67f9 [project @ 2002-07-24 18:10:39 by jwe]
jwe
parents: 3997
diff changeset
28 #include "DASSL-opts.h"
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
29
1868
6822f1ccec47 [project @ 1996-02-04 11:31:58 by jwe]
jwe
parents: 1841
diff changeset
30 class
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5307
diff changeset
31 OCTAVE_API
1868
6822f1ccec47 [project @ 1996-02-04 11:31:58 by jwe]
jwe
parents: 1841
diff changeset
32 DASSL : public DAE, public DASSL_options
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
33 {
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
34 public:
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
35
11502
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 10312
diff changeset
36 DASSL (void)
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 10312
diff changeset
37 : DAE (), DASSL_options (), initialized (false), liw (0), lrw (0),
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 10312
diff changeset
38 info (), iwork (), rwork (), abs_tol (), rel_tol () { }
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
39
4587
7b957b442818 [project @ 2003-11-10 15:50:39 by jwe]
jwe
parents: 4192
diff changeset
40 DASSL (const ColumnVector& s, double tm, DAEFunc& f)
11502
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 10312
diff changeset
41 : DAE (s, tm, f), DASSL_options (), initialized (false), liw (0),
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 10312
diff changeset
42 lrw (0), info (), iwork (), rwork (), abs_tol (), rel_tol () { }
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
43
4587
7b957b442818 [project @ 2003-11-10 15:50:39 by jwe]
jwe
parents: 4192
diff changeset
44 DASSL (const ColumnVector& s, const ColumnVector& deriv,
10312
cbc402e64d83 untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents: 10158
diff changeset
45 double tm, DAEFunc& f)
11502
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 10312
diff changeset
46 : DAE (s, deriv, tm, f), DASSL_options (), initialized (false),
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 10312
diff changeset
47 liw (0), lrw (0), info (), iwork (), rwork (), abs_tol (),
4638800cd660 delete data pointer members from liboctave ODE/DAE classes; make destuctors virtual in ODE/DAE base classes
John W. Eaton <jwe@octave.org>
parents: 10312
diff changeset
48 rel_tol () { }
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
49
1945
8c4bce5e773e [project @ 1996-02-14 01:03:03 by jwe]
jwe
parents: 1871
diff changeset
50 ~DASSL (void) { }
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
51
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
52 ColumnVector do_integrate (double t);
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
53
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
54 Matrix do_integrate (const ColumnVector& tout);
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
55
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
56 Matrix do_integrate (const ColumnVector& tout, const ColumnVector& tcrit);
3519
957d7d6ab0e0 [project @ 2000-02-02 06:00:09 by jwe]
jwe
parents: 3488
diff changeset
57
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
58 Matrix integrate (const ColumnVector& tout, Matrix& xdot_out);
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
59
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
60 Matrix integrate (const ColumnVector& tout, Matrix& xdot_out,
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
61 const ColumnVector& tcrit);
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
62
3995
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3992
diff changeset
63 std::string error_message (void) const;
ee0304212be0 [project @ 2002-07-17 04:32:42 by jwe]
jwe
parents: 3992
diff changeset
64
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
65 private:
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
66
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4044
diff changeset
67 bool initialized;
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4044
diff changeset
68
11586
12df7854fa7c strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
69 octave_idx_type liw;
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
70 octave_idx_type lrw;
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4044
diff changeset
71
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
72 Array<octave_idx_type> info;
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 5105
diff changeset
73 Array<octave_idx_type> iwork;
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4044
diff changeset
74
1945
8c4bce5e773e [project @ 1996-02-14 01:03:03 by jwe]
jwe
parents: 1871
diff changeset
75 Array<double> rwork;
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
76
4049
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4044
diff changeset
77 Array<double> abs_tol;
a35a3c5d4740 [project @ 2002-08-16 08:54:31 by jwe]
jwe
parents: 4044
diff changeset
78 Array<double> rel_tol;
1841
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
79 };
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
80
fc5667a20dd2 [project @ 1996-02-03 11:44:02 by jwe]
jwe
parents:
diff changeset
81 #endif