annotate src/DLD-FUNCTIONS/daspk.cc @ 9067:8970b4b10e9f

Cleanup documentation for quad.texi and diffeq.texi Grammarcheck input .txi files Spellcheck .texi files
author Rik <rdrider0-list@yahoo.com>
date Sat, 28 Mar 2009 22:18:51 -0700
parents 7c02ec148a3c
children 610bf90fce2a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
1 /*
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
2
8920
eb63fbe60fab update copyright notices
John W. Eaton <jwe@octave.org>
parents: 8787
diff changeset
3 Copyright (C) 1996, 1997, 2002, 2003, 2004, 2005, 2006, 2007, 2009
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
4 John W. Eaton
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
5
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
6 This file is part of Octave.
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
7
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
8 Octave is free software; you can redistribute it and/or modify it
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
9 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: 5823
diff changeset
10 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5823
diff changeset
11 option) any later version.
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
12
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
13 Octave is distributed in the hope that it will be useful, but WITHOUT
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
16 for more details.
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
17
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
18 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: 5823
diff changeset
19 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5823
diff changeset
20 <http://www.gnu.org/licenses/>.
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
21
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
22 */
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
23
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
24 #ifdef HAVE_CONFIG_H
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
25 #include <config.h>
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
26 #endif
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
27
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
28 #include <string>
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
29
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
30 #include <iomanip>
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
31 #include <iostream>
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
32
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
33 #include "DASPK.h"
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
34
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
35 #include "defun-dld.h"
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
36 #include "error.h"
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
37 #include "gripes.h"
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
38 #include "oct-obj.h"
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
39 #include "ov-fcn.h"
5729
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
40 #include "ov-cell.h"
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
41 #include "pager.h"
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
42 #include "unwind-prot.h"
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
43 #include "utils.h"
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
44 #include "variables.h"
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
45
3998
f6df65db67f9 [project @ 2002-07-24 18:10:39 by jwe]
jwe
parents: 3997
diff changeset
46 #include "DASPK-opts.cc"
f6df65db67f9 [project @ 2002-07-24 18:10:39 by jwe]
jwe
parents: 3997
diff changeset
47
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
48 // Global pointer for user defined function required by daspk.
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
49 static octave_function *daspk_fcn;
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
50
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
51 // Global pointer for optional user defined jacobian function.
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
52 static octave_function *daspk_jac;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
53
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
54 // Have we warned about imaginary values returned from user function?
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
55 static bool warned_fcn_imaginary = false;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
56 static bool warned_jac_imaginary = false;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
57
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
58 // Is this a recursive call?
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
59 static int call_depth = 0;
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
60
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
61 ColumnVector
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
62 daspk_user_function (const ColumnVector& x, const ColumnVector& xdot,
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 4852
diff changeset
63 double t, octave_idx_type& ires)
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
64 {
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
65 ColumnVector retval;
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
66
4628
c0121a3b9cbe [project @ 2003-11-17 20:19:07 by jwe]
jwe
parents: 4144
diff changeset
67 assert (x.capacity () == xdot.capacity ());
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
68
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
69 octave_value_list args;
4628
c0121a3b9cbe [project @ 2003-11-17 20:19:07 by jwe]
jwe
parents: 4144
diff changeset
70
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
71 args(2) = t;
4628
c0121a3b9cbe [project @ 2003-11-17 20:19:07 by jwe]
jwe
parents: 4144
diff changeset
72 args(1) = xdot;
c0121a3b9cbe [project @ 2003-11-17 20:19:07 by jwe]
jwe
parents: 4144
diff changeset
73 args(0) = x;
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
74
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
75 if (daspk_fcn)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
76 {
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
77 octave_value_list tmp = daspk_fcn->do_multi_index_op (1, args);
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
78
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
79 if (error_state)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
80 {
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
81 gripe_user_supplied_eval ("daspk");
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
82 return retval;
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
83 }
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
84
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
85 int tlen = tmp.length ();
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
86 if (tlen > 0 && tmp(0).is_defined ())
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
87 {
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
88 if (! warned_fcn_imaginary && tmp(0).is_complex_type ())
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
89 {
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
90 warning ("daspk: ignoring imaginary part returned from user-supplied function");
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
91 warned_fcn_imaginary = true;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
92 }
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
93
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
94 retval = ColumnVector (tmp(0).vector_value ());
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
95
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
96 if (tlen > 1)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
97 ires = tmp(1).int_value ();
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
98
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
99 if (error_state || retval.length () == 0)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
100 gripe_user_supplied_eval ("daspk");
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
101 }
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
102 else
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
103 gripe_user_supplied_eval ("daspk");
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
104 }
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
105
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
106 return retval;
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
107 }
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
108
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
109 Matrix
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
110 daspk_user_jacobian (const ColumnVector& x, const ColumnVector& xdot,
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
111 double t, double cj)
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
112 {
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
113 Matrix retval;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
114
4628
c0121a3b9cbe [project @ 2003-11-17 20:19:07 by jwe]
jwe
parents: 4144
diff changeset
115 assert (x.capacity () == xdot.capacity ());
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
116
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
117 octave_value_list args;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
118
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
119 args(3) = cj;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
120 args(2) = t;
4628
c0121a3b9cbe [project @ 2003-11-17 20:19:07 by jwe]
jwe
parents: 4144
diff changeset
121 args(1) = xdot;
c0121a3b9cbe [project @ 2003-11-17 20:19:07 by jwe]
jwe
parents: 4144
diff changeset
122 args(0) = x;
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
123
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
124 if (daspk_jac)
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
125 {
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
126 octave_value_list tmp = daspk_jac->do_multi_index_op (1, args);
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
127
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
128 if (error_state)
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
129 {
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
130 gripe_user_supplied_eval ("daspk");
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
131 return retval;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
132 }
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
133
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
134 int tlen = tmp.length ();
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
135 if (tlen > 0 && tmp(0).is_defined ())
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
136 {
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
137 if (! warned_jac_imaginary && tmp(0).is_complex_type ())
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
138 {
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
139 warning ("daspk: ignoring imaginary part returned from user-supplied jacobian function");
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
140 warned_jac_imaginary = true;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
141 }
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
142
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
143 retval = tmp(0).matrix_value ();
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
144
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
145 if (error_state || retval.length () == 0)
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
146 gripe_user_supplied_eval ("daspk");
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
147 }
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
148 else
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
149 gripe_user_supplied_eval ("daspk");
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
150 }
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
151
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
152 return retval;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
153 }
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
154
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
155 #define DASPK_ABORT() \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
156 do \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
157 { \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
158 unwind_protect::run_frame ("Fdaspk"); \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
159 return retval; \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
160 } \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
161 while (0)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
162
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
163 #define DASPK_ABORT1(msg) \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
164 do \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
165 { \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
166 ::error ("daspk: " msg); \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
167 DASPK_ABORT (); \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
168 } \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
169 while (0)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
170
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
171 #define DASPK_ABORT2(fmt, arg) \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
172 do \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
173 { \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
174 ::error ("daspk: " fmt, arg); \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
175 DASPK_ABORT (); \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
176 } \
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
177 while (0)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
178
3997
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
179 DEFUN_DLD (daspk, args, nargout,
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
180 "-*- texinfo -*-\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
181 @deftypefn {Loadable Function} {[@var{x}, @var{xdot}, @var{istate}, @var{msg}] =} daspk (@var{fcn}, @var{x_0}, @var{xdot_0}, @var{t}, @var{t_crit})\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
182 Solve the set of differential-algebraic equations\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
183 @tex\n\
4852
404c7122853e [project @ 2004-04-06 17:23:37 by jwe]
jwe
parents: 4698
diff changeset
184 $$ 0 = f (x, \\dot{x}, t) $$\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
185 with\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
186 $$ x(t_0) = x_0, \\dot{x}(t_0) = \\dot{x}_0 $$\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
187 @end tex\n\
8517
81d6ab3ac93c Allow documentation tobe built for other formats than tex and info
sh@sh-laptop
parents: 7017
diff changeset
188 @ifnottex\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
189 \n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
190 @example\n\
4698
737fd5c0ae06 [project @ 2004-01-19 19:25:26 by jwe]
jwe
parents: 4628
diff changeset
191 0 = f (x, xdot, t)\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
192 @end example\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
193 \n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
194 with\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
195 \n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
196 @example\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
197 x(t_0) = x_0, xdot(t_0) = xdot_0\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
198 @end example\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
199 \n\
8517
81d6ab3ac93c Allow documentation tobe built for other formats than tex and info
sh@sh-laptop
parents: 7017
diff changeset
200 @end ifnottex\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
201 The solution is returned in the matrices @var{x} and @var{xdot},\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
202 with each row in the result matrices corresponding to one of the\n\
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
203 elements in the vector @var{t}. The first element of @var{t}\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
204 should be @math{t_0} and correspond to the initial state of the\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
205 system @var{x_0} and its derivative @var{xdot_0}, so that the first\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
206 row of the output @var{x} is @var{x_0} and the first row\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
207 of the output @var{xdot} is @var{xdot_0}.\n\
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
208 \n\
8787
5b23faa8113c Documentation fixes.
Olaf Till <olaf.till@uni-jena.de>
parents: 8517
diff changeset
209 The first argument, @var{fcn}, is a string, inline, or function handle\n\
5b23faa8113c Documentation fixes.
Olaf Till <olaf.till@uni-jena.de>
parents: 8517
diff changeset
210 that names the function @math{f} to call to compute the vector of\n\
5b23faa8113c Documentation fixes.
Olaf Till <olaf.till@uni-jena.de>
parents: 8517
diff changeset
211 residuals for the set of equations. It must have the form\n\
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
212 \n\
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
213 @example\n\
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
214 @var{res} = f (@var{x}, @var{xdot}, @var{t})\n\
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
215 @end example\n\
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
216 \n\
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
217 @noindent\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
218 in which @var{x}, @var{xdot}, and @var{res} are vectors, and @var{t} is a\n\
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
219 scalar.\n\
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
220 \n\
8787
5b23faa8113c Documentation fixes.
Olaf Till <olaf.till@uni-jena.de>
parents: 8517
diff changeset
221 If @var{fcn} is a two-element string array or a two-element cell array\n\
9067
8970b4b10e9f Cleanup documentation for quad.texi and diffeq.texi
Rik <rdrider0-list@yahoo.com>
parents: 9064
diff changeset
222 of strings, inline functions, or function handles, the first element names\n\
8787
5b23faa8113c Documentation fixes.
Olaf Till <olaf.till@uni-jena.de>
parents: 8517
diff changeset
223 the function @math{f} described above, and the second element names a\n\
5b23faa8113c Documentation fixes.
Olaf Till <olaf.till@uni-jena.de>
parents: 8517
diff changeset
224 function to compute the modified Jacobian\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
225 @tex\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
226 $$\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
227 J = {\\partial f \\over \\partial x}\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
228 + c {\\partial f \\over \\partial \\dot{x}}\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
229 $$\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
230 @end tex\n\
8517
81d6ab3ac93c Allow documentation tobe built for other formats than tex and info
sh@sh-laptop
parents: 7017
diff changeset
231 @ifnottex\n\
4144
b02ada83de67 [project @ 2002-11-01 18:03:56 by jwe]
jwe
parents: 4140
diff changeset
232 \n\
b02ada83de67 [project @ 2002-11-01 18:03:56 by jwe]
jwe
parents: 4140
diff changeset
233 @example\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
234 @group\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
235 df df\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
236 jac = -- + c ------\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
237 dx d xdot\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
238 @end group\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
239 @end example\n\
8517
81d6ab3ac93c Allow documentation tobe built for other formats than tex and info
sh@sh-laptop
parents: 7017
diff changeset
240 @end ifnottex\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
241 \n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
242 The modified Jacobian function must have the form\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
243 \n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
244 @example\n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
245 @group\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
246 \n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
247 @var{jac} = j (@var{x}, @var{xdot}, @var{t}, @var{c})\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
248 \n\
9064
7c02ec148a3c Check grammar on all .cc files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
249 @end group\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
250 @end example\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
251 \n\
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
252 The second and third arguments to @code{daspk} specify the initial\n\
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
253 condition of the states and their derivatives, and the fourth argument\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
254 specifies a vector of output times at which the solution is desired,\n\
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
255 including the time corresponding to the initial condition.\n\
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
256 \n\
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
257 The set of initial states and derivatives are not strictly required to\n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
258 be consistent. If they are not consistent, you must use the\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
259 @code{daspk_options} function to provide additional information so\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
260 that @code{daspk} can compute a consistent starting point.\n\
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
261 \n\
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
262 The fifth argument is optional, and may be used to specify a set of\n\
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
263 times that the DAE solver should not integrate past. It is useful for\n\
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
264 avoiding difficulties with singularities and points where there is a\n\
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
265 discontinuity in the derivative.\n\
3964
3030cb6cb559 [project @ 2002-06-28 17:17:55 by jwe]
jwe
parents: 3912
diff changeset
266 \n\
4115
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
267 After a successful computation, the value of @var{istate} will be\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
268 greater than zero (consistent with the Fortran version of @sc{Daspk}).\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
269 \n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
270 If the computation is not successful, the value of @var{istate} will be\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
271 less than zero and @var{msg} will contain additional information.\n\
fc2048d4cd21 [project @ 2002-10-22 21:28:42 by jwe]
jwe
parents: 3998
diff changeset
272 \n\
3964
3030cb6cb559 [project @ 2002-06-28 17:17:55 by jwe]
jwe
parents: 3912
diff changeset
273 You can use the function @code{daspk_options} to set optional\n\
3030cb6cb559 [project @ 2002-06-28 17:17:55 by jwe]
jwe
parents: 3912
diff changeset
274 parameters for @code{daspk}.\n\
5642
2618a0750ae6 [project @ 2006-03-06 21:26:48 by jwe]
jwe
parents: 5307
diff changeset
275 @seealso{dassl}\n\
2618a0750ae6 [project @ 2006-03-06 21:26:48 by jwe]
jwe
parents: 5307
diff changeset
276 @end deftypefn")
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
277 {
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
278 octave_value_list retval;
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
279
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
280 warned_fcn_imaginary = false;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
281 warned_jac_imaginary = false;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
282
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
283 unwind_protect::begin_frame ("Fdaspk");
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
284
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
285 unwind_protect_int (call_depth);
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
286 call_depth++;
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
287
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
288 if (call_depth > 1)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
289 DASPK_ABORT1 ("invalid recursive call");
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
290
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
291 int nargin = args.length ();
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
292
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
293 if (nargin > 3 && nargin < 6)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
294 {
5729
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
295 std::string fcn_name, fname, jac_name, jname;
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
296 daspk_fcn = 0;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
297 daspk_jac = 0;
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
298
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
299 octave_value f_arg = args(0);
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
300
5729
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
301 if (f_arg.is_cell ())
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
302 {
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
303 Cell c = f_arg.cell_value ();
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
304 if (c.length() == 1)
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
305 f_arg = c(0);
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
306 else if (c.length() == 2)
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
307 {
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
308 if (c(0).is_function_handle () || c(0).is_inline_function ())
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
309 daspk_fcn = c(0).function_value ();
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
310 else
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
311 {
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
312 fcn_name = unique_symbol_name ("__daspk_fcn__");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
313 fname = "function y = ";
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
314 fname.append (fcn_name);
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
315 fname.append (" (x, xdot, t) y = ");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
316 daspk_fcn = extract_function
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
317 (c(0), "daspk", fcn_name, fname, "; endfunction");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
318 }
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
319
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
320 if (daspk_fcn)
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
321 {
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
322 if (c(1).is_function_handle () || c(1).is_inline_function ())
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
323 daspk_jac = c(1).function_value ();
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
324 else
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
325 {
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
326 jac_name = unique_symbol_name ("__daspk_jac__");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
327 jname = "function jac = ";
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
328 jname.append(jac_name);
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
329 jname.append (" (x, xdot, t, cj) jac = ");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
330 daspk_jac = extract_function
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
331 (c(1), "daspk", jac_name, jname, "; endfunction");
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
332
5729
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
333 if (!daspk_jac)
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
334 {
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
335 if (fcn_name.length())
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
336 clear_function (fcn_name);
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
337 daspk_fcn = 0;
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
338 }
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
339 }
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
340 }
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
341 }
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
342 else
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
343 DASPK_ABORT1 ("incorrect number of elements in cell array");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
344 }
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
345
5729
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
346 if (!daspk_fcn && ! f_arg.is_cell())
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
347 {
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
348 if (f_arg.is_function_handle () || f_arg.is_inline_function ())
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
349 daspk_fcn = f_arg.function_value ();
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
350 else
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
351 {
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
352 switch (f_arg.rows ())
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
353 {
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
354 case 1:
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
355 do
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
356 {
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
357 fcn_name = unique_symbol_name ("__daspk_fcn__");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
358 fname = "function y = ";
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
359 fname.append (fcn_name);
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
360 fname.append (" (x, xdot, t) y = ");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
361 daspk_fcn = extract_function
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
362 (f_arg, "daspk", fcn_name, fname, "; endfunction");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
363 }
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
364 while (0);
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
365 break;
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
366
5729
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
367 case 2:
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
368 {
5729
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
369 string_vector tmp = f_arg.all_strings ();
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
370
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
371 if (! error_state)
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
372 {
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
373 fcn_name = unique_symbol_name ("__daspk_fcn__");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
374 fname = "function y = ";
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
375 fname.append (fcn_name);
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
376 fname.append (" (x, xdot, t) y = ");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
377 daspk_fcn = extract_function
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
378 (tmp(0), "daspk", fcn_name, fname, "; endfunction");
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
379
5729
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
380 if (daspk_fcn)
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
381 {
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
382 jac_name = unique_symbol_name ("__daspk_jac__");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
383 jname = "function jac = ";
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
384 jname.append(jac_name);
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
385 jname.append (" (x, xdot, t, cj) jac = ");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
386 daspk_jac = extract_function
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
387 (tmp(1), "daspk", jac_name, jname,
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
388 "; endfunction");
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
389
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
390 if (!daspk_jac)
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
391 {
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
392 if (fcn_name.length())
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
393 clear_function (fcn_name);
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
394 daspk_fcn = 0;
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
395 }
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
396 }
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
397 }
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
398 }
5729
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
399 }
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
400 }
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
401 }
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
402
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
403 if (error_state || ! daspk_fcn)
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
404 DASPK_ABORT ();
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
405
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
406 ColumnVector state = ColumnVector (args(1).vector_value ());
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
407
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
408 if (error_state)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
409 DASPK_ABORT1 ("expecting state vector as second argument");
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
410
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
411 ColumnVector deriv (args(2).vector_value ());
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
412
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
413 if (error_state)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
414 DASPK_ABORT1 ("expecting derivative vector as third argument");
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
415
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
416 ColumnVector out_times (args(3).vector_value ());
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
417
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
418 if (error_state)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
419 DASPK_ABORT1 ("expecting output time vector as fourth argument");
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
420
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
421 ColumnVector crit_times;
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
422 int crit_times_set = 0;
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
423 if (nargin > 4)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
424 {
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
425 crit_times = ColumnVector (args(4).vector_value ());
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
426
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
427 if (error_state)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
428 DASPK_ABORT1 ("expecting critical time vector as fifth argument");
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
429
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
430 crit_times_set = 1;
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
431 }
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
432
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
433 if (state.capacity () != deriv.capacity ())
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
434 DASPK_ABORT1 ("x and xdot must have the same size");
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
435
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
436 double tzero = out_times (0);
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
437
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
438 DAEFunc func (daspk_user_function);
4140
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
439 if (daspk_jac)
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
440 func.set_jacobian_function (daspk_user_jacobian);
303b28a7a7e4 [project @ 2002-11-01 02:53:13 by jwe]
jwe
parents: 4122
diff changeset
441
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
442 DASPK dae (state, deriv, tzero, func);
4122
19a1626b8d57 [project @ 2002-10-23 22:10:53 by jwe]
jwe
parents: 4117
diff changeset
443 dae.set_options (daspk_opts);
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
444
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
445 Matrix output;
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
446 Matrix deriv_output;
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
447
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
448 if (crit_times_set)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
449 output = dae.integrate (out_times, deriv_output, crit_times);
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
450 else
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
451 output = dae.integrate (out_times, deriv_output);
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
452
5729
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
453 if (fcn_name.length())
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
454 clear_function (fcn_name);
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
455 if (jac_name.length())
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
456 clear_function (jac_name);
e065f7c18bdc [project @ 2006-04-03 19:03:30 by jwe]
jwe
parents: 5642
diff changeset
457
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
458 if (! error_state)
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
459 {
3997
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
460 std::string msg = dae.error_message ();
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
461
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
462 retval(3) = msg;
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
463 retval(2) = static_cast<double> (dae.integration_state ());
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
464
3997
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
465 if (dae.integration_ok ())
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
466 {
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
467 retval(1) = deriv_output;
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
468 retval(0) = output;
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
469 }
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
470 else
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
471 {
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
472 retval(1) = Matrix ();
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
473 retval(0) = Matrix ();
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
474
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
475 if (nargout < 3)
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
476 error ("daspk: %s", msg.c_str ());
d4091aff6468 [project @ 2002-07-17 18:00:06 by jwe]
jwe
parents: 3964
diff changeset
477 }
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
478 }
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
479 }
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
480 else
5823
080c08b192d8 [project @ 2006-05-19 05:32:17 by jwe]
jwe
parents: 5729
diff changeset
481 print_usage ();
3912
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
482
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
483 unwind_protect::run_frame ("Fdaspk");
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
484
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
485 return retval;
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
486 }
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
487
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
488 /*
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
489 ;;; Local Variables: ***
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
490 ;;; mode: C++ ***
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
491 ;;; End: ***
f56cd411adb4 [project @ 2002-04-28 03:12:27 by jwe]
jwe
parents:
diff changeset
492 */